/* ==========================================================================
   Globe Country Selector - Atlas 3D
   Variables Temáticas (Modo Día / Modo Noche y Cartografía del Mar)
   ========================================================================== */

:root, .gcs-modal, .gcs-modal.gcs-theme-dark {
  --gcs-bg: #090d16;
  --gcs-ocean: #0d2744;
  --gcs-active-country: rgba(56, 189, 248, 0.4);
  --gcs-selected-country: rgba(16, 185, 129, 0.85);
  --gcs-surface: rgba(15, 23, 42, 0.88);
  --gcs-border: rgba(255, 255, 255, 0.15);
  --gcs-text: #f8fafc;
  --gcs-text-muted: #94a3b8;
  --gcs-accent: #10b981;
  --gcs-spain-soil: #f59e0b;
  --gcs-spain-border: #fde047;
}

.gcs-modal.gcs-theme-light {
  --gcs-bg: #f1f5f9;
  --gcs-ocean: #0284c7;
  --gcs-active-country: rgba(2, 132, 199, 0.45);
  --gcs-selected-country: rgba(16, 185, 129, 0.9);
  --gcs-surface: rgba(255, 255, 255, 0.94);
  --gcs-border: rgba(0, 0, 0, 0.12);
  --gcs-text: #0f172a;
  --gcs-text-muted: #64748b;
  --gcs-accent: #059669;
  --gcs-spain-soil: #eab308;
  --gcs-spain-border: #b45309;
}

/* Contenedor Modal de Pantalla Completa */
.gcs-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gcs-bg);
  z-index: 99999;
  display: block;
  visibility: hidden;
  opacity: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.35s ease, visibility 0.35s ease, background-color 0.3s ease;
  pointer-events: none;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

.gcs-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Lienzo 3D WebGL (Aceleración por GPU) */
.gcs-globe-canvas-wrap,
.gcs-globe-canvas-wrap canvas {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  outline: none;
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* UI FLOTANTE */
.gcs-ui-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: env(safe-area-inset-top, 16px) 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 600px;
  margin: 0 auto;
  box-sizing: border-box;
}

.gcs-interactive {
  pointer-events: auto;
}

/* Top Bar */
.gcs-top-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--gcs-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gcs-border);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.gcs-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--gcs-text);
  font-size: 15px;
  width: 100%;
}

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

.gcs-search-clear {
  background: none;
  border: none;
  color: var(--gcs-text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, transform 0.15s;
}

.gcs-search-clear:hover {
  color: var(--gcs-text);
}

.gcs-search-clear:active {
  transform: scale(0.9);
}

.gcs-counter-badge {
  background: var(--gcs-accent);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.gcs-btn-close {
  background: none;
  border: none;
  color: var(--gcs-text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, transform 0.15s;
}

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

.gcs-btn-close:active {
  transform: scale(0.9);
}

/* Buscador Desplegable */
.gcs-search-results {
  background: var(--gcs-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gcs-border);
  border-radius: 12px;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  scrollbar-width: thin;
}

.gcs-search-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  border-bottom: 1px solid var(--gcs-border);
  transition: background-color 0.15s;
}

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

.gcs-search-item:hover {
  background: rgba(255,255,255,0.08);
}

.gcs-modal.gcs-theme-light .gcs-search-item:hover {
  background: rgba(0,0,0,0.05);
}

.gcs-search-item.is-selected {
  color: var(--gcs-accent);
  font-weight: 600;
}

/* Chips de Selección */
.gcs-chips-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gcs-chips-carousel::-webkit-scrollbar {
  display: none;
}

.gcs-chip {
  background: #065f46;
  border: 1px solid #34d399;
  color: #ecfdf5;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}

.gcs-chip:active {
  transform: scale(0.95);
}

.gcs-chip-close {
  opacity: 0.8;
  font-weight: bold;
  margin-left: 4px;
  padding: 0 2px;
}

.gcs-chip-close:hover {
  opacity: 1;
  color: #f87171;
}

/* Leyenda visual informativa */
.gcs-legend {
  position: absolute;
  top: calc(env(safe-area-inset-top, 16px) + 64px);
  left: 16px;
  z-index: 10;
  background: var(--gcs-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--gcs-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  color: var(--gcs-text);
  pointer-events: none;
}

.gcs-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gcs-legend-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.gcs-legend-box-selected {
  background: rgba(16, 185, 129, 0.85);
  border: 1px solid #ffffff;
}

.gcs-legend-box-available {
  background: #1c3f60;
  border: 1px solid #38bdf8;
}

.gcs-legend-box-unavailable {
  background: #141d2b;
  border: 1px solid #1e293b;
}

.gcs-modal.gcs-theme-light .gcs-legend-box-selected {
  background: #10b981;
  border: 1px solid #059669;
}

.gcs-modal.gcs-theme-light .gcs-legend-box-available {
  background: #bae6fd;
  border: 1px solid #0284c7;
}

.gcs-modal.gcs-theme-light .gcs-legend-box-unavailable {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

/* FAB Mi Ubicación (Estilo Google Maps) */
.gcs-fab-location {
  position: absolute;
  bottom: 95px;
  right: 20px;
  z-index: 10;
  background: var(--gcs-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gcs-border);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  transition: transform 0.15s, background-color 0.15s, color 0.2s;
  color: #38bdf8;
}

.gcs-modal.gcs-theme-light .gcs-fab-location {
  color: #0284c7;
}

.gcs-fab-location:active {
  transform: scale(0.92);
}

.gcs-fab-location svg {
  width: 24px;
  height: 24px;
}

/* Botón Continuar */
.gcs-bottom-cta {
  position: absolute;
  bottom: env(safe-area-inset-bottom, 20px);
  left: 20px;
  right: 20px;
  max-width: 600px;
  margin: 0 auto;
  z-index: 10;
  box-sizing: border-box;
}

.gcs-btn-submit {
  width: 100%;
  background: var(--gcs-accent);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.gcs-btn-submit:active {
  transform: scale(0.98);
}

/* Tooltip / Notificación de estado */
.gcs-toast {
  position: absolute;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gcs-surface);
  color: var(--gcs-text);
  border: 1px solid var(--gcs-border);
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 20;
  display: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ==========================================================================
   Acciones Rápidas: Todos / Limpiar
   ========================================================================== */
.gcs-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
  font-size: 12px;
  color: var(--gcs-text-muted);
  font-weight: 600;
  margin-top: -2px;
}

.gcs-selection-title {
  font-size: 12px;
  color: var(--gcs-text);
}

.gcs-selection-actions {
  display: flex;
  gap: 8px;
}

.gcs-btn-action {
  background: var(--gcs-surface);
  border: 1px solid var(--gcs-border);
  color: var(--gcs-text);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: all 0.15s ease;
}

.gcs-btn-action:active {
  transform: scale(0.95);
}

.gcs-btn-select-all {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}

.gcs-btn-select-all:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #ffffff;
}

.gcs-btn-clear-all {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.gcs-btn-clear-all:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
}

/* ==========================================================================
   Banderas Compatibles con Windows 10 (FlagCDN Image Support)
   ========================================================================== */
.gcs-flag-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.gcs-flag-img {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.5);
  display: block;
  margin: 0 auto 3px auto;
  transition: transform 0.2s, box-shadow 0.2s;
  pointer-events: none !important;
}

.gcs-flag-img.is-selected {
  width: 28px;
  height: 19px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.8), 0 3px 8px rgba(0,0,0,0.9);
  transform: scale(1.1);
}

.gcs-chip .gcs-flag-box, .gcs-search-item .gcs-flag-box {
  margin-right: 6px;
}

.gcs-chip .gcs-flag-img, .gcs-search-item .gcs-flag-img {
  width: 18px;
  height: 12px;
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}

/* ==========================================================================
   Marcador de Origen: España (Península, Canarias, Baleares, Ceuta y Melilla)
   ========================================================================== */
.gcs-marker-home {
  z-index: 5;
}

.gcs-marker-home .gcs-flag-img {
  width: 28px;
  height: 19px;
  border: 1.5px solid #fde047;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.95), 0 3px 8px rgba(0,0,0,0.8);
}

.gcs-marker-home-label {
  color: #fde047;
  background: rgba(180, 83, 9, 0.9);
  border: 1px solid #fde047;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  margin-top: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  white-space: nowrap;
}

.gcs-modal.gcs-theme-light .gcs-marker-home-label {
  color: #78350f;
  background: rgba(254, 240, 138, 0.95);
  border: 1px solid #b45309;
}

/* Marcador GPS Preciso (Google Blue Dot) */
.gcs-user-gps-dot {
  width: 16px;
  height: 16px;
  background: #0284c7;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.9), 0 2px 6px rgba(0,0,0,0.5);
  margin: 0 auto;
  position: relative;
}

.gcs-user-gps-dot::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.35);
  animation: gcs-gps-radar 2s infinite ease-out;
}

@keyframes gcs-gps-radar {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ==========================================================================
   Técnica Cartográfica LOD y Marcadores Dinámicos
   ========================================================================== */



/* Marcador seleccionado */

/* LOD por Altitud (idéntico a test.html) */
.gcs-high-altitude .gcs-marker-label.is-unselected {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.gcs-high-altitude .gcs-marker-label:not(.gcs-marker-home-label) {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.gcs-marker-label {
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  text-shadow: 0 1px 3px #000;
  white-space: nowrap;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.25s ease, transform 0.25s ease, font-size 0.2s ease, color 0.2s ease;
}

.gcs-modal.gcs-theme-light .gcs-marker-label {
  color: #0f172a;
  text-shadow: 0 1px 3px #fff, 0 0 2px #fff;
}

.gcs-marker-label.is-selected {
  font-size: 11px;
  color: #34d399;
}

.gcs-modal.gcs-theme-light .gcs-marker-label.is-selected {
  color: #059669;
}

/* Marcador no seleccionado disponible (20% más pequeño y en color gris) */
.gcs-marker-label.is-unselected {
  font-size: 8.8px;
  font-weight: 600;
  color: #94a3b8;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  opacity: 0.85;
  cursor: pointer;
  pointer-events: auto;
}

.gcs-modal.gcs-theme-light .gcs-marker-label.is-unselected {
  color: #64748b;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.gcs-marker-label.is-unselected:hover {
  color: #38bdf8;
  opacity: 1;
  transform: scale(1.1);
}

.gcs-modal.gcs-theme-light .gcs-marker-label.is-unselected:hover {
  color: #0284c7;
}

/* A gran altitud (> 2.1) se ocultan etiquetas de países no seleccionados para limpiar la vista */
.gcs-high-altitude .gcs-marker-label.is-unselected {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}


/* ==========================================================================
   Dock Inferior: Banner Justificación Móvil, Réplica de Barra Inferior y CTA
   ========================================================================== */
.gcs-bottom-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  padding: 8px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(9, 13, 22, 0) 0%, rgba(9, 13, 22, 0.88) 22%, rgba(9, 13, 22, 0.98) 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 580px;
  margin: 0 auto;
  box-sizing: border-box;
  pointer-events: none;
}

.gcs-modal.gcs-theme-light .gcs-bottom-dock {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0) 0%, rgba(241, 245, 249, 0.92) 22%, rgba(241, 245, 249, 0.99) 100%);
}



/* Réplica exacta de la Barra Inferior de Navegación de TC */
.gcs-bottom-nav-replica {
  background: var(--gcs-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--gcs-border);
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
}

.gcs-replica-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 4px;
}

.gcs-replica-title {
  color: var(--gcs-text);
  opacity: 0.9;
}

.gcs-replica-counter {
  color: #10b981;
  font-weight: 700;
  font-size: 10.5px;
}

.gcs-replica-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.gcs-replica-track.is-unlimited {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 6px;
  padding-bottom: 2px;
}

.gcs-replica-track.is-unlimited .gcs-replica-btn {
  flex: 0 0 auto;
  min-width: 78px;
  max-width: 110px;
  padding: 5px 6px 4px 6px;
}

.gcs-replica-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--gcs-border);
  border-radius: 8px;
  padding: 5px 2px 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.gcs-modal.gcs-theme-light .gcs-replica-btn {
  background: rgba(0, 0, 0, 0.02);
}

.gcs-replica-btn.is-active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.gcs-replica-btn.is-active:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.gcs-replica-btn.is-active:active {
  transform: scale(0.96);
}

.gcs-replica-btn.is-empty {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  opacity: 0.6;
  cursor: default;
}

.gcs-modal.gcs-theme-light .gcs-replica-btn.is-empty {
  border-color: rgba(0, 0, 0, 0.2);
}

.gcs-replica-flag {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.gcs-replica-flag img {
  width: 22px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.gcs-replica-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--gcs-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  text-align: center;
}

.gcs-replica-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 8px;
  line-height: 14px;
  text-align: center;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.15s, transform 0.15s;
}

.gcs-replica-remove:hover {
  opacity: 1;
  transform: scale(1.15);
}

.gcs-replica-empty-icon {
  font-size: 14px;
  color: var(--gcs-text-muted);
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1;
}

.gcs-submit-wrap {
  pointer-events: auto;
}

/* Re-ubicar botón GPS flotante y toast sobre el nuevo Dock */
.gcs-fab-location {
  bottom: 165px !important;
}


.gcs-toast {
  bottom: 175px !important;
}


/* Grupo de contador con icono de información interactivo */
.gcs-replica-info-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botón ⓘ de Información Ergonómico y Elegante */
.gcs-btn-info-limit {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.gcs-btn-info-limit:hover {
  background: rgba(56, 189, 248, 0.35);
  border-color: #38bdf8;
  color: #ffffff;
  transform: scale(1.12);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

.gcs-btn-info-limit:active {
  transform: scale(0.92);
}

.gcs-modal.gcs-theme-light .gcs-btn-info-limit {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7;
}

/* ==========================================================================
   Modal Emergente Informativo: Justificación de los 4 Destinos en Móvil
   ========================================================================== */
.gcs-info-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.gcs-info-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gcs-info-modal-card {
  background: var(--gcs-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gcs-border);
  border-radius: 18px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.gcs-info-modal-overlay.is-visible .gcs-info-modal-card {
  transform: scale(1) translateY(0);
}

.gcs-info-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px 16px;
  border-bottom: 1px solid var(--gcs-border);
  background: rgba(255, 255, 255, 0.03);
}

.gcs-modal.gcs-theme-light .gcs-info-modal-header {
  background: rgba(0, 0, 0, 0.02);
}

.gcs-info-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gcs-info-modal-icon {
  font-size: 20px;
  line-height: 1;
}

.gcs-info-modal-header h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--gcs-text);
}

.gcs-info-modal-close {
  background: none;
  border: none;
  color: var(--gcs-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  min-width: 40px;
  min-height: 40px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gcs-info-modal-close:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

.gcs-info-modal-body {
  padding: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gcs-text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gcs-info-modal-body p {
  margin: 0;
}

.gcs-info-modal-body strong {
  color: #38bdf8;
}

.gcs-modal.gcs-theme-light .gcs-info-modal-body strong {
  color: #0284c7;
}

.gcs-info-modal-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11.5px;
  color: var(--gcs-text-muted);
  margin-top: 2px;
}

.gcs-info-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--gcs-border);
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: flex-end;
}

.gcs-btn-info-understood {
  background: var(--gcs-accent);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.gcs-btn-info-understood:active {
  transform: scale(0.96);
}


/* Cabecera y acciones de la réplica inferior */
.gcs-replica-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 4px;
  gap: 8px;
}

.gcs-replica-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gcs-replica-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Ocultar botón TODOS en teléfonos móviles (< 768px); visible en iPad/tablet y escritorio */
@media (max-width: 767px) {
  .gcs-btn-select-all {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .gcs-bottom-dock {
    max-width: 680px;
  }
}
