/* =============================================================================
   LOAN APPLICATION WIZARD — mobile first
   customer/loan-plans/apply.blade.php (focus mode: no site header, footer or
   bottom tab bar) and customer/loan-applications/received.blade.php.

   Phone: a navy band with the item and a row of step circles, the form in a
   white sheet below it, Back / Continue fixed to the bottom of the screen.
   1200px and up: the band becomes a sticky side panel with a vertical step
   list, and the buttons sit under each step.

   Inputs stay at 16px or more (no iOS zoom), tap targets at 44px or more.
   ============================================================================= */

:root {
    --lw-blue: #0046be;
    --lw-blue-dark: #00379a;
    --lw-navy: #001e73;
    --lw-yellow: #ffce00;
    --lw-ink: #0f172a;
    --lw-ink-2: #334155;
    --lw-ink-3: #475569;
    --lw-line: #8a94a6;        /* input borders: 3:1 against white */
    --lw-line-soft: #e2e8f0;   /* card edges */
    --lw-surface: #f5f7fb;
    --lw-red: #b02a37;         /* error text */
    --lw-red-line: #dc3545;    /* error borders */
    --lw-green: #157347;
    --lw-radius: 12px;
    --lw-radius-card: 14px;
    --lw-focus: 0 0 0 4px rgba(0, 70, 190, 0.2);
    /* The "Credit by Avedson" green: the same pattern as the /installment and
       How It Works heroes, darkened a little so white and yellow text on it
       stays above 4.5:1. Tiled at its own size; a tall side panel would blow
       the 2000x400 image up under "cover". */
    --lw-band: linear-gradient(180deg, rgba(4, 64, 30, 0.3) 0%, rgba(4, 64, 30, 0.5) 100%),
        url('/img/credit-avedson-bg.avif') 0 0 / auto 400px repeat #0a7a34;
    --lw-band-solid: #075a29;
    --lw-actions-h: 76px;
    /* Focus-mode top bar, its 3px yellow line included. */
    --lw-topbar-h: 59px;
    /* Older names that terms-modal.blade.php still reads. */
    --loan-primary: #0046be;
    --loan-primary-dark: #001e73;
}

/* -----------------------------------------------------------------------------
   Page layout
   ----------------------------------------------------------------------------- */
body.lw-focus {
    background: #fff;
}

.lw {
    position: relative;
    min-height: calc(100vh - var(--lw-topbar-h));
    background: #fff;
    color: var(--lw-ink);
    font-size: 1rem;
    line-height: 1.5;
}

.lw-aside {
    position: relative;
    padding: 16px 16px 36px;
    background: var(--lw-band);
    color: #fff;
}

.lw-aside__inner {
    max-width: 760px;
    margin: 0 auto;
}

/* The white sheet the form sits on, pulled up over the band. */
.lw-main {
    position: relative;
    margin-top: -20px;
    padding: 24px 16px calc(var(--lw-actions-h) + 32px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
    background: #fff;
    /* Steps slide in sideways; clip, so that never adds a sideways scroll. */
    overflow-x: hidden;
    overflow-x: clip;
}

.lw-main > * {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.lw-main a:not([class]) {
    color: var(--lw-blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* style.css removes the outline from every focused link. */
.lw-main a:focus-visible,
.lw-received a:focus-visible {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
    border-radius: 3px;
}

/* -----------------------------------------------------------------------------
   The item and plan (partials/plan-summary)
   ----------------------------------------------------------------------------- */
.lw-plan {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lw-plan p {
    margin: 0;
}

.lw-plan__media {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    color: var(--lw-blue);
    font-size: 1.25rem;
}

.lw-plan__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lw-plan__body {
    min-width: 0;
}

.lw-plan__kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lw-plan__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--lw-yellow);
    color: var(--lw-navy);
    letter-spacing: 0.02em;
    text-transform: none;
}

.lw-plan__name {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lw-plan__option,
.lw-plan__down {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.875rem;
}

.lw-plan__price {
    margin-top: 2px !important;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.875rem;
}

.lw-plan__price strong {
    color: var(--lw-yellow);
}

.lw-plan__note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
}

.lw-plan__note i {
    margin-top: 3px;
    color: var(--lw-yellow);
}

/* The short version on a phone: "Nothing to pay today." */
.lw-plan__note-more {
    display: none;
}

/* On the light "Application received" card. */
.lw-plan--received .lw-plan__media {
    width: 64px;
    height: 64px;
    border: 1px solid var(--lw-line-soft);
}

.lw-plan--received .lw-plan__kicker {
    color: var(--lw-ink-3);
}

.lw-plan--received .lw-plan__name {
    color: var(--lw-ink);
}

.lw-plan--received .lw-plan__option,
.lw-plan--received .lw-plan__price,
.lw-plan--received .lw-plan__down {
    color: var(--lw-ink-2);
}

.lw-plan--received .lw-plan__price strong {
    color: var(--lw-blue);
}

/* -----------------------------------------------------------------------------
   Step list (partials/stepper)
   ----------------------------------------------------------------------------- */
.lw-stepper {
    margin-top: 16px;
}

.lw-stepper__list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lw-stepper__item {
    position: relative;
    flex: 1 1 0;
    display: flex;
    justify-content: center;
    min-width: 0;
}

/* The line from the previous circle to this one. It fills yellow once the
   shopper has been past the previous step (is-passed), even after going
   back to an earlier one. */
.lw-stepper__item + .lw-stepper__item::before {
    content: '';
    position: absolute;
    top: 21px;
    right: 50%;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    background-image: linear-gradient(var(--lw-yellow), var(--lw-yellow));
    background-repeat: no-repeat;
    background-size: 0 100%;
    transition: background-size 0.35s ease;
}

.lw-stepper__item.is-passed + .lw-stepper__item::before {
    background-size: 100% 100%;
}

.lw-stepper__btn {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: none;
    color: #fff;
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.lw-stepper__btn:disabled {
    cursor: default;
}

.lw-stepper__btn:focus-visible {
    outline: 3px solid var(--lw-yellow);
    outline-offset: 2px;
}

.lw-stepper__dot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 6px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: var(--lw-band-solid);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.lw-stepper__tick,
.lw-stepper__alert {
    display: none;
}

.lw-stepper__item.is-current .lw-stepper__dot {
    border-color: var(--lw-yellow);
    background: var(--lw-yellow);
    color: var(--lw-navy);
    box-shadow: 0 0 0 4px var(--lw-band-solid), 0 0 0 6px var(--lw-yellow);
}

.lw-stepper__item.is-done .lw-stepper__dot {
    border-color: #fff;
    background: #fff;
    color: var(--lw-band-solid);
}

.lw-stepper__item.is-done .lw-stepper__num {
    display: none;
}

.lw-stepper__item.is-done .lw-stepper__tick {
    display: block;
}

.lw-stepper__item.has-error:not(.is-current) .lw-stepper__dot {
    border-color: #ff9aa2;
    background: #dc3545;
    color: #fff;
}

.lw-stepper__item.has-error:not(.is-current) .lw-stepper__num,
.lw-stepper__item.has-error:not(.is-current) .lw-stepper__tick {
    display: none;
}

.lw-stepper__item.has-error:not(.is-current) .lw-stepper__alert {
    display: block;
}

/* Circles only on a phone; the names come back at 576px. */
.lw-stepper__text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    white-space: nowrap;
}

.lw-stepper__label,
.lw-stepper__sub {
    display: block;
}

.lw-stepper__label {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
}

.lw-stepper__sub {
    display: none;
}

.lw-stepper__item.is-upcoming .lw-stepper__label {
    color: rgba(255, 255, 255, 0.9);
}

/* Help contacts: in the side panel from 1200px (the top bar has them too). */
.lw-aside__help {
    display: none;
}

.lw-aside__help-title {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    font-weight: 700;
}

.lw-aside__help-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lw-aside__help-list a,
.lw-aside__help-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 0.9375rem;
    text-align: left;
    text-decoration: none;
}

.lw-aside__help-list i {
    width: 18px;
    color: var(--lw-yellow);
    text-align: center;
}

.lw-aside__help-list a:hover,
.lw-aside__help-list button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.lw-aside__help-list a:focus-visible,
.lw-aside__help-list button:focus-visible {
    outline: 3px solid var(--lw-yellow);
    outline-offset: 0;
    color: #fff;
}

/* -----------------------------------------------------------------------------
   Messages above the form
   ----------------------------------------------------------------------------- */
.lw .loan-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 2px solid #f1aeb5;
    border-radius: var(--lw-radius-card);
    background: #fff5f5;
    color: #842029;
}

.lw .loan-error-banner:focus {
    outline: none;
}

.loan-error-banner__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
}

.loan-error-banner__body {
    min-width: 0;
}

.loan-error-banner__title {
    margin: 0 0 6px;
    font-weight: 700;
}

.loan-error-banner__list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.9375rem;
}

.loan-error-banner__list li + li {
    margin-top: 2px;
}

.loan-error-banner__note {
    margin: 8px 0 0;
    font-size: 0.875rem;
}

.lw .loan-apply-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #b7dfc4;
    border-radius: var(--lw-radius-card);
    background: #eaf6ee;
    color: #0f5132;
}

.lw .loan-apply-notice i {
    margin-top: 4px;
}

/* -----------------------------------------------------------------------------
   One step: header, body, sideways slide
   ----------------------------------------------------------------------------- */
.lw-step__header {
    margin-bottom: 20px;
}

.lw-step__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 10px;
    font-size: 0.875rem;
}

.lw-step__eyebrow {
    color: var(--lw-blue);
    font-weight: 700;
}

.lw-step__eyebrow-num {
    text-decoration: underline;
    text-decoration-color: var(--lw-yellow);
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}

.lw-step__optional {
    color: var(--lw-ink-3);
}

.lw-step__progress {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lw-ink-3);
}

.lw-step__bar {
    position: relative;
    width: 72px;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--lw-line-soft);
}

.lw-step__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--lw-blue);
}

.lw-step__title {
    margin: 0;
    color: var(--lw-ink);
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Focused by script when a step opens, so screen readers start there. */
.lw-step__title:focus {
    outline: none;
}

.lw-step__lead {
    margin: 8px 0 0;
    color: var(--lw-ink-2);
    font-size: 1rem;
    line-height: 1.5;
}

.lw-step__content.lw-anim-forward {
    animation: lw-step-in-forward 0.28s ease-out both;
}

.lw-step__content.lw-anim-back {
    animation: lw-step-in-back 0.28s ease-out both;
}

@keyframes lw-step-in-forward {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

@keyframes lw-step-in-back {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: none; }
}

/* Until a guest confirms their email, step 1 shows only the email card. */
.loan-guest-awaiting-email .lw-step__body > :not(.loan-guest-email),
.loan-guest-awaiting-email > .lw-actions {
    display: none !important;
}

/* -----------------------------------------------------------------------------
   "What you'll need" (and partials/apply-checklist, shared with the guide)
   ----------------------------------------------------------------------------- */
.lw-checklist {
    margin: 0 0 24px;
    border: 1px solid var(--lw-line-soft);
    border-radius: var(--lw-radius-card);
    background: var(--lw-surface);
}

.lw-checklist__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    min-height: 52px;
    padding: 12px 16px;
    color: var(--lw-ink);
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.lw-checklist__summary::-webkit-details-marker {
    display: none;
}

.lw-checklist__summary::after {
    content: '';
    width: 9px;
    height: 9px;
    margin-left: auto;
    border-right: 2px solid var(--lw-ink-3);
    border-bottom: 2px solid var(--lw-ink-3);
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.2s ease;
}

.lw-checklist[open] .lw-checklist__summary::after {
    transform: translateY(2px) rotate(225deg);
}

.lw-checklist__summary:focus-visible {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
    border-radius: var(--lw-radius-card);
}

.lw-checklist__summary i {
    color: var(--lw-blue);
}

.lw-checklist__time {
    color: var(--lw-ink-3);
    font-size: 0.875rem;
    font-weight: 500;
}

.lw-checklist__body {
    padding: 0 16px 12px;
}

.lw-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--lw-blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lw-link:hover {
    color: var(--lw-navy);
}

.apply-checklist {
    display: grid;
    gap: 14px;
}

.apply-checklist__label {
    margin: 0 0 4px;
    color: var(--lw-ink-3);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.apply-checklist__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.apply-checklist__list li {
    display: flex;
    gap: 8px;
    padding: 3px 0;
    color: var(--lw-ink-2);
    line-height: 1.4;
}

.apply-checklist__list i {
    flex: 0 0 auto;
    margin-top: 4px;
    color: var(--lw-green);
    font-size: 0.8125rem;
}

.apply-checklist__group--optional .apply-checklist__list i {
    color: var(--lw-ink-3);
}

.apply-checklist__note {
    margin: 0;
    color: var(--lw-ink-3);
    font-size: 0.875rem;
}

/* -----------------------------------------------------------------------------
   Fields
   ----------------------------------------------------------------------------- */
.lw .loan-form-group {
    margin-bottom: 18px;
}

.lw .loan-form-label {
    display: block;
    margin: 0 0 6px;
    color: var(--lw-ink);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: normal;
    text-transform: none;
}

.lw .loan-form-label .required,
.lw .lw-legend .required {
    margin-left: 2px;
    color: var(--lw-red);
}

.lw .loan-form-control {
    display: block;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 14px 16px;
    border: 2px solid var(--lw-line);
    border-radius: var(--lw-radius);
    background-color: #fff;
    box-shadow: none;
    color: var(--lw-ink);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.3;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.lw .loan-form-control::placeholder {
    color: #6b778c;
    opacity: 1;
}

.lw .loan-form-control:hover {
    border-color: #5f6b80;
}

.lw .loan-form-control:focus {
    outline: none;
    border-color: var(--lw-blue);
    box-shadow: var(--lw-focus);
}

.lw .loan-form-control[readonly] {
    background-color: var(--lw-surface);
    color: var(--lw-ink-2);
}

.lw .loan-form-control.is-invalid {
    border-color: var(--lw-red-line);
}

.lw .loan-form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2);
}

/* avedson.css pins every select to 32px below 768px, and the font size is
   set with !important in two places. */
.lw select.loan-form-control {
    height: auto;
    min-height: 56px;
    padding: 14px 44px 14px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath fill='none' stroke='%23334155' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 3 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    font-size: 1rem !important;
    line-height: 1.3;
}

.lw input[type="date"].loan-form-control {
    text-align: left;
}

.lw input[type="date"].loan-form-control::-webkit-date-and-time-value {
    text-align: left;
}

.lw .loan-input-group {
    display: flex;
    align-items: stretch;
}

.lw .loan-input-group .input-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 2px solid var(--lw-line);
    border-right: 0;
    border-radius: var(--lw-radius) 0 0 var(--lw-radius);
    background: var(--lw-surface);
    color: var(--lw-ink-2);
    font-weight: 700;
}

.lw .loan-input-group .loan-form-control {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 0 var(--lw-radius) var(--lw-radius) 0;
}

.lw .loan-input-group:focus-within .input-prefix {
    border-color: var(--lw-blue);
}

.lw .loan-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 16px;
}

/* A date box can't shrink below its content; without this it pushed past
   the edge of a 320px screen. */
.lw .loan-form-row > * {
    min-width: 0;
}

.lw .loan-form-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 6px 0 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--lw-red);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    animation: none;
}

.lw .loan-form-error i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--lw-red);
    font-size: 0.9375rem;
}

.lw .lw-help {
    margin: -2px 0 10px;
    color: var(--lw-ink-3);
    font-size: 0.875rem;
    line-height: 1.45;
}

.lw .lw-help--section {
    margin: -6px 0 16px;
    font-size: 0.9375rem;
}

.lw .lw-subhead {
    display: block;
    float: none;
    width: 100%;
    margin: 28px 0 14px;
    padding: 20px 0 0;
    border-top: 1px solid var(--lw-line-soft);
    color: var(--lw-ink);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.lw .lw-step__body > .lw-subhead:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.lw .lw-docs__label {
    margin: 0 0 4px;
    color: var(--lw-ink);
    font-weight: 700;
}

.lw .loan-optional-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #eef1f6;
    color: var(--lw-ink-3);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: 2px;
}

.lw .lw-fieldset {
    min-width: 0;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.lw .lw-legend {
    float: none;
    width: auto;
    margin: 0 0 8px;
    padding: 0;
    color: var(--lw-ink);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
}

/* -----------------------------------------------------------------------------
   Choice cards: marital status, home, co-signer, payment method
   ----------------------------------------------------------------------------- */
.lw-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.lw-choices--pay {
    grid-template-columns: minmax(0, 1fr);
}

.lw-choice {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

/* Hidden but still focusable: arrow keys move between the cards. */
.lw-choice__input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.lw-choice__body {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 100%;
    min-height: 56px;
    padding: 12px 44px 12px 14px;
    border: 2px solid var(--lw-line-soft);
    border-radius: var(--lw-radius-card);
    background: #fff;
    color: var(--lw-ink);
    line-height: 1.25;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.lw-choice__dot {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border: 2px solid #6b778c;
    border-radius: 50%;
    background: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.lw-choice__icon {
    display: block;
    margin-bottom: 4px;
    color: var(--lw-blue);
    font-size: 1.25rem;
    line-height: 1;
}

.lw-choice__title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
}

.lw-choice__desc {
    display: block;
    color: var(--lw-ink-3);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Icon cards: the dot moves to the top corner, beside the icon. */
.lw-choice--icon .lw-choice__body {
    justify-content: flex-start;
    padding: 14px;
}

.lw-choice--icon .lw-choice__dot {
    top: 12px;
    margin-top: 0;
}

.lw-choice--icon .lw-choice__icon {
    margin-bottom: 10px;
}

/* Payment: icon on the left on a phone. */
.lw-choice--pay .lw-choice__body {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-content: center;
    column-gap: 12px;
    padding-right: 48px;
}

.lw-choice--pay .lw-choice__icon {
    grid-row: 1 / span 2;
    align-self: center;
    margin: 0;
    font-size: 1.375rem;
    text-align: center;
}

/* Autopay: the payment method we recommend. */
.lw-choice__tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--lw-yellow);
    color: var(--lw-navy);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.5;
    vertical-align: 1px;
}

.lw-choice--recommended .lw-choice__body {
    border-color: #f2c200;
}

.lw-choice:hover .lw-choice__body {
    border-color: #9aa5b8;
}

.lw-choice__input:checked + .lw-choice__body {
    border-color: var(--lw-blue);
    background: #f2f6ff;
    box-shadow: inset 0 0 0 1px var(--lw-blue);
}

.lw-choice__input:checked + .lw-choice__body .lw-choice__dot {
    border-color: var(--lw-blue);
    background: var(--lw-blue);
    box-shadow: inset 0 0 0 4px #fff;
}

.lw-choice__input:focus-visible + .lw-choice__body {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
}

.lw-choice__input:disabled + .lw-choice__body {
    cursor: not-allowed;
    opacity: 0.55;
}

/* A required question left unanswered (new or existing customer). */
.lw-choice__input.is-invalid + .lw-choice__body {
    border-color: var(--lw-red-line);
}

.lw-choice-clear,
.lw-text-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 2px;
    border: 0;
    background: none;
    color: var(--lw-blue);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lw-choice-clear[hidden] {
    display: none;
}

.lw-choice-clear:focus-visible,
.lw-text-btn:focus-visible {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

.lw-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: var(--lw-radius-card);
    background: #eaf6ee;
    color: #0f5132;
}

.lw-note[hidden] {
    display: none;
}

.lw-note i {
    margin-top: 4px;
    color: var(--lw-green);
}

/* "Add a character reference" */
.lw-more {
    margin: 4px 0 18px;
    border: 1px solid var(--lw-line-soft);
    border-radius: var(--lw-radius-card);
}

.lw-more__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-height: 56px;
    padding: 12px 16px;
    color: var(--lw-blue);
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.lw-more__summary::-webkit-details-marker {
    display: none;
}

.lw-more__summary::before {
    content: '+';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef4ff;
    font-size: 1.125rem;
    line-height: 1;
}

.lw-more[open] .lw-more__summary::before {
    content: '\2212';
}

.lw-more__summary:focus-visible {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
    border-radius: var(--lw-radius-card);
}

.lw-more__body {
    padding: 0 16px 2px;
}

/* -----------------------------------------------------------------------------
   Guest email card (steps/guest-email-card)
   ----------------------------------------------------------------------------- */
.lw .loan-guest-email {
    margin-bottom: 24px;
    padding: 16px;
    border: 2px solid rgba(0, 70, 190, 0.22);
    border-radius: var(--lw-radius-card);
    background: #f4f8ff;
}

.loan-guest-trap {
    position: absolute;
    top: auto;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.loan-guest-email__head {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.loan-guest-email__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--lw-blue);
    color: #fff;
}

.lw .loan-guest-email__title {
    margin: 0 0 4px;
    color: var(--lw-ink);
    font-size: 1.125rem;
    font-weight: 700;
}

.loan-guest-email__lead {
    margin: 0;
    color: var(--lw-ink-2);
    font-size: 0.9375rem;
    line-height: 1.45;
}

.loan-guest-email__row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loan-guest-email__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--lw-radius);
    background: var(--lw-blue);
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 700;
    white-space: nowrap;
}

.loan-guest-email__btn:hover {
    background: var(--lw-blue-dark);
}

.loan-guest-email__btn:focus-visible {
    outline: 3px solid var(--lw-navy);
    outline-offset: 2px;
}

.loan-guest-email__btn:disabled {
    opacity: 0.7;
}

.loan-guest-email__code {
    margin-top: 16px;
}

.loan-guest-email__sent {
    margin: 0 0 10px;
    color: var(--lw-ink-2);
    font-size: 0.9375rem;
}

/* Stronger than mobile-enhancements.css, which pins every phone input to 16px. */
.lw .loan-guest-email input.loan-guest-email__code-input {
    font-size: 1.5rem !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.35em;
    text-align: center;
}

.loan-guest-email__help {
    margin: 10px 0 0;
    padding: 0;
    color: var(--lw-ink-3);
    font-size: 0.9375rem;
    list-style: none;
}

.loan-guest-email__help li + li {
    margin-top: 2px;
}

.loan-guest-email__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--lw-blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.loan-guest-email__link:disabled {
    color: #6b778c;
    text-decoration: none;
}

.loan-guest-email__verified {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--lw-green);
    font-weight: 700;
}

.loan-guest-email__verified .loan-guest-email__link {
    margin-left: 4px;
}

.loan-guest-email__status {
    margin-top: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
}

.loan-guest-email__status:empty {
    display: none;
}

.loan-guest-email__note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 70, 190, 0.15);
    color: var(--lw-ink-3);
    font-size: 0.875rem;
    line-height: 1.5;
}

.loan-guest-email__note a,
.loan-guest-email__recaptcha a {
    color: var(--lw-blue);
    font-weight: 700;
    text-decoration: underline;
}

.loan-guest-email__recaptcha {
    margin: 8px 0 0;
    color: var(--lw-ink-3);
    font-size: 0.75rem;
}

/* Replaced by the attribution text above: the badge would sit under the
   bottom buttons. Google allows hiding it when that text is shown. */
.grecaptcha-badge {
    visibility: hidden;
}

/* -----------------------------------------------------------------------------
   ZIP code picker (steps/borrower-profile-form)
   ----------------------------------------------------------------------------- */
.lw .loan-zip-picker {
    margin: -6px 0 18px;
    padding: 14px;
    border: 1px solid var(--lw-line-soft);
    border-radius: var(--lw-radius-card);
    background: var(--lw-surface);
}

.loan-zip-picker[hidden],
.loan-zip-filled[hidden] {
    display: none;
}

.loan-zip-picker__label {
    margin: 0 0 10px;
    color: var(--lw-ink-2);
    font-size: 0.9375rem;
    font-weight: 700;
}

.loan-zip-picker__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.loan-zip-option {
    min-width: 96px;
    min-height: 48px;
    padding: 8px 16px;
    border: 2px solid var(--lw-line);
    border-radius: var(--lw-radius);
    background: #fff;
    color: var(--lw-ink);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.loan-zip-option[aria-pressed="true"] {
    border-color: var(--lw-blue);
    background: var(--lw-blue);
    color: #fff;
}

.loan-zip-option:focus-visible {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
}

.lw .loan-zip-filled {
    margin: -8px 0 18px;
    color: var(--lw-green);
    font-size: 0.875rem;
    font-weight: 700;
}

/* -----------------------------------------------------------------------------
   Documents step: skip button and upload tiles (partials/upload-tile)
   ----------------------------------------------------------------------------- */
.lw .loan-skip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    margin: 0 0 24px;
    padding: 12px 16px;
    border: 2px dashed #9aa5b8;
    border-radius: var(--lw-radius-card);
    background: #fff;
    color: var(--lw-blue);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.lw .loan-skip-btn:hover {
    border-color: var(--lw-blue);
    background: #f4f8ff;
}

.lw .loan-skip-btn:focus-visible {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
}

.lw .loan-skip-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.lw-tiles {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.lw-tile-cell {
    min-width: 0;
}

.lw .lw-tile {
    position: relative;
    padding: 12px 14px;
    border: 2px dashed #9aa5b8;
    border-radius: var(--lw-radius-card);
    background: var(--lw-surface);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

/* The real file input covers the tile: a tap anywhere opens the picker. */
.lw .lw-tile input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.lw-tile__face {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    pointer-events: none;
}

.lw-tile__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    color: var(--lw-blue);
    font-size: 1.25rem;
}

.lw-tile__text {
    min-width: 0;
}

.lw-tile__title {
    display: block;
    color: var(--lw-ink);
    font-weight: 700;
}

.lw-tile__hint {
    display: block;
    color: var(--lw-ink-3);
    font-size: 0.875rem;
}

.lw .lw-tile:hover {
    border-color: var(--lw-blue);
}

.lw .lw-tile:focus-within {
    border-color: var(--lw-blue);
    box-shadow: var(--lw-focus);
}

.lw .lw-tile.is-filled {
    border-style: solid;
    border-color: var(--lw-green);
    background: #f0faf4;
}

.lw .lw-tile.is-filled .lw-tile__icon {
    color: var(--lw-green);
}

.lw .lw-tile.has-error {
    border-style: solid;
    border-color: var(--lw-red-line);
    background: #fff5f5;
}

/* Above the file input, so it can be tapped. */
.lw-tile__remove {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    margin-top: 8px;
    padding: 0 14px;
    border: 1px solid var(--lw-line-soft);
    border-radius: 999px;
    background: #fff;
    color: var(--lw-ink-2);
    font-size: 0.875rem;
    font-weight: 700;
}

.lw-tile__remove[hidden] {
    display: none;
}

.lw-tile__remove:hover {
    border-color: var(--lw-red-line);
    color: var(--lw-red);
}

.lw-tile__remove:focus-visible {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
}

.lw .loan-file-preview-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.lw .loan-file-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    font-size: 0.875rem;
}

.lw .loan-file-preview-item .file-icon {
    flex: 0 0 auto;
    color: var(--lw-blue);
    font-size: 1.25rem;
}

.lw .loan-file-preview-item .file-icon .fa-file-pdf {
    color: var(--lw-red);
}

.lw .loan-file-preview-item .file-icon .fa-file-image {
    color: var(--lw-green);
}

.lw .loan-file-preview-item .file-info {
    flex: 1 1 auto;
    min-width: 0;
}

.lw .loan-file-preview-item .file-name,
.lw .loan-file-preview-item .file-size {
    display: block;
}

.lw .loan-file-preview-item .file-name {
    overflow: hidden;
    color: var(--lw-ink);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lw .loan-file-preview-item .file-size {
    color: var(--lw-ink-3);
    font-size: 0.8125rem;
}

.lw .loan-file-preview-item .file-status {
    flex: 0 0 auto;
    color: var(--lw-green);
    font-size: 1.125rem;
}

.lw .loan-file-preview-item.is-oversized .file-size {
    color: var(--lw-red);
    font-weight: 700;
}

.lw .loan-file-preview-item.is-oversized .file-status {
    color: var(--lw-red-line);
}

.lw #step-4-errors {
    margin-top: 12px;
}

/* -----------------------------------------------------------------------------
   Signatures
   ----------------------------------------------------------------------------- */
.lw .loan-signature-wrapper {
    position: relative;
    padding: 8px;
    border: 2px dashed #9aa5b8;
    border-radius: var(--lw-radius-card);
    background: #f8fafc;
    touch-action: none;
}

.lw .loan-signature-wrapper.has-signature {
    border-style: solid;
    border-color: var(--lw-green);
}

.lw .loan-signature-wrapper.has-error {
    border-style: solid;
    border-color: var(--lw-red-line);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}

.lw .loan-signature-canvas {
    display: block;
    width: 100%;
    height: 180px;
    border-radius: 10px;
    cursor: crosshair;
    touch-action: none;
}

/* A signing line, like on paper. Gone once there is a signature. */
.lw-sign__placeholder {
    position: absolute;
    right: 24px;
    bottom: 26px;
    left: 24px;
    padding-top: 6px;
    border-top: 2px dotted #b7c0cf;
    color: #6b778c;
    font-size: 0.875rem;
    pointer-events: none;
}

.loan-signature-wrapper.has-signature .lw-sign__placeholder {
    display: none;
}

.lw .loan-signature-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

/* -----------------------------------------------------------------------------
   Last step: info cards, referral code, agreement, tips
   ----------------------------------------------------------------------------- */
.lw .loan-info-card {
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid #d6e2fb;
    border-radius: var(--lw-radius-card);
    background: #f4f8ff;
    color: var(--lw-ink-2);
}

.lw .loan-info-card .info-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    color: var(--lw-navy);
    font-weight: 700;
}

.lw .loan-info-card .info-text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.lw .loan-info-card.warning {
    margin: 0 0 18px;
    border-color: #ffe08a;
    background: #fff8e1;
}

.lw .loan-info-card.warning .info-title {
    color: #6b4f00;
}

.lw-inline-field {
    display: flex;
    gap: 8px;
}

.lw-inline-field .loan-form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.lw-inline-field__btn {
    flex: 0 0 auto;
    min-height: 56px;
    padding: 0 18px;
    border: 2px solid var(--lw-blue);
    border-radius: var(--lw-radius);
    background: #fff;
    color: var(--lw-blue);
    font-weight: 700;
}

.lw-inline-field__btn:hover {
    background: #f4f8ff;
}

.lw-inline-field__btn:focus-visible {
    outline: 3px solid var(--lw-blue);
    outline-offset: 2px;
}

.lw #loan-referral-feedback {
    margin: 6px 0 0;
}

.lw #loan-referral-feedback:empty {
    display: none;
}

.lw .loan-acknowledgement {
    margin: 0 0 18px;
    padding: 14px;
    border: 2px solid var(--lw-line-soft);
    border-radius: var(--lw-radius-card);
    background: var(--lw-surface);
}

.lw .loan-acknowledgement .form-check {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.lw .loan-acknowledgement .form-check-input {
    flex: 0 0 auto;
    float: none;
    width: 26px;
    height: 26px;
    margin: 0;
    border: 2px solid var(--lw-line);
    border-radius: 6px;
    cursor: pointer;
}

.lw .loan-acknowledgement .form-check-input:checked {
    border-color: var(--lw-blue);
    background-color: var(--lw-blue);
}

.lw .loan-acknowledgement .form-check-input:focus {
    border-color: var(--lw-blue);
    box-shadow: var(--lw-focus);
}

.lw .loan-acknowledgement .form-check-input.is-invalid {
    border-color: var(--lw-red-line);
}

.lw .loan-acknowledgement .form-check-label {
    color: var(--lw-ink-2);
    font-size: 0.875rem;
    line-height: 1.5;
    cursor: pointer;
}

.lw .loan-acknowledgement .form-check-label a {
    color: var(--lw-blue);
    font-weight: 700;
    text-decoration: underline;
}

.lw-tips {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: var(--lw-radius-card);
    background: var(--lw-surface);
}

.lw-tips__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    color: var(--lw-ink);
    font-weight: 700;
}

.lw-tips__title i {
    color: var(--lw-blue);
}

.lw-tips__list {
    margin: 0 0 8px;
    padding-left: 1.2rem;
    color: var(--lw-ink-2);
    font-size: 0.9375rem;
}

.lw-tips__list li + li {
    margin-top: 2px;
}

.lw-tips__help {
    margin: 0;
    color: var(--lw-ink-2);
    font-size: 0.9375rem;
}

.lw-certify {
    margin: 0 !important;
    color: var(--lw-ink-3);
    font-size: 0.875rem;
}

/* -----------------------------------------------------------------------------
   Back / Continue (partials/step-actions)
   Fixed to the bottom on a phone; under the step from 992px. z-index under
   Bootstrap's modals (1055), so pop-ups cover it.
   ----------------------------------------------------------------------------- */
.lw-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--lw-line-soft);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease;
}

.lw-actions__inner {
    display: flex;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto;
}

.lw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 18px;
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lw-btn:focus-visible {
    outline: 3px solid var(--lw-navy);
    outline-offset: 2px;
}

.lw-btn--back {
    flex: 0 0 auto;
    background: #eef1f6;
    color: var(--lw-ink);
}

.lw-btn--back:hover {
    background: #e2e7ef;
    color: var(--lw-ink);
}

.lw-btn--next,
.lw-btn--submit {
    flex: 1 1 auto;
}

.lw-btn--next,
.lw-btn--primary {
    background: var(--lw-blue);
    color: #fff;
}

.lw-btn--next:hover,
.lw-btn--primary:hover {
    background: var(--lw-blue-dark);
    color: #fff;
}

.lw-btn--submit {
    background: var(--lw-yellow);
    color: var(--lw-navy);
}

.lw-btn--submit:hover {
    background: #f2c200;
    color: var(--lw-navy);
}

.lw-btn--ghost {
    border-color: var(--lw-blue);
    background: #fff;
    color: var(--lw-blue);
}

.lw-btn--ghost:hover {
    background: #f4f8ff;
    color: var(--lw-blue);
}

.lw-btn:disabled,
.lw-btn.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Typing on a phone: the keyboard covers the bar anyway, and Enter moves on. */
body.lw-typing .lw-actions {
    transform: translateY(calc(100% + 8px));
}

/* Fields scrolled into view (focus, Tab) clear the fixed bar. */
@media (max-width: 991.98px) {
    html {
        scroll-padding-bottom: calc(var(--lw-actions-h) + 16px);
    }

    body.lw-focus #cookie-consent-banner {
        bottom: calc(var(--lw-actions-h) + env(safe-area-inset-bottom, 0px));
    }
}

/* -----------------------------------------------------------------------------
   "Please fill in…" message (customer-apply-loan.js)
   ----------------------------------------------------------------------------- */
.loan-validation-toast {
    position: fixed;
    bottom: calc(var(--lw-actions-h) + 12px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    z-index: 1090;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--lw-red);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
    transform: translateX(-50%);
    animation: lw-toast-in 0.25s ease-out;
}

.loan-validation-toast i {
    margin-top: 3px;
}

.loan-validation-toast.is-leaving {
    animation: lw-toast-out 0.25s ease-in forwards;
}

@keyframes lw-toast-in {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes lw-toast-out {
    to { opacity: 0; transform: translate(-50%, 10px); }
}

/* -----------------------------------------------------------------------------
   Terms pop-up (terms-modal.blade.php has its own header styles)
   ----------------------------------------------------------------------------- */
.loan-terms-modal .modal-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.loan-terms-modal .modal-body p {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.loan-terms-modal .modal-body ul {
    padding-left: 1.25rem;
}

/* -----------------------------------------------------------------------------
   "Application received" (customer/loan-applications/received)
   ----------------------------------------------------------------------------- */
.lw-received {
    min-height: 0;
    padding-bottom: 40px;
    background: var(--lw-surface);
}

.lw-received__band {
    padding: 32px 16px 56px;
    background: var(--lw-band);
    color: #fff;
    text-align: center;
}

.lw-received__band-inner {
    max-width: 640px;
    margin: 0 auto;
}

.lw-received__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--lw-yellow);
    box-shadow: 0 0 0 6px rgba(255, 206, 0, 0.25);
    color: var(--lw-navy);
}

.lw-received__check svg {
    width: 30px;
    height: 30px;
}

.lw-received__title {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.lw-received__lead {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.0625rem;
}

.lw-received__ref {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    margin: 14px 0 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.9375rem;
}

.lw-received__ref strong {
    color: var(--lw-yellow);
    letter-spacing: 0.04em;
}

.lw-received__body {
    position: relative;
    max-width: 640px;
    margin: -32px auto 0;
    padding: 0 16px;
}

.lw-received__card {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.lw-received__account {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #c9d9fb;
    border-radius: var(--lw-radius-card);
    background: #eef4ff;
    color: var(--lw-ink);
    line-height: 1.5;
}

.lw-received__account i {
    margin-top: 4px;
    color: var(--lw-blue);
}

.lw-received__steps-title {
    margin: 0 0 14px;
    color: var(--lw-ink);
    font-size: 1.25rem;
    font-weight: 700;
}

.lw-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lw-timeline__item {
    position: relative;
    display: flex;
    gap: 14px;
    padding-bottom: 20px;
}

.lw-timeline__item:last-child {
    padding-bottom: 0;
}

.lw-timeline__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    bottom: 4px;
    left: 17px;
    width: 2px;
    background: var(--lw-line-soft);
}

.lw-timeline__item.is-done:not(:last-child)::after {
    background: var(--lw-yellow);
}

.lw-timeline__marker {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--lw-blue);
    border-radius: 50%;
    background: #fff;
    color: var(--lw-blue);
    font-weight: 700;
}

.lw-timeline__item.is-done .lw-timeline__marker {
    border-color: var(--lw-yellow);
    background: var(--lw-yellow);
    color: var(--lw-navy);
}

.lw-timeline__marker svg {
    width: 16px;
    height: 16px;
}

.lw-timeline__content {
    min-width: 0;
    padding-top: 6px;
    color: var(--lw-ink-2);
    line-height: 1.5;
}

.lw-timeline__content strong {
    display: block;
    color: var(--lw-ink);
}

.lw-received__guide {
    margin: 6px 0 0;
}

.lw-received__actions {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.lw-received__actions .lw-btn {
    width: 100%;
}

.lw-received__help {
    margin: 20px 0 0;
    color: var(--lw-ink-3);
    font-size: 0.9375rem;
    text-align: center;
}

.lw-received__help a {
    color: var(--lw-blue);
    font-weight: 700;
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   576px and up
   ----------------------------------------------------------------------------- */
@media (min-width: 576px) {
    .lw-plan__note-more {
        display: inline;
    }

    .lw-stepper__text {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    .lw .loan-form-row.two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lw-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lw-tiles--single {
        grid-template-columns: minmax(0, 1fr);
    }

    .lw .loan-guest-email {
        padding: 20px;
    }

    .loan-guest-email__row {
        flex-direction: row;
        align-items: stretch;
    }

    .loan-guest-email__row .loan-form-control {
        flex: 1;
    }

    .lw-received__card {
        padding: 20px;
    }

    .lw-received__actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* -----------------------------------------------------------------------------
   768px and up
   ----------------------------------------------------------------------------- */
@media (min-width: 768px) {
    .lw-aside {
        padding: 24px 24px 44px;
    }

    .lw-main {
        padding: 32px 24px calc(var(--lw-actions-h) + 40px);
    }

    .lw-plan__media {
        width: 64px;
        height: 64px;
    }

    .lw-plan__name {
        font-size: 1.125rem;
    }

    .lw-step__title {
        font-size: 2rem;
    }

    .lw-step__lead {
        font-size: 1.0625rem;
    }

    .lw-choices--4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lw-choices--pay {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lw-choice--pay .lw-choice__body {
        display: flex;
        justify-content: flex-start;
        padding: 14px;
    }

    .lw-choice--pay .lw-choice__icon {
        align-self: flex-start;
        margin-bottom: 10px;
        text-align: left;
    }

    .lw-choice--pay .lw-choice__dot {
        top: 12px;
        margin-top: 0;
    }

    .apply-checklist {
        grid-template-columns: 1fr 1fr;
    }

    .apply-checklist__note {
        grid-column: 1 / -1;
    }

    .lw-received__band {
        padding: 48px 24px 72px;
    }

    .lw-received__title {
        font-size: 2.25rem;
    }

    .lw-received__body {
        margin-top: -44px;
    }
}

/* -----------------------------------------------------------------------------
   992px and up: buttons under the step, bigger fields
   ----------------------------------------------------------------------------- */
@media (min-width: 992px) {
    :root {
        --lw-topbar-h: 67px;
    }

    html {
        scroll-padding-top: calc(var(--lw-topbar-h) + 16px);
    }

    .lw-main {
        padding-bottom: 56px;
    }

    .lw .loan-form-control,
    .lw select.loan-form-control {
        min-height: 60px;
        font-size: 1.0625rem !important;
    }

    .lw-inline-field__btn {
        min-height: 60px;
    }

    .lw-actions {
        position: static;
        margin-top: 32px;
        padding: 24px 0 0;
        border-top: 1px solid var(--lw-line-soft);
        background: none;
        box-shadow: none;
        transform: none !important;
    }

    .lw-actions__inner {
        max-width: none;
    }

    .lw-btn {
        min-width: 200px;
        min-height: 60px;
        padding: 0 28px;
        font-size: 1.125rem;
    }

    .lw-btn--next,
    .lw-btn--submit {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .loan-validation-toast {
        bottom: 32px;
    }
}

/* -----------------------------------------------------------------------------
   1200px and up: sticky side panel with a vertical step list
   ----------------------------------------------------------------------------- */
@media (min-width: 1200px) {
    .lw {
        display: grid;
        grid-template-columns: minmax(320px, 27vw) minmax(0, 1fr);
    }

    /* The received page is one column at every width: band on top, card
       centred under it. The form's side-panel grid split it in two. */
    .lw.lw-received {
        display: block;
    }

    .lw-aside {
        padding: 40px 32px;
    }

    .lw-aside__inner {
        position: sticky;
        top: calc(var(--lw-topbar-h) + 32px);
        display: flex;
        flex-direction: column;
        max-width: 420px;
        max-height: calc(100vh - var(--lw-topbar-h) - 64px);
        margin: 0;
        overflow-y: auto;
    }

    .lw-plan {
        align-items: flex-start;
    }

    .lw-plan__media {
        width: 72px;
        height: 72px;
    }

    .lw-plan__name {
        font-size: 1.25rem;
        -webkit-line-clamp: 3;
    }

    .lw-stepper {
        margin-top: 32px;
    }

    .lw-stepper__list {
        flex-direction: column;
    }

    .lw-stepper__item {
        flex: none;
        justify-content: flex-start;
        padding-bottom: 20px;
    }

    .lw-stepper__item:last-child {
        padding-bottom: 0;
    }

    /* Item = 52px button + 20px gap; the line joins the two circle centres. */
    .lw-stepper__item + .lw-stepper__item::before {
        top: -46px;
        right: auto;
        left: 25px;
        width: 2px;
        height: 72px;
        background-size: 100% 0;
    }

    .lw-stepper__item.is-passed + .lw-stepper__item::before {
        background-size: 100% 100%;
    }

    .lw-stepper__btn {
        flex-direction: row;
        gap: 12px;
        text-align: left;
    }

    .lw-stepper__dot {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lw-stepper__label {
        font-size: 1rem;
    }

    .lw-stepper__sub {
        display: block;
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.8125rem;
        font-weight: 500;
    }

    .lw-aside__help {
        display: block;
        margin-top: 32px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }

    .lw-main {
        margin-top: 0;
        padding: 48px 56px 64px;
        border-radius: 0;
    }

    .lw-step__title {
        font-size: 2.5rem;
    }

    .lw-step__lead {
        font-size: 1.125rem;
    }
}

/* -----------------------------------------------------------------------------
   Reduced motion, print
   ----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .lw *,
    .lw *::before,
    .lw *::after,
    .loan-validation-toast {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto !important;
    }
}

@media print {
    .lw-aside,
    .lw-actions,
    .loan-validation-toast {
        display: none !important;
    }

    .lw {
        display: block;
    }

    .lw-main {
        margin: 0;
        padding: 0;
    }
}
