/*
 * LenderPaths form refresh.
 * Shared polish for every lead form: /v1 + /v2 step flows and /opt-out,
 * plus the tokens and trust strip the homepage and /mca use. Loaded after the page's own CSS so it
 * only restyles -- markup, ids and the classes the form JS toggles are untouched.
 */
:root {
    --lp-slate: #1f2c33;
    --lp-ink: #1d243a;
    --lp-steel: #3f6577;
    --lp-steel-dark: #31515f;
    --lp-steel-soft: #eef4f7;
    --lp-green: #17a67f;
    --lp-muted: #6b7480;
    --lp-line: #dfe5eb;
    --lp-bg: #f6f9fc;
    --lp-radius: 14px;
    --lp-ring: 0 0 0 4px rgba(63, 101, 119, .14);
    --lp-card-shadow: 0 1px 2px rgba(31, 44, 51, .04), 0 24px 60px -24px rgba(31, 44, 51, .28);
}

/* ---------- Step flow shell (/v1, /v2) ---------- */
.step-flow {
    background:
        radial-gradient(900px 420px at 50% -120px, rgba(63, 101, 119, .10), transparent 70%),
        var(--lp-bg);
    margin-top: 0 !important;
    padding-top: calc(110px + 2.5rem) !important;
    padding-bottom: 4.5rem !important;
}
.step-flow .container > .row > [class*="col-"] {
    max-width: 680px;
}
.step-flow #step_number,
.step-flow #total_steps {
    color: var(--lp-ink);
}
.step-flow .progress {
    height: 8px;
    border-radius: 99px;
    background: #e3e9ef;
    overflow: hidden;
    margin-bottom: 1.75rem !important;
}
.step-flow .progress-bar {
    background: linear-gradient(90deg, var(--lp-green), var(--lp-steel)) !important;
    border-radius: 99px;
    transition: width .45s cubic-bezier(.2, .8, .2, 1);
}
.step-flow > .container .row .col p.text-center {
    text-align: left !important;
    font-size: .875rem;
    font-weight: 600;
    color: var(--lp-muted);
    margin-bottom: .6rem;
}
.step-flow .col-auto small a {
    color: var(--lp-muted);
    font-size: .8rem;
    border-bottom: 1px dashed currentColor;
}

.step-flow .card {
    border: 1px solid var(--lp-line);
    border-radius: 22px;
    box-shadow: var(--lp-card-shadow);
}
.step-flow .card > .card-body {
    padding: 2.5rem 2rem;
}
.step-flow .property-step h2,
.step-flow .property-step .form-header h2 {
    color: var(--lp-ink);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
}
.step-flow .property-step .form-header h6 {
    color: var(--lp-muted);
    font-weight: 500;
}
.step-flow .property-step h5 {
    color: var(--lp-ink);
    font-weight: 700;
}
.step-flow .property-step h6.text-primary,
.step-flow .property-step h5.text-primary {
    color: var(--lp-ink) !important;
    font-size: .9rem;
    font-weight: 600;
    margin: .25rem 0 .75rem;
    padding: 0 .5rem;
}

/* Option tiles: v1 .btn-option-js (selected = .btn-primary), v2 .btn-option (selected = .active) */
.step-flow .residence-select .step-radio button.btn-option-js,
.step-flow .btn-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 58px;
    padding: 14px 18px;
    border: 1.5px solid var(--lp-line) !important;
    border-radius: var(--lp-radius);
    background: #fff !important;
    color: var(--lp-ink) !important;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    box-shadow: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.step-flow .residence-select .step-radio button.btn-option-js::after,
.step-flow .btn-option::after {
    content: "";
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #c3ccd5;
    background: #fff center / 12px no-repeat;
    transition: all .15s ease;
}
.step-flow .residence-select .step-radio button.btn-option-js:hover,
.step-flow .btn-option:hover {
    border-color: var(--lp-steel) !important;
    background: #fafcfd !important;
    color: var(--lp-ink) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -10px rgba(31, 44, 51, .45);
}
.step-flow .residence-select .step-radio button.btn-option-js:focus-visible,
.step-flow .btn-option:focus-within {
    outline: none;
    box-shadow: var(--lp-ring);
}
.step-flow .residence-select .step-radio button.btn-option-js.btn-primary,
.step-flow .btn-option.active {
    border-color: var(--lp-steel) !important;
    background: var(--lp-steel-soft) !important;
    color: var(--lp-ink) !important;
    box-shadow: inset 0 0 0 1px var(--lp-steel);
}
.step-flow .residence-select .step-radio button.btn-option-js.btn-primary::after,
.step-flow .btn-option.active::after {
    border-color: var(--lp-steel);
    background-color: var(--lp-steel);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
/* v2 tiles wrap a hidden checkbox + label; let the label fill the tile */
.step-flow .btn-option .custom-control {
    flex: 1;
    padding: 0;
    margin: 0;
}
.step-flow .btn-option .custom-control-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.step-flow .btn-option .custom-control-label {
    display: block;
    cursor: pointer;
    font-size: 1rem;
}
.step-flow .btn-option .custom-control-label::before,
.step-flow .btn-option .custom-control-label::after {
    display: none;
}

/* Yes / No tiles on the unsecured-debt step */
.step-flow .isUnsecuredDebt {
    border: 1.5px solid var(--lp-line);
    border-radius: var(--lp-radius);
    box-shadow: none;
    padding: 18px;
    transition: all .15s ease;
}
.step-flow .isUnsecuredDebt:hover,
.step-flow .isUnsecuredDebt.active {
    background: var(--lp-steel-soft) !important;
    border-color: var(--lp-steel);
    color: var(--lp-ink) !important;
}
.step-flow .isUnsecuredDebt label {
    width: 100%;
    cursor: pointer;
    text-align: left !important;
}

/* Inputs */
.step-flow .property-step .form-control,
.step-flow .property-step .form-select,
.opt-form .form-control,
.opt-form select {
    min-height: 54px;
    padding: .75rem 1rem;
    border: 1.5px solid var(--lp-line);
    border-radius: 12px;
    color: var(--lp-ink);
    font-size: 1rem;
    background-color: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.step-flow .property-step .form-control::placeholder,
.opt-form .form-control::placeholder {
    color: #98a1ab;
}
.step-flow .property-step .form-control:focus,
.step-flow .property-step .form-select:focus,
.opt-form .form-control:focus,
.opt-form select:focus {
    border-color: var(--lp-steel);
    box-shadow: var(--lp-ring);
}
.step-flow .state-error input,
.step-flow .state-error select,
.step-flow input.error,
.opt-form input.error {
    border-color: #d94b4b !important;
    background-color: #fffafa;
}
.step-flow label.state-error-custom,
.step-flow label.state-error,
.step-flow label.error,
.opt-form label.error {
    color: #c53030 !important;
    font-size: .85rem !important;
    font-weight: 500;
    margin-top: .35rem;
}

/* Range slider */
.step-flow .form-control-range {
    height: 6px;
    background: #e3e9ef;
    opacity: 1;
}
.step-flow .form-control-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--lp-steel);
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(31, 44, 51, .35);
    cursor: pointer;
}
.step-flow .form-control-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--lp-steel);
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(31, 44, 51, .35);
    cursor: pointer;
}
.step-flow #monthlyRentSliderValue {
    color: var(--lp-ink);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Primary actions */
.step-flow .property-step .btn-primary.next-step,
.step-flow .property-step .ladda-button,
.step-flow .property-step .btn-xl.btn-primary,
.opt-form .btn-primary,
.step-sticky-footer .btn-primary {
    width: 100%;
    max-width: 420px;
    min-height: 54px;
    padding: .85rem 1.5rem !important;
    border: 0;
    border-radius: 12px;
    background: var(--lp-steel) !important;
    color: #fff !important;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 10px 24px -12px rgba(63, 101, 119, .9);
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.step-flow .property-step .btn-primary.next-step:hover,
.step-flow .property-step .ladda-button:hover,
.step-flow .property-step .btn-xl.btn-primary:hover,
.opt-form .btn-primary:hover {
    background: var(--lp-steel-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -12px rgba(63, 101, 119, .95);
}

/* Back link */
.step-flow .simple-btn.prev-step {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: 1rem auto 0;
    padding: .4rem .75rem;
    border-radius: 8px;
    color: var(--lp-muted);
    font-size: .95rem;
}
.step-flow .simple-btn.prev-step b {
    font-weight: 600;
}
.step-flow .simple-btn.prev-step:hover {
    color: var(--lp-ink);
    background: #f1f4f7;
}

/* Helper + consent copy */
.step-flow .property-step small,
.step-flow .property-step .small {
    color: var(--lp-muted);
    font-size: .8rem;
    line-height: 1.55;
}
.step-flow .updated-checkbox {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e8edf2;
    border-radius: 12px;
    background: #fafbfc;
}
.step-flow .updated-checkbox a,
.step-flow .property-step small a {
    color: var(--lp-steel);
    font-weight: 600;
}

/* Trust strip under the step card */
.lp-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--lp-muted);
    font-size: .85rem;
    font-weight: 500;
}
.lp-trust li {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.lp-trust i {
    color: var(--lp-green);
    font-size: 1rem;
}

/* Mobile sticky submit */
.step-sticky-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px -12px rgba(31, 44, 51, .25);
}
.step-sticky-footer .btn-primary {
    max-width: none;
}

@media (max-width: 767px) {
    /* Start the form right under the 55px fixed header so Continue stays on screen */
    .step-flow {
        padding-top: 68px !important;
        padding-bottom: 6rem !important;
    }
    .step-flow .progress {
        margin-bottom: .9rem !important;
    }
    .step-flow .card > .card-body {
        padding: 1.25rem 1rem;
    }
    /* Pin Continue to the bottom of the screen on long steps */
    .step-flow .text-center:has(> .next-step),
    .step-flow .text-center:has(> #step9Button, > #step10Button, > #step11Button) {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 0 -1rem;
        padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
        background: linear-gradient(rgba(255, 255, 255, 0), #fff 30%);
    }
    .step-flow .text-center:has(> .next-step) .next-step,
    .step-flow .text-center > #step9Button,
    .step-flow .text-center > #step10Button,
    .step-flow .text-center > #step11Button {
        width: 100%;
        margin-top: 0 !important;
    }
    .step-flow .property-step h2,
    .step-flow .property-step .form-header h2 {
        font-size: 1.3rem;
        padding-bottom: .5rem !important;
    }
    .step-flow .residence-select .step-radio button.btn-option-js,
    .step-flow .btn-option {
        min-height: 54px;
        padding: 12px 14px;
        font-size: .92rem;
        white-space: normal;
    }
    .step-flow .residence-select .step-radio button.btn-option-js::after,
    .step-flow .btn-option::after {
        flex-basis: 18px;
        width: 18px;
        height: 18px;
        background-size: 10px;
    }
}

/* ---------- Opt-out ---------- */
.opt-form form {
    padding: 2.25rem 2rem 1rem;
    border: 1px solid var(--lp-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--lp-card-shadow);
}
.opt-form .input-label {
    color: var(--lp-ink);
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .4rem;
}
@media (max-width: 767px) {
    /* Short banner so the opt-out form starts near the top */
    .opt-out {
        margin-top: 55px !important;
        padding-top: 0 !important;
    }
    .opt-out .opt-title h1 {
        margin-bottom: .25rem;
        font-size: 1.35rem;
    }
    .opt-out .opt-title p {
        margin-bottom: 0;
        font-size: .85rem;
    }
    .opt-out .opt-title p br {
        display: none;
    }
    .opt-form {
        padding-top: 1rem !important;
    }
    .opt-form form {
        padding: 1.25rem 1rem .25rem;
    }
}
