/**
 * Hoja de estilos del Simulador 3D de Eclipses Solares en España
 * Fijate Tools - tools/eclipse/
 * Integración armónica con el ecosistema de Fijate Tools (header.css, footer.css, ads.css)
 */

:root {
  color-scheme: dark;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --bg-app: #080c14;
  --bg-space: #030712;
  --bg-panel: rgba(13, 19, 33, 0.85);
  --bg-panel-solid: #0d1321;
  --bg-card: rgba(22, 31, 51, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --bg-glass-panel: rgba(15, 23, 42, 0.78);
  --border-panel: rgba(255, 255, 255, 0.12);
  --border-glass: rgba(255, 255, 255, 0.14);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #f59e0b;

  --text-main: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-accent: #f59e0b;

  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);
  --accent-blue: #38bdf8;
  --accent-cyan: #38bdf8;
  --accent-red: #f43f5e;
  --accent-emerald: #10b981;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-panel: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-app: #f1f5f9;
  --bg-panel: rgba(255, 255, 255, 0.9);
  --bg-panel-solid: #ffffff;
  --bg-card: rgba(241, 245, 249, 0.9);
  --bg-card-hover: #e2e8f0;
  --border-panel: rgba(0, 0, 0, 0.1);
  --border-color: #e2e8f0;

  --text-main: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-panel: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .brand-title, .info-title, .modal-title, .fijate-footer-heading {
  font-family: var(--font-heading);
}

button, input, select, textarea {
  font-family: var(--font-sans);
}

/* ============================================================
   ESTRUCTURA PRINCIPAL Y CONTENEDOR DE LA HERRAMIENTA
   ============================================================ */

.main-wrapper {
  flex: 1;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
  box-sizing: border-box;
}

.tool-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

@media (min-width: 1500px) {
  .tool-with-sidebar {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.5rem;
  }
}

@media (max-width: 1239px) {
  .tool-with-sidebar {
    grid-template-columns: 1fr;
  }
}

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

/* ============================================================
   TARJETA DEL VISOR Y ESCENARIO ASTRONÓMICO
   ============================================================ */

.eclipse-stage-card {
  position: relative;
  width: 100%;
  height: 680px;
  min-height: 560px;
  background: var(--bg-space);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
}

.eclipse-stage-card.is-fullscreen,
.eclipse-stage-card:fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  border: none !important;
}

/* ============================================================
   BARRA DE CONTROLES DEL SIMULADOR (Sub-Header)
   ============================================================ */

.sim-toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass-panel);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sim-toolbar::-webkit-scrollbar {
  display: none;
}

.sim-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sim-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Selector de eventos de la Trilogía de Eclipses */
.eclipse-selector-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-eclipse-dropdown {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(15, 23, 42, 0.9);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 6px 30px 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  min-height: 38px;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.select-eclipse-dropdown:hover,
.select-eclipse-dropdown:focus {
  background-color: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

/* Botones de acción del visor */
.btn-sim-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 11px;
  min-height: 38px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-sim-ctrl:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-sim-ctrl.active {
  background: var(--accent-gold);
  color: #0b0f17;
  border-color: var(--accent-gold);
  font-weight: 700;
}

.btn-sim-ctrl svg {
  flex-shrink: 0;
}

/* ============================================================
   CANVAS Y CONTENEDOR DE SIMULACIÓN
   ============================================================ */

#app-container {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.canvas-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #030712;
}

#eclipseCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Capa de interfaz de usuario superpuesta (HUD) */
.ui-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  padding: 62px 12px 12px 12px; /* Margen superior para no solapar la sim-toolbar */
  box-sizing: border-box;
}

.ui-overlay > * {
  pointer-events: auto;
}

/* Sección superior agrupada (Avisos y Telemetría) */
.top-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  pointer-events: none;
}

.top-section > * {
  pointer-events: auto;
}

/* Banner de seguridad ocular dinámico */
.safety-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 11.5px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  transition: all 0.3s ease;
}

.safety-banner.safe {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.safety-banner.warning {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

/* Fila de telemetría (Cobertura y Orientación hacia el Sol) */
.telemetry-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.card-coverage,
.card-orientation {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.coverage-gauge {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.coverage-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 5;
}

.gauge-progress {
  fill: none;
  stroke: var(--accent-gold);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 170;
  stroke-dashoffset: 170;
  transition: stroke-dashoffset 0.2s linear, stroke 0.3s ease;
}

.gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: var(--text-primary);
}

.coverage-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.phase-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.time-countdown {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
}

/* Tarjeta de orientación celeste */
.compass-mini {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compass-needle {
  position: absolute;
  width: 2px;
  height: 28px;
  background: linear-gradient(to bottom, #ef4444 50%, #cbd5e1 50%);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.orientation-data {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.orientation-data span {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================================
   PANEL INFERIOR DE CONTROLES Y LÍNEA DE TIEMPO (BOTTOM CONTROLS)
   ============================================================ */

.bottom-controls {
  background: var(--bg-glass-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.bottom-controls.collapsed .bottom-controls-content {
  display: none;
}

.bottom-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.bottom-status-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.live-dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.compact-time {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--text-primary);
}

.compact-phase {
  color: var(--accent-gold);
  font-weight: 600;
}

.btn-panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}

.btn-panel-toggle:hover {
  color: var(--text-primary);
}

.bottom-controls-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Hitos de contacto del eclipse */
.timeline-contacts-bar {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 4px;
  font-size: 10.5px;
}

.contact-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.contact-node:hover {
  transform: translateY(-2px);
}

.contact-node .node-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-bottom: 2px;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

.contact-node.totality .node-dot {
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
}

.contact-node .node-label {
  font-weight: 700;
  color: var(--text-primary);
}

.contact-node .node-time {
  font-size: 9.5px;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
}

/* Barra de desplazamiento temporal (Scrubber) */
.scrubber-container {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
}

.scrubber-track {
  position: absolute;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.scrubber-totality-zone {
  position: absolute;
  height: 100%;
  background: rgba(245, 158, 11, 0.4);
  border-left: 1px solid var(--accent-gold);
  border-right: 1px solid var(--accent-gold);
}

.scrubber-progress {
  position: absolute;
  height: 100%;
  background: var(--accent-gold);
  border-radius: 3px;
}

.scrubber-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px var(--accent-gold-glow);
  transform: translate(-50%, 0);
  pointer-events: none;
}

.scrubber-input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 5;
}

/* Fila de controles de reproducción */
.playback-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.playback-controls-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.time-display {
  display: flex;
  flex-direction: column;
}

.sim-time {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: var(--text-primary);
  line-height: 1.1;
}

.sim-mode-tag {
  font-size: 9.5px;
  color: var(--text-muted);
}

.player-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ctrl:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ctrl.btn-play {
  width: 36px;
  height: 36px;
  background: var(--accent-gold);
  color: #0b0f17;
  border-color: var(--accent-gold);
}

.btn-ctrl.btn-play:hover {
  background: #d97706;
}

.live-weather-bar {
  display: flex;
  align-items: center;
}

.live-weather-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.playback-controls-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.speed-selector {
  display: flex;
  align-items: center;
  gap: 3px;
}

.speed-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 4px;
}

.speed-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-panel);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.speed-btn.active {
  background: var(--accent-gold);
  color: #0b0f17;
  border-color: var(--accent-gold);
  font-weight: 700;
}

/* ============================================================
   SPLASH LOADER
   ============================================================ */

.splash-loader {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: #030712;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-loader.loaded,
.splash-loader.hidden,
.splash-loader.fade-out {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.splash-eclipse-icon {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #f59e0b 30%, transparent 70%);
  box-shadow: 0 0 30px #f59e0b;
  animation: splash-pulse 2s infinite ease-in-out;
}

@keyframes splash-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.1); filter: brightness(1.3); }
}

.splash-text {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
}

.splash-credits {
  font-size: 11px;
  color: #94a3b8;
}

/* ============================================================
   SECCIÓN DIDÁCTICA Y GUÍA TÉCNICA INFERIOR (SEO)
   ============================================================ */

.tool-info-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-panel);
}

.info-title {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  line-height: 1.3;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.info-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-md);
  padding: 16px;
}

[data-theme="light"] .info-card {
  background: #ffffff;
}

.info-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.info-card-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================================
   BARRA LATERAL ADHESIVA (SIDEBAR PUBLICITARIA Y DIDÁCTICA)
   ============================================================ */

.tool-ad-sidebar {
  position: relative;
  min-width: 0;
}

.ad-sticky-box {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-darksky-card {
  background: var(--bg-card);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-panel);
}

.sidebar-darksky-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 0 0 10px 0;
}

.sidebar-darksky-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.sidebar-darksky-list li strong {
  color: var(--text-primary);
}

/* ============================================================
   MODALES NATIVOS DE LA APLICACIÓN
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-backdrop.active,
.modal-backdrop.open {
  display: flex;
}

.modal-window {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  background: #0f172a;
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-window-large {
  max-width: 820px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-panel);
}

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

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease;
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-panel);
  background: rgba(0, 0, 0, 0.2);
}

/* Elementos de formulario en modales */
.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-panel);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.category-tab.active {
  background: var(--accent-gold);
  color: #0b0f17;
  border-color: var(--accent-gold);
}

.search-input-wrapper {
  width: 100%;
}

.search-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  min-height: 40px;
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--accent-gold-glow);
}

.cities-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.city-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.city-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-panel);
}

.city-item.active {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
}

.btn-primary {
  background: var(--accent-gold);
  color: #0b0f17;
  border: 1px solid var(--accent-gold);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 40px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-panel);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 40px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   RESPONSIVE (MÓVIL Y TABLET)
   ============================================================ */

@media (max-width: 768px) {
  .main-wrapper {
    padding: 1rem 0.75rem 2.5rem;
  }

  .eclipse-stage-card {
    height: 580px;
    border-radius: var(--radius-md);
  }

  .sim-toolbar {
    padding: 6px 8px;
    gap: 5px;
  }

  .select-eclipse-dropdown,
  .btn-sim-ctrl {
    font-size: 11px;
    padding: 5px 8px;
    min-height: 36px;
  }

  .select-eclipse-dropdown {
    padding-right: 24px;
    max-width: 140px;
  }

  .telemetry-row {
    flex-direction: column;
    gap: 6px;
  }

  .card-coverage,
  .card-orientation {
    padding: 6px 10px;
  }

  .modal-window {
    max-height: 95vh;
  }
}
