/* =========================================================
   01) Animaciones
   ========================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* =========================================================
   02) Botón cerrar modal (modal grande)
   ========================================================= */
.cerrar-modal {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease;
}
.cerrar-modal:hover { color: #111827; }

/* =========================================================
   03) Snackbar / Barra flotante de comparar
   - Incluye botón Acciones y mini-modal embebido
   ========================================================= */
.barra-comparar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 12px 20px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  display: none; /* se controla por JS */
  font-weight: 500;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  animation: fadeInUp 0.3s ease;
  position: fixed; /* asegurar stacking correcto */
  overflow: visible;
}
#planesSeleccionadosTexto { font-weight: 500; }

/* Botones base del snackbar */
.barra-comparar button {
  background: #374151;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.barra-comparar button:hover { background: #2563EB; }



/* Mini-modal dentro del snackbar */
.barra-comparar { position: fixed; } /* ancla para el absoluto */
.mini-modal {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 260px;
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  padding: 12px;
  display: none; /* toggle por JS */
  z-index: 10000; /* sobre la barra */
}
.mini-modal.show { display: block; }

.mini-modal-title {
  font-weight: 700;
  margin: 2px 6px 10px;
  font-size: 14px;
}

.mini-modal-divider {
  height: 1px;
  background: #eee;
  margin: 10px 0;
}

.mini-modal .button,
.mini-modal .boton {
  display: block;
  width: 100%;
  text-align: left;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 6px 0;
  color: #0d0d12;
  text-decoration: none;
}
.mini-modal .button:hover { background: #f3f4f6; }
.mini-modal .button.principal { background: #00e3a5; border-color: #00e3a5; font-weight: 800; }
.mini-modal .button.fantasma { background: #fff; }

/* Responsivo para el mini-modal */
@media (max-width: 640px) {
  .barra-comparar { bottom: 12px; border-radius: 14px; }
  .mini-modal { right: 8px; min-width: 85vw; }
}

/* =========================================================
   04) Modal de comparación (grande)
   ========================================================= */
.modal-comparacion {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.4);
  display: none; /* se controla por JS */
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 40px 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-contenido {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  position: relative;
  animation: fadeInScale 0.3s ease;
}

/* Header acciones del modal grande */
.grupo-botones-descarga {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.grupo-botones-descarga button {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}
.grupo-botones-descarga button:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* =========================================================
   05) Tabla comparativa del modal grande
   ========================================================= */
#tablaComparativa {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.columna {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
}
.columna h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}
.columna p {
  margin: 6px 0;
  color: #374151;
}
.columna strong { color: #10b981; }

/* Barra flotante */
.barra-comparar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  display: none;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: #1f2937; /* gris oscuro elegante */
  z-index: 9998;
}

/* Botones visibles en la barra */
.barra-comparar button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #1f2937;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background .2s ease, border-color .2s ease;
}
.barra-comparar button:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}
/* Evita saltos por barra de scroll en escritorio */
.cmp-modal-open { overflow: hidden; }

/* evitar el “borde azul” */
.tarjeta-plan:focus { outline: none; }
.tarjeta-plan:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; }