/* 
    Estilos para Cotizador de Spa
    Tema: Relajante, Premium, Tonos pastel, Glassmorfismo
*/

:root {
    /* Paleta de colores */
    --primary-color: #8da482; /* Verde salvia suave */
    --primary-hover: #7b9171;
    --bg-color: #f6f5f0; /* Beige claro perlado */
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --accent-color: #e5c4a1; /* Tono arena suave */
    --border-color: #e2dfd5;
    --success-color: #5ba370;
    --error-color: #d9534f;
    
    /* Variables de diseño */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 15px 50px rgba(141, 164, 130, 0.15);
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 10% 20%, rgba(229, 196, 161, 0.15) 0%, transparent 40%), 
                      radial-gradient(circle at 90% 80%, rgba(141, 164, 130, 0.15) 0%, transparent 40%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* Tipografía */
h1, h2, h3, .wizard-title, .step-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--primary-color);
}

.wizard-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Header & Progress */
.wizard-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.wizard-title {
    font-size: 1.75rem;
    margin: 0;
}

.btn-reset {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.btn-reset:hover {
    color: var(--primary-color);
    background: rgba(141, 164, 130, 0.1);
}

.progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar-container {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 16.66%; /* Default Paso 1 de 6 */
    border-radius: 4px;
    transition: width var(--transition-normal);
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
}

/* Forms & Steps */
.wizard-form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.wizard-step {
    padding: 2.5rem;
    display: none;
    animation: fadeIn var(--transition-normal);
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.step-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.mt-4 { margin-top: 2rem; }

/* Inputs Estilizados */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.input-modern, .select-modern {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: #ffffff;
    transition: var(--transition-fast);
    color: var(--text-main);
    appearance: none;
}

select.select-modern {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat, repeat;
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
}

.input-modern:focus, .select-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(141, 164, 130, 0.2);
}

/* Cards (Radios & Checkboxes) */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.radio-card, .checkbox-card {
    position: relative;
    display: flex;
    cursor: pointer;
}

.radio-card input, .checkbox-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.card-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    padding-right: 3rem; /* Espacio para el boton info */
    width: 100%;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.radio-card input:checked ~ .card-content,
.checkbox-card input:checked ~ .card-content {
    border-color: var(--primary-color);
    background: rgba(141, 164, 130, 0.05);
    box-shadow: inset 0 0 0 1px var(--primary-color);
}

.card-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Botón de Información '?' */
.btn-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 2;
}

.btn-info:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Error msg */
.error-msg {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
    animation: slideDownFade var(--transition-fast) forwards;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tarjetas deshabilitadas */
.radio-card.disabled .card-content {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}
.radio-card.disabled .btn-info {
    pointer-events: none;
    opacity: 0.5;
}

/* Dinamic Selects para Bebidas */
.bebidas-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.bebida-item label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer Buttons */
.wizard-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--border-color);
    background: #fbfbfb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

button {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-main);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.btn-success:hover {
    background-color: #4c8c5e;
    transform: translateY(-1px);
}

/* Modal Global */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #ffffff;
    width: 90%;
    max-width: 450px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: var(--transition-fast);
    position: relative;
}

.modal-overlay.show .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.1);
    color: var(--text-main);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
    padding: 0;
}

.modal-close:hover {
    background: rgba(0,0,0,0.2);
}

.modal-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #d8b793 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255,255,255,0.8);
    font-style: italic;
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-title {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/** ========== Banner Terminos y Condiciones ========== */
/* Estilos para el Banner de Términos y Condiciones */
.terms-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f0e3;
    color: #3f2a25;
    font-weight: 500;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /* Asegura que esté por encima de otro contenido */
    /* display: none; */
    /* Inicialmente oculto, JavaScript lo mostrará */
    opacity: 0;
    /* Inicia invisible para la animación de entrada */
    transform: translateY(100%);
    /* Inicia abajo, fuera de la pantalla para animación de entrada */
    visibility: hidden;
    /* Inicia oculto del DOM y no interactuable */
    transition: opacity 1s ease-out, transform 1s ease-out, visibility 0s linear 1s;
    font-size: 0.9em;
    border-top: 1px solid #e0d5c6;
}

/* Clase para mostrar el banner con animación */
.terms-banner--visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out, visibility 0s linear 0s;
}

/* Clase para ocultar el banner con animación */
.terms-banner--hiding {
    opacity: 0;
    transform: translateY(100%);
    /* Lo desliza hacia abajo al ocultarse */
    visibility: hidden;
    /* Se oculta después de la transición de opacidad y transformación */
    /* La transición se define en la clase base .terms-banner */
}

.terms-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    /* Para que se ajuste en pantallas pequeñas */
    max-width: 1200px;
    /* Limita el ancho del contenido en pantallas grandes */
    margin: 0 auto;
    /* Centra el contenido */
    gap: 15px;
    /* Espacio entre texto y botón si se envuelven */
}

.terms-banner-text {
    margin: 0;
    flex-grow: 1;
    /* Permite que el texto ocupe el espacio disponible */
    line-height: 1.5;
}

.terms-banner-link {
    color: #8D6E63;
    /* Un color que destaque ligeramente, como el de tu footer */
    text-decoration: underline;
    font-weight: bold;
}

.terms-banner-link:hover {
    color: #5D4037;
}

.terms-banner-button {
    background-color: #8D6E63;
    /* Color del botón, similar al newsletter de tu footer */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    /* Evita que el texto del botón se parta */
}

.terms-banner-button:hover {
    background-color: #795548;
}

/* Para pantallas más pequeñas */
@media (max-width: 768px) {
    .terms-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .terms-banner-text {
        margin-bottom: 15px;
    }
}

/* Responsividad de la carta */
@media (max-width: 600px) {
    .wizard-step { padding: 1.5rem; }
    .wizard-header { padding: 1.5rem; }
    .wizard-footer { padding: 1.25rem 1.5rem; }
    .options-grid { grid-template-columns: 1fr; }
    .step-title { font-size: 1.75rem; }
    .wizard-title { font-size: 1.5rem; }
    
    body { padding: 0; }
    .wizard-container {
        border-radius: 0;
        border: none;
        min-height: 100vh;
    }
}

/* Ticket Resumen */
.resumen-ticket {
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed var(--primary-color);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.ticket-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.75rem;
}
.ticket-list {
    list-style: none;
    padding: 0;
}
.ticket-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-main);
}
.ticket-list li span:first-child {
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 1rem;
}
.ticket-list li span:last-child {
    text-align: right;
    font-weight: 600;
}
