/**
 * Estilos canónicos y visuales premium - Simulador topográfico de subida del nivel del mar y tsunamis 3D
 * fijate.com/tools/simulador-inundacion-nivel-mar-tsunami-3d/
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tema oscuro por defecto (Midnight Slate) */
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-subtle: #172033;
  --bg-input: #0f172a;
  --border-color: #1e293b;
  --border-focus: #38bdf8;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-ocean: #0284c7;
  --accent-cyan: #38bdf8;
  --accent-teal: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-green: #22c55e;

  --hud-bg: rgba(15, 23, 42, 0.82);
  --hud-border: rgba(56, 189, 248, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #cbd5e1;
  --border-focus: #0284c7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --hud-bg: rgba(255, 255, 255, 0.9);
  --hud-border: rgba(2, 132, 199, 0.25);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Reglas básicas de contención */
body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.guide-section-title,
.guide-card-title,
.diagnostic-title,
.control-title {
  font-family: var(--font-heading);
}

.text-mono,
.kpi-val,
.hydro-number,
.telemetry-val,
.popup-elev-number {
  font-family: var(--font-mono);
}

.text-cyan { color: var(--accent-cyan) !important; }
.text-blue { color: #60a5fa !important; }
.text-amber { color: var(--accent-amber) !important; }
.text-red { color: var(--accent-red) !important; }
.text-green { color: var(--accent-green) !important; }

/* Layout de la herramienta */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

.tool-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 1536px) {
  .tool-with-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.tool-main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Tarjeta principal */
.simulator-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .simulator-card {
    padding: 1rem;
    gap: 1.25rem;
  }
}

/* Pestañas de modo principal */
.simulator-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  background-color: var(--bg-card-subtle);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

@media (max-width: 640px) {
  .simulator-mode-tabs {
    grid-template-columns: 1fr;
  }
}

.mode-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.mode-tab-btn:hover {
  color: var(--text-primary);
  background-color: rgba(56, 189, 248, 0.08);
}

.mode-tab-btn.active {
  background-color: var(--accent-ocean);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* Barras de presets y costas con scroll horizontal */
.presets-bar,
.locations-quick-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.presets-label,
.locations-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.presets-scroll-wrap,
.locations-scroll-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.preset-chip-btn,
.location-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
}

.preset-chip-btn:hover,
.location-chip-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background-color: rgba(56, 189, 248, 0.08);
}

.preset-chip-btn.active,
.location-chip-btn.active {
  background-color: rgba(2, 132, 199, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Visor cartográfico y HUD */
.map-viewport-wrapper {
  position: relative;
  width: 100%;
  height: 540px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .map-viewport-wrapper {
    height: 440px;
  }
}

.maplibre-container {
  width: 100%;
  height: 100%;
}

/* HUD Superior */
.map-hud-toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 55px; /* Dejar espacio para controles de MapLibre */
  z-index: 10;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  pointer-events: none;
}

.hud-group {
  display: inline-flex;
  align-items: center;
  background-color: var(--hud-bg);
  border: 1px solid var(--hud-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.hud-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  min-height: 32px;
}

.hud-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.hud-btn.active {
  background-color: var(--accent-ocean);
  color: #ffffff;
}

.hud-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 200px;
  max-width: 320px;
  padding: 0.2rem 0.35rem;
}

.hud-search-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  outline: none;
}

.hud-search-input::placeholder {
  color: var(--text-muted);
}

.hud-btn-search,
.hud-btn-gps {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.hud-btn-search:hover,
.hud-btn-gps:hover {
  color: var(--accent-cyan);
}

.search-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 50;
}

.search-dropdown-item {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover {
  background-color: var(--bg-card-subtle);
  color: var(--accent-cyan);
}

/* HUD Inferior de Telemetría */
.map-hud-telemetry {
  position: absolute;
  bottom: 35px;
  left: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background-color: var(--hud-bg);
  border: 1px solid var(--hud-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  backdrop-filter: blur(10px);
  pointer-events: none;
  font-size: 0.85rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
  .map-hud-telemetry {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    bottom: 45px;
  }
}

.hud-telemetry-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.telemetry-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.telemetry-val {
  font-weight: 700;
  color: var(--text-primary);
}

.map-interaction-hint {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* Marcador Sonar de Epicentro de Tsunami */
.epicenter-sonar-marker {
  position: relative;
  width: 24px;
  height: 24px;
}

.sonar-epicenter-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background-color: #ef4444;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #ef4444;
  cursor: pointer;
  z-index: 3;
}

.sonar-wave-pulse,
.sonar-wave-pulse-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid #ef4444;
  pointer-events: none;
  animation: pulseSonar 2.2s infinite ease-out;
}

.sonar-wave-pulse-2 {
  animation-delay: 1.1s;
}

@keyframes pulseSonar {
  0% {
    width: 14px;
    height: 14px;
    opacity: 1;
  }
  100% {
    width: 65px;
    height: 65px;
    opacity: 0;
  }
}

/* Pin interactivo de cota altimétrica */
.custom-elevation-marker-pin {
  position: relative;
  width: 28px;
  height: 36px;
  cursor: pointer;
}

.pin-ring {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 8px;
  background: rgba(56, 189, 248, 0.4);
  border-radius: 50%;
  animation: pulsePin 1.8s infinite;
}

.pin-dot {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background-color: #38bdf8;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

@keyframes pulsePin {
  0% { transform: translateX(-50%) scale(0.8); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(2.2); opacity: 0; }
}

.elevation-popup-card {
  padding: 0.4rem;
  color: #0f172a;
}

.popup-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

.popup-elevation-box {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.popup-elev-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0284c7;
}

.popup-elev-label {
  font-size: 0.75rem;
  color: #64748b;
}

.popup-verdict {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

.popup-verdict.status-submerged {
  background-color: #fee2e2;
  color: #b91c1c;
}

.popup-verdict.status-safe {
  background-color: #dcfce7;
  color: #15803d;
}

.popup-coords {
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

/* Paneles de controles y telemetría */
.simulator-panel-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }
}

.control-box,
.diagnostic-box {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.control-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.control-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.kpi-badge-large {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background-color: rgba(56, 189, 248, 0.12);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.kpi-badge-sm {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* Slider personalizado de alto impacto */
.slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-range-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #1e293b;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-ticks-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.hitos-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hito-pill-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hito-pill-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.hito-pill-btn.active {
  background-color: rgba(2, 132, 199, 0.25);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Tarjetas de diagnóstico */
.diagnostic-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.diagnostic-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-warning {
  background-color: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

.badge-success {
  background-color: rgba(34, 197, 94, 0.15);
  color: var(--accent-green);
  border-color: rgba(34, 197, 94, 0.3);
}

.diagnostic-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.diagnostic-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.diagnostic-kpis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .diagnostic-kpis-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kpi-val {
  font-size: 1.15rem;
  font-weight: 800;
}

.kpi-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Formulario y selectores canónicos */
.form-group-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-row-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .form-row-dual {
    grid-template-columns: 1fr;
  }
}

.custom-select-field {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 42px;
  padding: 0 40px 0 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s ease;
}

.custom-select-field:focus {
  border-color: var(--border-focus);
}

.custom-select-field option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

/* Botones de acción */
.action-btn-wrap {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-primary-action,
.btn-secondary-action {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.75rem 1.25rem;
  border: none;
  box-sizing: border-box;
}

.btn-primary-action {
  background-color: var(--accent-ocean);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

.btn-primary-action:hover {
  background-color: #0369a1;
  transform: translateY(-1px);
}

.btn-secondary-action {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-secondary-action:hover {
  background-color: #b91c1c;
}

/* Tarjeta hidrodinámica de tsunami */
.hydrodynamics-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

@media (max-width: 600px) {
  .hydrodynamics-card {
    grid-template-columns: 1fr;
  }
}

.hydro-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hydro-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hydro-number {
  font-size: 1.5rem;
  font-weight: 800;
}

.hydro-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tsunami-action-advice {
  background-color: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--accent-red);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Guía científica y educativa */
.tool-guide-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.guide-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 800px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

.guide-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guide-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.guide-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.guide-bullet-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.guide-bullet-list li {
  margin-bottom: 0.4rem;
}

.formula-box {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-align: center;
}

/* Acordeón FAQ */
.faq-accordion-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.faq-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card-subtle);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--accent-cyan);
}

.faq-question {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  content: '−';
  color: var(--accent-cyan);
}

.faq-answer {
  padding: 0 1rem 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.faq-answer p {
  margin: 0;
}

/* Modal corporativo accesible */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.custom-modal-backdrop.is-open {
  display: flex;
}

.custom-modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.custom-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.custom-modal-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.btn-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.btn-modal-close:hover {
  color: var(--text-primary);
}

.custom-modal-body {
  padding: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.custom-modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background-color: var(--bg-card-subtle);
}

.btn-modal-ok {
  background-color: var(--accent-ocean);
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
}

.btn-modal-ok:hover {
  background-color: #0369a1;
}
