/* public/css/components/_modals.css - VERSIÓN LIMPIA Y UNIFICADA */

/* --- 1. FONDO Y ESTRUCTURA BASE --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 10px; /* Margen de seguridad para móviles */
}
.modal-overlay.active { opacity: 1; visibility: visible; }

/* Caja del Modal Genérico (Login, Info, etc.) */
.modal-content {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 480px; /* Ancho cómodo */
  padding: 1.5rem;  /* Padding compacto */
  text-align: center;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.modal-overlay.active .modal-content { transform: translateY(0); }

/* --- 2. TIPOGRAFÍA MODAL --- */
.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
  color: var(--text-main);
  line-height: 1.1;
}

.text-desc, .modal-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

/* --- 3. FORMULARIOS E INPUTS --- */
.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.input-group {
  margin-bottom: 0.8rem;
  position: relative;
}

.auth-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 15px; /* Altura compacta */
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: 0.3s;
}

.auth-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.eye-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.7;
}

/* --- 4. ACCIONES (BOTONES LADO A LADO - CLAVE PARA NO SCROLL) --- */
.auth-actions {
  display: flex; flex-direction: column; gap: 12px; margin-top: 1rem; width: 100%;
}

.auth-actions .btn, 
.auth-actions button {
  width: 100%; padding: 12px; font-size: 0.95rem; justify-content: center;
}

/* Botón Google y Separadores */
.btn-google {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: white; color: #333; font-weight: 600;
  padding: 8px; /* Compacto */
  border-radius: 10px; cursor: pointer; transition: 0.2s;
  font-size: 0.9rem;
}
.btn-google:hover { background: #f1f1f1; }

.auth-separator {
  display: flex; align-items: center; justify-content: center;
  margin: 0.8rem 0;
  color: rgba(255,255,255,0.3); font-size: 0.8rem;
}
.auth-separator::before, .auth-separator::after {
  content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.1); margin: 0 10px;
}

.btn-text-close {
  background: none; border: none; color: rgba(255,255,255,0.4);
  margin-top: 0.8rem; font-size: 0.8rem; cursor: pointer;
}
.btn-text-close:hover { color: white; text-decoration: underline; }


/* --- 5. ESTILOS ESPECÍFICOS DE LA TIENDA (SHOP) --- */
.shop-glass-card {
  background: linear-gradient(145deg, rgba(15, 15, 25, 0.95) 0%, rgba(5, 5, 10, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 95%; max-width: 800px;
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  margin: auto; /* Centrado */
}

.modal-overlay.active .shop-glass-card { transform: translateY(0); }

.secure-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px 25px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.close-modal-btn { background: none; border: none; color: #666; font-size: 24px; cursor: pointer; }
.close-modal-btn:hover { color: white; }

.shop-body { padding: 20px; text-align: center; overflow-y: auto; max-height: 80vh; }
.shop-title { font-family: 'Space Grotesk'; font-size: 1.8rem; color: white; margin: 0;}
.shop-subtitle { color: #94a3b8; margin-bottom: 20px; }

/* Grid de Precios */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px; margin-bottom: 20px;
}

.price-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px; padding: 15px;
  position: relative; transition: 0.3s;
  display: flex; flex-direction: column; align-items: center;
}
.price-card:hover { background: rgba(255,255,255,0.05); transform: translateY(-5px); border-color: var(--bio-neon); }
.price-card.popular { border-color: #635bff; background: linear-gradient(to bottom, rgba(99, 91, 255, 0.05), transparent); }

.popular-tag {
  position: absolute; top: -10px; background: #635bff; color: white;
  font-size: 10px; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; font-weight: bold;
}

.coin-icon { font-size: 2.5rem; margin-bottom: 5px; }
.price { font-size: 1.3rem; font-weight: bold; color: white; margin-bottom: 10px; }

/* Botones Stripe */
.btn-stripe-pay {
  background: #3a3f51; color: white; width: 100%; padding: 10px;
  border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.btn-stripe-pay.glow { background: var(--bio-neon); color: black; box-shadow: 0 0 15px rgba(57, 255, 20, 0.3); }
.stripe-footer-mini { font-size: 0.8rem; color: #555; display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 10px; }

/* --- 6. MEDIA QUERIES (PARA MÓVILES BAJITOS) --- */
@media (max-height: 600px) {
  .modal-content {
    padding: 1rem;
    max-width: 550px; /* Más ancho para compensar altura */
  }
  .modal-title { font-size: 1.2rem; display: inline-block; margin-right: 10px; margin-bottom: 0; }
  .text-desc { display: none; } /* Ocultar descripción si no cabe */
  .auth-separator { margin: 0.4rem 0; }
  .btn-text-close { margin-top: 0.4rem; }
  
  /* Ajuste tienda en móviles apaisados */
  .pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .coin-icon { font-size: 1.5rem; }
}