/* style.css — formulario-personalizado specific styles
   The shared layout system + fonts live in /shared/form-base.css
   This file only overrides and adds styles specific to this form's UI. */

/* ---- GLASS CONTAINER (this form's box class) ---- */
.glass-container {
    background: var(--bg-box, rgba(255, 255, 255, 0.92));
    backdrop-filter: var(--backdrop-box, blur(20px));
    -webkit-backdrop-filter: var(--backdrop-box, blur(20px));
    border: var(--border-box, 1px solid rgba(255, 255, 255, 0.8));
    border-radius: var(--radius-box, 2rem);
    box-shadow: var(--shadow-box, 0 25px 50px -12px rgba(0, 0, 0, 0.1));
    padding: var(--box-padding, 3rem);
    width: 100%;
    max-width: var(--box-max-width, 560px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ---- PROGRESS BAR ---- */
.progress-track {
    width: 100%;
    height: 6px;
    background: #F1F5F9;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-brand-light, #FCA5A5), var(--color-brand, #F43F5E));
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
}

/* ---- FORM STEPS ---- */
.form-step {
    display: none;
    animation: slideFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.form-step.active {
    display: flex;
}

@keyframes slideFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- INPUTS ---- */
input[type="text"],
input[type="tel"],
input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #F1F5F9;
    border-radius: var(--radius-box, 1rem);
    font-size: 16px;
    font-weight: 500;
    background-color: var(--color-bg-body, #F8FAFC);
    color: var(--color-text-dark, #0F172A);
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 1.25rem;
    outline: none;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus {
    border-color: var(--color-brand, #F43F5E);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px var(--color-brand-light, #FFE4E6);
}

input::placeholder {
    color: #94A3B8;
    font-weight: 400;
}

/* ---- RADIO CARDS ---- */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.radio-option input {
    display: none;
}

.radio-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--color-bg-body, #F8FAFC);
    border: 2px solid #F1F5F9;
    padding: 20px 14px;
    border-radius: var(--radius-box, 1.5rem);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    color: var(--color-text-muted, #64748B);
    text-align: center;
}

.radio-option input:checked+label {
    border-color: var(--color-brand, #F43F5E);
    background-color: var(--color-brand-light, #FFE4E6);
    color: var(--color-brand-dark, #BE123C);
    box-shadow: 0 8px 20px -5px rgba(244, 63, 94, 0.2);
    transform: translateY(-3px);
}

.radio-icon {
    font-size: 30px;
    transition: transform 0.3s;
}

.radio-option input:checked+label .radio-icon {
    transform: scale(1.15);
}

/* ---- COUNTER BOXES ---- */
.counter-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 2px solid #F1F5F9;
    padding: 14px 20px;
    border-radius: var(--radius-box, 1.5rem);
    margin-bottom: 12px;
    transition: border-color 0.3s;
}

.counter-box:hover {
    border-color: var(--color-brand-light, #FFE4E6);
}

.counter-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-count {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-body, #F8FAFC);
    color: var(--color-text-dark, #0F172A);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
    border: none;
}

.btn-count:hover {
    background: var(--color-brand-light, #FFE4E6);
    color: var(--color-brand-dark, #BE123C);
    transform: scale(1.05);
}

/* ---- BUTTONS ---- */
.btn-group {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 1.5rem;
}

.btn {
    padding: 14px 24px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-prev {
    background: var(--color-bg-body, #F8FAFC);
    color: var(--color-text-muted, #64748B);
    flex: 0.3;
}

.btn-prev:hover {
    background: #F1F5F9;
    color: var(--color-text-dark, #0F172A);
}

.btn-next {
    background: linear-gradient(135deg, var(--color-brand, #F43F5E), var(--color-brand-dark, #BE123C));
    color: #ffffff;
    flex: 1;
    padding: 14px 24px;
    border-radius: 999px;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    /* Aseguramos que la transición sea suave */
    transition: all 0.3s ease;
}

.btn-next:hover {
    /* Un ligero levantamiento */
    transform: translateY(-2px);
    /* Aumenta el brillo del botón en un 10% al pasar el cursor */
    filter: brightness(1.1);
}

.btn-next:disabled {
    background: #CBD5E0;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.btn-next:disabled {
    background: #CBD5E0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ---- CUSTOM SELECT ---- */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 2px solid #F1F5F9;
    border-radius: var(--radius-box, 1rem);
    cursor: pointer;
    transition: all 0.3s;
}

.custom-select.open .custom-select__trigger {
    border-color: var(--color-brand, #F43F5E);
    box-shadow: 0 0 0 4px var(--color-brand-light, #FFE4E6);
}

.custom-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
    transition: all 0.2s;
    border: 1px solid #F1F5F9;
    transform: translateY(-8px);
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.custom-option {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.custom-option:hover,
.custom-option.selected {
    background-color: var(--color-brand-light, #FFE4E6);
    color: var(--color-brand-dark, #BE123C);
}

/* ---- CARD ASISTENTE ---- */
.card-asistente {
    background: var(--color-bg-body, #F8FAFC);
    border: 2px solid #F1F5F9;
    border-radius: var(--radius-box, 1.5rem);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.badge-asistente {
    display: inline-flex;
    align-items: center;
    background: var(--color-brand-light, #FFE4E6);
    color: var(--color-brand-dark, #BE123C);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.input-asistente-flat {
    background: white;
    border: 2px solid #F1F5F9;
    border-radius: 0.75rem;
    padding: 10px 14px;
    width: 100%;
    font-size: 14px;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
    outline: none;
}

.input-asistente-flat:focus {
    border-color: var(--color-brand, #F43F5E);
}

/* ---- SCROLLBAR ---- */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #E2E8F0;
    border-radius: 10px;
}

/* ---- MOBILE ---- */
@media (max-width: 600px) {
    .glass-container {
        padding: 1.75rem 1.25rem;
        max-height: unset;
    }

    .btn {
        padding: 12px 18px;
        font-size: 14px;
    }
}