/**
 * ========================================
 * HELP MODAL STYLES - PROFESSIONAL FORMAT
 * ========================================
 * Estilos para modales de ayuda con formato
 * Common Errors + Impact + Prevention
 * Basado en formato oficial CBP
 * ========================================
 */

/* Help Section Container */
.help-section {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #333;
}

.help-section h5 {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #000;
}

.help-section > p:first-of-type {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #0066cc;
  background-color: #f0f8ff;
  padding: 12px 15px;
  border-radius: 4px;
  border-left: 4px solid #0066cc;
}

.help-section p {
  font-size: 14px;
  margin-bottom: 15px;
  color: #333;
}

/* ========================================
   ERROR BOX - Red Warning Style
   ======================================== */
.error-box {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  border-left: 5px solid #dc3545;
  border-radius: 6px;
  padding: 15px 20px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.error-box h6 {
  color: #dc3545;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-box h6 i {
  font-size: 18px;
}

.error-box ul {
  margin: 0;
  padding-left: 20px;
  color: #721c24;
}

.error-box li {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}

/* ========================================
   IMPACT BOX - Critical Warning Style
   ======================================== */
.impact-box {
  background: linear-gradient(135deg, #fff0f0 0%, #ffe8e8 100%);
  border: 2px solid #dc3545;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 20px 0;
  box-shadow: 0 3px 10px rgba(220, 53, 69, 0.2);
}

.impact-box h6 {
  color: #a71d2a;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.impact-box ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.impact-box li {
  margin-bottom: 15px;
  font-size: 13px;
  line-height: 1.6;
  color: #721c24;
  padding-left: 0;
  position: relative;
  list-style: none;
}

.impact-box li strong {
  color: #a71d2a;
  font-weight: bold;
  display: block;
  margin-bottom: 3px;
}

.impact-box strong {
  color: #000;
  font-weight: bold;
}

/* ========================================
   PREVENTION BOX - Solution Style
   ======================================== */
.prevention-box {
  background: linear-gradient(135deg, #e7f3ff 0%, #d0e7ff 100%);
  border-left: 5px solid #0066cc;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.prevention-box h6 {
  color: #0066cc;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prevention-box h6 i {
  font-size: 18px;
  color: #0066cc;
}

.prevention-box p {
  color: #004499;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.prevention-box strong {
  color: #000;
  font-weight: bold;
}

.example-text {
  font-style: italic;
  color: #555;
  background-color: #fff;
  padding: 10px 15px;
  border-radius: 4px;
  border-left: 3px solid #0066cc;
  margin-top: 10px;
  font-size: 12px;
}

.example-text em {
  font-weight: bold;
  color: #0066cc;
}

/* ========================================
   REQUEST DEMO BUTTON
   ======================================== */
.btn-demo {
  display: inline-block;
  background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
  color: #ffffff !important;
  padding: 12px 30px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  margin-top: 20px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
}

.btn-demo:hover {
  background: linear-gradient(135deg, #004499 0%, #003366 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 102, 204, 0.4);
  color: #ffffff !important;
}

.btn-demo i {
  margin-right: 8px;
}

/* ========================================
   MODAL CUSTOMIZATIONS
   ======================================== */
#helpModal .modal-dialog {
  max-width: 700px;
}

#helpModal .modal-content {
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#helpModal .modal-header {
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
  color: #ffffff;
  border-bottom: 3px solid #0066cc;
  border-radius: 8px 8px 0 0;
  padding: 15px 20px;
}

#helpModal .modal-title {
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

#helpModal .modal-body {
  padding: 25px;
  max-height: 70vh;
  overflow-y: auto;
  font-size: 14px;
}

/* Scrollbar Styling */
#helpModal .modal-body::-webkit-scrollbar {
  width: 8px;
}

#helpModal .modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#helpModal .modal-body::-webkit-scrollbar-thumb {
  background: #0066cc;
  border-radius: 4px;
}

#helpModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #004499;
}

#helpModal .modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 15px 20px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .help-section h5 {
    font-size: 16px;
  }

  .error-box,
  .impact-box,
  .prevention-box {
    padding: 12px 15px;
    margin: 15px 0;
  }

  .error-box h6,
  .prevention-box h6 {
    font-size: 14px;
  }

  .impact-box h6 {
    font-size: 15px;
  }

  .error-box li,
  .impact-box li,
  .prevention-box p {
    font-size: 12px;
  }

  .btn-demo {
    width: 100%;
    padding: 10px 20px;
    font-size: 13px;
  }

  #helpModal .modal-dialog {
    margin: 10px;
  }

  #helpModal .modal-body {
    padding: 15px;
    max-height: 60vh;
  }
}

/* ========================================
   PRINT STYLES - Hide Help Elements
   ======================================== */
@media print {
  .help-section,
  #helpModal,
  .btn-demo {
    display: none !important;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.error-box:focus,
.impact-box:focus,
.prevention-box:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .error-box {
    border: 3px solid #dc3545;
  }

  .impact-box {
    border: 3px solid #dc3545;
  }

  .prevention-box {
    border: 3px solid #0066cc;
  }
}

/* ========================================
   INFO MODAL (Why Accuracy Matters) STYLES
   ======================================== */
.info-section {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 6px;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid currentColor;
}

.info-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.info-header i {
  font-size: 20px;
}

.warning-header {
  color: #856404;
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px 15px;
  border-radius: 4px;
}

.success-header {
  color: #155724;
  background-color: #d4edda;
  border-left: 4px solid #28a745;
  padding: 10px 15px;
  border-radius: 4px;
}

.info-list {
  margin: 10px 0;
  padding-left: 20px;
}

.info-list li {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}
/* ========================================
   CAMBIO DE COLOR - ICONOS DE AYUDA (?)
   Agregar este código al FINAL de cf214-styles.css
   ======================================== */

/* Iconos de ayuda (?) - Cambiar de negro a azul tecnológico */
.help-icon,
.info-icon,
i.fa-question-circle,
i.fa-info-circle,
.form-label i,
label i,
span[onclick*="showHelp"] i,
a[onclick*="showHelp"] i {
  color: #0066cc !important; /* Azul tecnológico */
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

/* Efecto hover - más brillante al pasar el mouse */
.help-icon:hover,
.info-icon:hover,
i.fa-question-circle:hover,
i.fa-info-circle:hover,
.form-label i:hover,
label i:hover,
span[onclick*="showHelp"]:hover i,
a[onclick*="showHelp"]:hover i {
  color: #0080ff !important; /* Azul más brillante */
  transform: scale(1.15);
}

/* Si el ícono de ayuda está en un círculo negro, cambiarlo */
.help-trigger,
.help-button {
  color: #0066cc !important;
}

.help-trigger:hover,
.help-button:hover {
  color: #0080ff !important;
}

/* Asegurar que TODOS los Font Awesome circles sean azules */
.fa-circle,
.fas.fa-circle {
  color: #0066cc !important;
}

/* Si hay algún elemento con clase específica de tu formulario */
[class*="help"][class*="icon"] {
  color: #0066cc !important;
}

[class*="help"][class*="icon"]:hover {
  color: #0080ff !important;
}

/* ========================================
   OTRAS OPCIONES DE AZUL (opcional)
   Descomenta el que prefieras
   ======================================== */

/* OPCIÓN: Azul Microsoft (muy tech) */
/*
i.fa-question-circle,
.help-icon {
  color: #0078d4 !important;
}
i.fa-question-circle:hover,
.help-icon:hover {
  color: #106ebe !important;
}
*/

/* OPCIÓN: Azul CBP Oficial (gubernamental) */
/*
i.fa-question-circle,
.help-icon {
  color: #112e51 !important;
}
i.fa-question-circle:hover,
.help-icon:hover {
  color: #205493 !important;
}
*/

/**
 * ========================================
 * CAMBIO DE FONDO - Color Profesional
 * ========================================
 * Cambia el fondo blanco a gris claro profesional
 * como se ve en la versión en español
 * ========================================
 */

/* Fondo principal del body */
body {
  background-color: #f0f0f0 !important;
}

/* Fondo del contenedor principal del formulario */
.container,
.container-fluid {
  background-color: #f0f0f0 !important;
}

/* Mantener los campos de input con fondo blanco para contraste */
input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
  background-color: #ffffff !important;
  border: 1px solid #cccccc;
}

/* Las tarjetas o secciones pueden tener un fondo ligeramente diferente */
.card {
  background-color: #fafafa !important;
}

/* Header del formulario */
.form-header,
header {
  background-color: #f0f0f0 !important;
}

/* Secciones específicas del formulario */
.form-section {
  background-color: #f5f5f5 !important;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Tablas con fondo alternado */
table {
  background-color: #ffffff !important;
}

table th {
  background-color: #e8e8e8 !important;
}

table tbody tr:nth-child(even) {
  background-color: #f9f9f9 !important;
}

/* Los modales de ayuda deben mantener fondo blanco */
.modal-content {
  background-color: #ffffff !important;
}

/* ALTERNATIVAS DE COLOR (comenta/descomenta la que prefieras) */

/* Opción 1: Gris claro (actual) */
/* Ya aplicado arriba: #f0f0f0 */

/* Opción 2: Beige claro (más cálido) */
/*
body, .container {
  background-color: #f5f5f0 !important;
}
*/

/* Opción 3: Gris azulado claro (más moderno) */
/*
body, .container {
  background-color: #f0f2f5 !important;
}
*/

/* Opción 4: Crema suave */
/*
body, .container {
  background-color: #faf9f6 !important;
}

/**
 * ========================================
 * LIMITACIÓN DE ANCHO DEL FORMULARIO
 * ========================================
 * Centra el formulario con ancho máximo
 * y márgenes laterales profesionales
 * ========================================
 */

/* Contenedor principal - ancho limitado y centrado */
.page-wrapper,
.form-container,
.container {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 20px 30px !important;
}

/* Para pantallas grandes - más espacio lateral */
@media (min-width: 1600px) {
  .page-wrapper,
  .form-container,
  .container {
    max-width: 1500px !important;
    padding: 30px 50px !important;
  }
}

/* Para pantallas medianas - ancho más cómodo */
@media (min-width: 1200px) and (max-width: 1599px) {
  .page-wrapper,
  .form-container,
  .container {
    max-width: 1300px !important;
    padding: 25px 40px !important;
  }
}

/* Para tablets - ancho completo pero con padding */
@media (min-width: 768px) and (max-width: 1199px) {
  .page-wrapper,
  .form-container,
  .container {
    max-width: 100% !important;
    padding: 20px 30px !important;
  }
}

/* Para móviles - ancho completo con padding mínimo */
@media (max-width: 767px) {
  .page-wrapper,
  .form-container,
  .container {
    max-width: 100% !important;
    padding: 15px 15px !important;
  }
}

/* Header section también con el mismo ancho */
.header-section {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 20px 30px !important;
}

/* Body con el fondo extendido pero contenido centrado */
body {
  background-color: #f0f0f0 !important;
}

/* Sombra sutil al contenedor para destacarlo del fondo */
.page-wrapper,
.form-container {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* OPCIONES ALTERNATIVAS DE ANCHO (descomenta la que prefieras) */

/* OPCIÓN 1: Ancho más estrecho (mejor para lectura) */
/*
.page-wrapper,
.form-container,
.container {
  max-width: 1200px !important;
}
*/

/* OPCIÓN 2: Ancho medio (balance) */
/*
.page-wrapper,
.form-container,
.container {
  max-width: 1300px !important;
}
*/

/* OPCIÓN 3: Ancho amplio (más espacio) */
/*
.page-wrapper,
.form-container,
.container {
  max-width: 1500px !important;
}
*/

/* OPCIÓN 4: Ancho muy amplio (casi completo) */
/*
.page-wrapper,
.form-container,
.container {
  max-width: 1600px !important;
}
*/

/* Disclaimer Banner - Professional Style */
.disclaimer-banner {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 2px solid #ffc107;
  border-left: 6px solid #ff9800;
  border-radius: 8px;
  padding: 20px 25px;
  margin: 20px auto 30px auto;
  max-width: 1400px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: 0 3px 12px rgba(255, 152, 0, 0.2);
}
.disclaimer-icon i:hover {
  color: #0066ff;
  cursor: pointer;
  transform: scale(1.1);
  transition: 0.2s;
}

.disclaimer-icon {
  flex-shrink: 0;
}

.disclaimer-icon i {
  font-size: 36px;
  color: #ff9800;
}

.disclaimer-content {
  flex: 1;
}

.disclaimer-title {
  color: #856404;
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.disclaimer-text {
  color: #856404;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.disclaimer-text strong {
  color: #664d03;
  font-weight: bold;
}

.disclaimer-text u {
  text-decoration: underline;
  font-weight: bold;
}

.disclaimer-resources {
  background-color: rgba(255, 255, 255, 0.7);
  padding: 10px 15px;
  border-radius: 4px;
  border-left: 3px solid #ff9800;
  font-size: 13px;
  color: #664d03;
}

.disclaimer-resources strong {
  display: block;
  margin-bottom: 8px;
  color: #664d03;
  font-weight: bold;
}

.disclaimer-resources a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
}

.disclaimer-resources a:hover {
  color: #004499;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .disclaimer-banner {
    flex-direction: column;
    padding: 15px 20px;
  }
}
*/
/* ========================================
   LOGO ADUANALIBRE - ESQUINA SUPERIOR DERECHA
   ======================================== */

.aduanalibre-branding {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 1000;
  background: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.aduanalibre-branding:hover {
  box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
  transform: translateY(-2px);
}

.aduanalibre-branding a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.aduanalibre-logo {
  height: 100px;
  width: auto;
  max-width: 180px;
}

.powered-by {
  font-size: 11px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .aduanalibre-branding {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
  }
  
  .aduanalibre-logo {
    height: 30px;
    max-width: 120px;
  }
  
  .powered-by {
    font-size: 9px;
  }
}
.brand-name-text {
  font-size: 18px;
  font-weight: bold;
  color: #0066cc;
  letter-spacing: -0.5px;
}
/* === CF214 Header: centrar como CF216 === */
.header-section{
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* izq | centro | der */
  align-items: center;
  gap: 16px;
  padding: 24px 0 12px;
  border-bottom: 4px solid #0b3d91; /* línea inferior tipo CF216 */
}

.header-left{
  justify-self: start;
  display:flex;
  align-items:center;
  gap:8px;
  color:#0b3d91;
  font-weight:700;
}

.header-center{
  justify-self: center;
  text-align: center;                /* centra todo el bloque */
}

.header-center h2{
  margin:0;
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: .3px;
}

.header-center h3{
  margin:4px 0 0 0;
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 600;
  color:#333;
}

.header-center .simulator-note{
  margin:10px 0 0 0;
  font-size: 18px;
  color:#0b3d91;
  font-weight:700;
  letter-spacing:.10px;
}

.header-right{
  justify-self: end;
  text-align: right;
  font-size: 12px;
  color:#555;
}

/* (Opcional) tira gris clara como CF216 detrás del header */
.header-section{
  background: #f4f6f8;
  border: 1px solid #e3e8ef;
  border-left: 0;
  border-right: 0;
}
/* Quitar negrita del H2 del header CF-214 */
.header-center h2{
  font-weight: 500;   /* o 400 si lo prefieres más delgado */
}

/* ========================================
   END OF HELP STYLES
   ======================================== */