/* -----------------------------------------
   DISEÑO BASE Y VARIABLES (SUPERLOCK 2.0)
----------------------------------------- */
:root {
    /* Colores de Marca Reales */
    --brand-navy: #022169;
    --brand-cyan: #00A6E3;
    --brand-dark: #0A1628;
    --white: #FFFFFF;
    --bg-light: #F4F7FA;
    --text-dark: #1A1A1A;
    --text-gray: #69727D;

    /* UI Utils */
    --radius-soft: 12px;
    --radius-card: 20px;
    --shadow-sm: 0 4px 12px rgba(2, 33, 105, 0.05);
    --shadow-md: 0 12px 30px rgba(2, 33, 105, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator-modal * {
    box-sizing: border-box;
}

/* -----------------------------------------
   MODAL CONTAINER
----------------------------------------- */
.calculator-modal {
    width: 100%;
    max-width: 550px;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(2, 33, 105, 0.08);
    margin: 0 auto;
    /* Center in WordPress content */
    font-family: 'Inter', sans-serif;
}

.modal-header {
    background-color: var(--brand-navy);
    padding: 25px 40px;
    color: var(--white);
    text-align: center;
    position: relative;
}

.modal-header h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 4px 0;
    letter-spacing: -0.8px;
    color: #fff;
}

.modal-header p {
    font-size: 15px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
    color: #fff;
}

/* -----------------------------------------
   PROGRESS BAR
----------------------------------------- */
.progress-container {
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

.progress-bar {
    height: 100%;
    background: var(--brand-cyan);
    width: 14%;
    transition: width 0.5s ease;
}

/* -----------------------------------------
   CONTENT AREA
----------------------------------------- */
.modal-content {
    padding: 25px 40px 10px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 65vh;
}

.step {
    display: none;
    animation: fadeInSlide 0.4s ease-out forwards;
}

.step.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

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

.step-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--brand-navy);
    letter-spacing: -0.4px;
}

.step-desc {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* -----------------------------------------
   OPCIONES Y CARDS
----------------------------------------- */
.options-grid {
    display: grid;
    gap: 14px;
}

.options-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.form-title i {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
    color: var(--brand-cyan);
}

.option-card {
    border: 2px solid #EDF1F7;
    border-radius: var(--radius-soft);
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    background: var(--white);
    position: relative;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.option-card .icon-wrapper {
    margin-bottom: 10px;
    color: var(--brand-cyan);
    background: rgba(0, 166, 227, 0.08);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.option-card:hover .icon-wrapper,
.option-card.selected .icon-wrapper {
    background: var(--brand-cyan);
    color: var(--white);
}

.option-card:hover {
    border-color: var(--brand-cyan);
    background-color: rgba(0, 166, 227, 0.02);
    transform: scale(1.01);
}

.option-card.selected {
    border-color: var(--brand-cyan);
    background-color: rgba(0, 166, 227, 0.05);
    box-shadow: 0 4px 15px rgba(0, 166, 227, 0.12);
}

.option-card .label {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--brand-navy);
}

.option-card .insight {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
}

.option-card .tag {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brand-cyan);
    background: rgba(0, 166, 227, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
    display: none;
}

.option-card.featured .tag {
    display: block;
}

/* -----------------------------------------
   FOOTER Y BOTONES
----------------------------------------- */
.modal-footer {
    padding: 0px 40px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-actions {
    display: flex;
    gap: 15px;
    width: 100%;
}

/* -----------------------------------------
   SUMMARY BAR
----------------------------------------- */
.summary-bar {
    background: #F9FBFF;
    border: 1px solid rgba(0, 166, 227, 0.15);
    border-radius: var(--radius-soft);
    padding: 10px 15px;
    margin-bottom: 5px;
    animation: fadeInSlide 0.4s ease;
}

.summary-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brand-navy);
    opacity: 0.6;
}

.summary-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.summary-pill {
    background: rgba(0, 166, 227, 0.08);
    color: var(--brand-cyan);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 166, 227, 0.1);
}

.btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-soft);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-prev {
    flex: 0 0 60px;
    background: #EDF1F7;
    color: var(--brand-navy);
    display: none;
}

.btn-prev:hover {
    background: #E2E8F0;
}

.btn-next {
    background-color: var(--brand-cyan);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(0, 166, 227, 0.25);
}

.btn-next:hover {
    background-color: #008DC2;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 166, 227, 0.3);
}

.btn-next:disabled,
.btn-next.is-loading {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* -----------------------------------------
   FORMULARIO FINAL
----------------------------------------- */
.form-group {
    margin-bottom: 20px;
}

.form-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
    color: var(--brand-navy);
}

.calculator-modal input,
.calculator-modal select {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-soft);
    border: 2px solid #EDF1F7;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s;
    background: #F9FBFF;
}

.calculator-modal input:focus {
    outline: none;
    border-color: var(--brand-cyan);
    background: var(--white);
}

.trust-badges {
    margin-top: 25px;
    display: flex;
    justify-content: space-around;
    padding-top: 25px;
    border-top: 1px solid #EEE;
}

.badge i {
    display: block;
    margin: 0 auto 5px;
    color: var(--brand-cyan);
}

.badge {
    text-align: center;
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 600;
}

/* Success screen styles */
.success-screen {
    text-align: center;
    padding: 20px 0;
    animation: fadeInSlide 0.6s ease;
}

.success-icon-container {
    background: var(--brand-cyan);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.success-title {
    color: var(--brand-navy);
    margin-bottom: 15px;
    font-weight: 800;
    font-size: 24px;
}

.success-text {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 5px;
}

.success-footer-text {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .calculator-modal {
        max-width: 100%;
        border-radius: 0;
        height: 100dvh;
        /* Dynamic viewport height to handle mobile bars */
        border: none;
    }

    .modal-header {
        padding: 25px 20px 15px;
        /* Reduced top padding */
    }

    .modal-header h1 {
        font-size: 20px;
    }

    .modal-header p {
        font-size: 13px;
    }

    .modal-content {
        padding: 15px 20px;
        max-height: none;
        /* Let flexbox handle it or use a specific percentage */
        overflow-y: auto;
    }

    .step-title {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .step-desc {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .option-card {
        padding: 10px 15px;
    }

    .option-card .label {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .option-card .insight {
        font-size: 12px;
        /* Smaller subtext */
    }

    .option-card .icon-wrapper {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }

    .modal-footer {
        padding: 10px 20px 20px;
    }

    .summary-bar {
        padding: 6px 10px;
        margin-bottom: 8px;
    }

    .summary-pill {
        font-size: 10px;
        padding: 2px 6px;
    }

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

    .trust-badges {
        margin-top: 15px;
        padding-top: 15px;
        gap: 5px;
    }

    .badge {
        font-size: 10px;
    }

    .badge i {
        width: 16px !important;
        height: 16px !important;
    }
}
