﻿.digital-loan-page {
    background: linear-gradient(135deg, #4037a5 0%, #5149bd 55%, #7264d0 100%);
    min-height: 100vh;
    padding: 45px 0 55px;
}

.digital-loan-hero {
    text-align: center;
    color: #fff;
    margin-bottom: 38px;
}

    .digital-loan-hero h1 {
        color: #fff;
        font-size: 36px;
        font-weight: 800;
        margin: 0 0 12px;
    }

        .digital-loan-hero h1 span {
            color: #ffd447;
        }

    .digital-loan-hero p {
        color: #f2f1ff;
        font-size: 18px;
        margin-bottom: 24px;
    }

.digital-loan-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

    .digital-loan-badges span {
        border: 1px solid rgba(255,255,255,.35);
        background: rgba(255,255,255,.12);
        border-radius: 30px;
        padding: 11px 20px;
        color: #fff;
        font-weight: 600;
    }

.digital-loan-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto 35px;
}

.digital-progress-step {
    min-width: 95px;
    text-align: center;
    color: #e8e7ff;
}

    .digital-progress-step span {
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #dddcef;
        color: #777;
        font-weight: 700;
    }

    .digital-progress-step.active span {
        background: #fff;
        color: #4a40ad;
    }

    .digital-progress-step small {
        display: block;
        margin-top: 7px;
        font-size: 13px;
    }

.digital-progress-line {
    flex: 1;
    height: 2px;
    margin-top: 19px;
    background: rgba(255,255,255,.35);
}

.digital-card {
    background: #f7f7fd;
    border-radius: 32px;
    padding: 42px 45px;
    max-width: 900px;
    margin: auto;
    box-shadow: 0 15px 45px rgba(26,20,91,.18);
}

.digital-step-badge {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 16px;
    border-radius: 30px;
    background: rgba(74,64,173,.10);
    color: #4a40ad;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.digital-card h2 {
    color: #343078;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
}

.digital-subtitle {
    color: #777;
    font-size: 17px;
    margin-bottom: 30px;
}

.digital-option-grid {
    display: grid;
    gap: 18px;
}

.digital-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    border: 2px solid #e0e0e8;
    border-radius: 25px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: .2s ease;
}

    .digital-option.selected {
        border-color: #4a40ad;
        background: #eeedff;
        box-shadow: 0 5px 18px rgba(74,64,173,.10);
    }

.digital-option-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #f4f4fa;
    font-size: 30px;
    flex-shrink: 0;
}

.digital-option.selected .digital-option-icon {
    background: #4a40ad;
}

.digital-option-content {
    flex: 1;
}

    .digital-option-content strong {
        display: block;
        color: #343078;
        font-size: 23px;
        margin-bottom: 5px;
    }

    .digital-option-content small {
        display: block;
        color: #777;
        font-size: 15px;
        line-height: 1.5;
    }

.digital-check {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4a40ad;
    color: #fff;
    opacity: 0;
    font-weight: 800;
}

.digital-option.selected .digital-check {
    opacity: 1;
}

.digital-navigation {
    max-width: 900px;
    margin: 28px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

    .digital-navigation.single-button {
        justify-content: flex-end;
    }

.digital-back-btn, .digital-next-btn {
    min-width: 210px;
    padding: 17px 30px;
    border-radius: 18px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.digital-back-btn {
    border: 1px solid rgba(255,255,255,.65);
    background: #fff;
    color: #555;
}

.digital-next-btn {
    border: 0;
    background: #4a40ad;
    color: #fff;
    box-shadow: 0 10px 25px rgba(30,20,110,.24);
}

    .digital-next-btn span {
        margin-left: 12px;
        font-size: 22px;
    }

.digital-amount-card {
    text-align: center;
}

.digital-amount-label {
    color: #888;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 700;
    margin-top: 35px;
}

.digital-selected-amount {
    color: #4a40ad;
    font-size: 54px;
    font-weight: 800;
    margin: 12px 0 35px;
}

.digital-slider-wrap {
    max-width: 700px;
    margin: auto;
}

    .digital-slider-wrap input {
        width: 100%;
        accent-color: #4a40ad;
        cursor: pointer;
    }

.digital-range-labels {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 14px;
    margin-top: 10px;
}

.digital-quick-amounts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 35px;
}

    .digital-quick-amounts button {
        border: 1px solid #d8d7e5;
        background: #fff;
        color: #4a40ad;
        border-radius: 12px;
        padding: 10px 16px;
        font-weight: 700;
        cursor: pointer;
    }

        .digital-quick-amounts button.active, .digital-quick-amounts button:hover {
            background: #4a40ad;
            color: #fff;
            border-color: #4a40ad;
        }

.digital-info-note {
    margin: 28px auto 0;
    max-width: 650px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #efeff7;
    color: #777;
    font-size: 13px;
}

.digital-loan-footer-note {
    color: #fff;
    text-align: center;
    margin: 28px 0 0;
    font-size: 13px;
}

@media (max-width: 767px) {
    .digital-loan-page {
        padding: 30px 0 40px;
    }

    .digital-loan-hero h1 {
        font-size: 28px;
        line-height: 1.25;
    }

    .digital-loan-hero p {
        font-size: 15px;
    }

    .digital-loan-badges span {
        padding: 9px 12px;
        font-size: 12px;
    }

    .digital-progress-step {
        min-width: 50px;
    }

        .digital-progress-step span {
            width: 32px;
            height: 32px;
            font-size: 12px;
        }

        .digital-progress-step small {
            font-size: 10px;
        }

    .digital-card {
        padding: 28px 18px;
        border-radius: 25px;
    }

        .digital-card h2 {
            font-size: 25px;
        }

    .digital-subtitle {
        font-size: 15px;
    }

    .digital-option {
        padding: 16px 14px;
        gap: 12px;
        border-radius: 18px;
    }

    .digital-option-icon {
        width: 54px;
        height: 54px;
        border-radius: 15px;
        font-size: 23px;
    }

    .digital-option-content strong {
        font-size: 18px;
    }

    .digital-option-content small {
        font-size: 12px;
    }

    .digital-check {
        width: 30px;
        height: 30px;
    }

    .digital-navigation {
        padding: 0 8px;
        gap: 10px;
    }

    .digital-back-btn, .digital-next-btn {
        min-width: 0;
        flex: 1;
        padding: 14px 12px;
        font-size: 15px;
    }

    .digital-selected-amount {
        font-size: 38px;
    }

    .digital-quick-amounts {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

        .digital-quick-amounts button {
            width: 100%;
        }
}

/* Updated Step 4, Step 5 and lender offer styles */
.digital-step-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #777;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
}

    .digital-step-top b {
        color: #2fc978;
    }

.digital-progress-track {
    height: 10px;
    background: #e9e9f5;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
}

.digital-progress-fill {
    height: 100%;
    background: #4a40ad;
    border-radius: 20px;
}

.digital-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4a40ad;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 28px 0 18px;
}

    .digital-section-heading:after {
        content: "";
        flex: 1;
        height: 1px;
        background: #d5d5df;
    }

.digital-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 20px;
}

    .digital-form-grid label {
        display: block;
        color: #707070;
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .digital-form-grid input {
        width: 100%;
        border: 1px solid #dedee7;
        border-radius: 18px;
        padding: 16px 18px;
        background: #fff;
        color: #444;
        font-size: 16px;
        outline: none;
    }

        .digital-form-grid input:focus {
            border-color: #4a40ad;
            box-shadow: 0 0 0 3px rgba(74,64,173,.10);
        }

.digital-summary-box {
    background: #fff;
    border: 1px solid #e1e1eb;
    border-radius: 24px;
    padding: 20px 24px;
}

    .digital-summary-box .digital-section-heading {
        margin-top: 0;
    }

    .digital-summary-box p {
        display: flex;
        justify-content: space-between;
        gap: 15px;
        margin: 16px 0;
        color: #707070;
        font-size: 17px;
    }

        .digital-summary-box p b {
            color: #4a40ad;
            text-align: right;
        }

.digital-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 28px;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    cursor: pointer;
}

    .digital-consent-row input {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        accent-color: #4a40ad;
        margin-top: 3px;
    }

.digital-next-btn:disabled {
    background: #d2d2d9;
    color: #777;
    box-shadow: none;
    cursor: not-allowed;
}

.digital-offers-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.digital-offers-title {
    color: #fff;
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    margin: 35px 0 22px;
}

.digital-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 28px;
    padding: 15px 24px;
    font-size: 28px;
    color: #777;
}

    .digital-search-box input {
        flex: 1;
        border: 0;
        outline: 0;
        font-size: 19px;
        color: #555;
    }

.digital-offers-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    margin: 22px 0;
}

.digital-best-badge {
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 14px;
}

.digital-lender-card {
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    margin: 22px 0;
    box-shadow: 0 10px 30px rgba(20,15,80,.12);
}

.digital-lender-logo {
    min-height: 170px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #2d4b9a;
    font-size: 45px;
    font-weight: 800;
    padding: 25px;
    background: #f8f8fc;
}

    .digital-lender-logo small {
        font-size: 32px;
        color: #35a94b;
        margin-left: 8px;
    }

    .digital-lender-logo span {
        color: #333;
        font-size: 45px;
        font-weight: 500;
        margin-left: 12px;
    }

.digital-lender-body {
    padding: 25px 30px 30px;
}

    .digital-lender-body h3 {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: center;
        color: #3d378d;
        font-size: 25px;
        margin: 0 0 20px;
    }

        .digital-lender-body h3 span {
            color: #777;
            background: #eeeef2;
            border-radius: 15px;
            padding: 10px 14px;
            font-size: 12px;
        }

    .digital-lender-body h4 {
        color: #655ab1;
        font-size: 20px;
        margin: 0 0 18px;
    }

.digital-offer-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e1e1eb;
    border-radius: 22px;
    padding: 20px 25px;
    background: linear-gradient(90deg,#f4f3ff,#fffbed);
    color: #777;
    font-size: 20px;
}

    .digital-offer-amount b {
        color: #40389b;
        font-size: 28px;
    }

.digital-proceed-btn {
    width: 100%;
    border: 0;
    border-radius: 25px;
    background: #ffbd13;
    color: #3c348e;
    font-size: 20px;
    font-weight: 800;
    padding: 18px;
    margin-top: 22px;
    cursor: pointer;
}

@media (max-width:767px) {
    .digital-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .digital-step-top {
        font-size: 14px;
    }

    .digital-summary-box {
        padding: 15px;
    }

        .digital-summary-box p {
            font-size: 14px;
        }

    .digital-consent-row {
        font-size: 13px;
    }

    .digital-offers-title {
        font-size: 27px;
    }

    .digital-offers-count {
        font-size: 17px;
    }

    .digital-lender-body {
        padding: 20px;
    }

        .digital-lender-body h3 {
            font-size: 20px;
            align-items: flex-start;
            flex-direction: column;
        }

    .digital-offer-amount {
        padding: 16px;
        font-size: 15px;
    }

        .digital-offer-amount b {
            font-size: 22px;
        }

    .digital-lender-logo, .digital-lender-logo span {
        font-size: 32px;
    }
}

/* SEARCH FILTER - ALL DEVICES */
.digital-lender-card.digital-hidden {
    display: none !important;
}

/* =========================================================
   UPDATED LENDER OFFERS - TWO CARDS PER ROW
   Existing HTML structure supported
========================================================= */

/* Lender Grid */
.digital-lenders-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 25px;
    align-items: start;
}

    /* Lender Card */
    .digital-lenders-grid .digital-lender-card {
        display: block !important;
        width: 100%;
        min-width: 0;
        margin: 0;
    }

    .digital-lenders-grid .digital-lender-logo {
        min-height: 145px;
        padding: 22px 15px;
        font-size: 34px;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        .digital-lenders-grid .digital-lender-logo small {
            font-size: 26px;
            white-space: nowrap;
        }

        .digital-lenders-grid .digital-lender-logo span {
            font-size: 34px;
            margin-left: 8px;
            white-space: nowrap;
        }

    .digital-lenders-grid .digital-lender-body {
        flex: 1;
        min-width: 0;
        padding: 22px;
        display: flex;
        flex-direction: column;
    }

        .digital-lenders-grid .digital-lender-body h3 {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            gap: 10px;
            min-width: 0;
            color: #3d378d;
            font-size: 22px;
            line-height: 1.3;
            margin: 0 0 18px;
            word-break: normal;
            overflow-wrap: normal;
        }

            .digital-lenders-grid .digital-lender-body h3 > span {
                display: block;
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                padding: 9px 12px;
                border-radius: 15px;
                background: #eeeef2;
                color: #777;
                font-size: 11px;
                font-weight: 500;
                line-height: 1.4;
                text-align: center;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                word-break: normal;
                overflow-wrap: normal;
            }

        .digital-lenders-grid .digital-lender-body h4 {
            color: #655ab1;
            font-size: 18px;
            line-height: 1.4;
            margin: 0 0 15px;
            white-space: nowrap;
        }

    .digital-lenders-grid .digital-offer-amount {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-width: 0;
        padding: 16px;
        border: 1px solid #e1e1eb;
        border-radius: 20px;
        background: linear-gradient(90deg, #f4f3ff, #fffbed);
    }

        .digital-lenders-grid .digital-offer-amount span,
        .digital-lenders-grid .digital-offer-amount b {
            white-space: nowrap;
            word-break: normal;
            overflow-wrap: normal;
        }

        .digital-lenders-grid .digital-offer-amount span {
            color: #777;
            font-size: 14px;
        }

        .digital-lenders-grid .digital-offer-amount b {
            color: #40389b;
            font-size: 21px;
            flex-shrink: 0;
        }

    .digital-lenders-grid .digital-proceed-btn {
        width: 100%;
        margin-top: auto;
        padding: 15px 12px;
        border: 0;
        border-radius: 20px;
        background: #ffbd13;
        color: #3c348e;
        font-size: 18px;
        font-weight: 800;
        line-height: 1.3;
        white-space: nowrap;
        cursor: pointer;
        transition: .25s ease;
    }

        .digital-lenders-grid .digital-proceed-btn:hover {
            background: #f5aa00;
            transform: translateY(-2px);
        }

/* Keep the search and heading full width */
.digital-offers-wrapper .digital-search-box,
.digital-offers-wrapper .digital-offers-count,
.digital-offers-wrapper .digital-offers-title {
    width: 100%;
    box-sizing: border-box;
}

/* Tablet */
@media (max-width: 991px) and (min-width: 768px) {
    .digital-lenders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

        .digital-lenders-grid .digital-lender-body {
            padding: 18px;
        }

        .digital-lenders-grid .digital-lender-logo,
        .digital-lenders-grid .digital-lender-logo span {
            font-size: 28px;
        }

            .digital-lenders-grid .digital-lender-logo small {
                font-size: 22px;
            }

        .digital-lenders-grid .digital-lender-body h3 {
            font-size: 19px;
        }

        .digital-lenders-grid .digital-offer-amount {
            padding: 13px;
        }

            .digital-lenders-grid .digital-offer-amount span {
                font-size: 12px;
            }

            .digital-lenders-grid .digital-offer-amount b {
                font-size: 18px;
            }
}

/* Mobile - one card per row */
@media (max-width: 767px) {
    .digital-lenders-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

        .digital-lenders-grid .digital-lender-card {
            border-radius: 26px;
        }

        .digital-lenders-grid .digital-lender-logo {
            min-height: 135px;
            font-size: 32px;
        }

            .digital-lenders-grid .digital-lender-logo span {
                font-size: 32px;
            }

            .digital-lenders-grid .digital-lender-logo small {
                font-size: 25px;
            }

        .digital-lenders-grid .digital-lender-body {
            padding: 20px;
        }

            .digital-lenders-grid .digital-lender-body h3 {
                font-size: 20px;
            }

                .digital-lenders-grid .digital-lender-body h3 > span {
                    font-size: 11px;
                }

        .digital-lenders-grid .digital-offer-amount {
            padding: 16px;
        }

            .digital-lenders-grid .digital-offer-amount span {
                font-size: 14px;
            }

            .digital-lenders-grid .digital-offer-amount b {
                font-size: 21px;
            }
}

/* =========================================================
   IMPORTANT FIX: KEEP LENDER GRID HIDDEN UNTIL OFFERS OPEN
   Current HTML places .digital-lenders-grid outside #digitalOffers.
   JavaScript should add .digital-offers-visible when offers are shown.
========================================================= */

.digital-lenders-grid {
    display: none !important;
    width: 100%;
    max-width: 100%;
    margin: 24px auto 0;
    padding: 0;
    box-sizing: border-box;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

    .digital-lenders-grid.digital-offers-visible {
        display: grid !important;
    }

    .digital-lenders-grid .digital-lender-card {
        width: 100%;
        min-width: 0;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        overflow: hidden;
        border-radius: 28px;
        background: #fff;
        word-break: normal;
        overflow-wrap: normal;
    }

    .digital-lenders-grid .digital-lender-logo {
        min-height: 145px;
        padding: 22px 16px;
        font-size: 32px;
        line-height: 1.2;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        .digital-lenders-grid .digital-lender-logo span,
        .digital-lenders-grid .digital-lender-logo small {
            white-space: normal;
            overflow-wrap: normal;
            word-break: normal;
        }

        .digital-lenders-grid .digital-lender-logo span {
            font-size: 32px;
            margin-left: 6px;
        }

        .digital-lenders-grid .digital-lender-logo small {
            font-size: 25px;
        }

    .digital-lenders-grid .digital-lender-body {
        flex: 1 1 auto;
        min-width: 0;
        padding: 22px;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

        .digital-lenders-grid .digital-lender-body h3 {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            gap: 10px;
            margin: 0 0 18px;
            color: #3d378d;
            font-size: 21px;
            line-height: 1.35;
            word-break: normal;
            overflow-wrap: normal;
        }

            .digital-lenders-grid .digital-lender-body h3 span {
                display: block;
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                padding: 9px 12px;
                border-radius: 15px;
                background: #eeeef2;
                color: #777;
                font-size: 11px;
                font-weight: 500;
                line-height: 1.4;
                text-align: center;
                white-space: normal;
                overflow-wrap: normal;
                word-break: normal;
            }

        .digital-lenders-grid .digital-lender-body h4 {
            margin: 0 0 15px;
            color: #655ab1;
            font-size: 18px;
            line-height: 1.4;
        }

    .digital-lenders-grid .digital-offer-amount {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-width: 0;
        padding: 16px;
        border: 1px solid #e1e1eb;
        border-radius: 20px;
        background: linear-gradient(90deg, #f4f3ff, #fffbed);
    }

        .digital-lenders-grid .digital-offer-amount span,
        .digital-lenders-grid .digital-offer-amount b {
            white-space: nowrap;
            word-break: normal;
            overflow-wrap: normal;
        }

        .digital-lenders-grid .digital-offer-amount span {
            color: #777;
            font-size: 14px;
        }

        .digital-lenders-grid .digital-offer-amount b {
            flex-shrink: 0;
            color: #40389b;
            font-size: 21px;
        }

    .digital-lenders-grid .digital-proceed-btn {
        width: 100%;
        margin-top: auto;
        padding: 15px 12px;
        border: 0;
        border-radius: 20px;
        background: #ffbd13;
        color: #3c348e;
        font-size: 18px;
        font-weight: 800;
        line-height: 1.3;
        white-space: nowrap;
        cursor: pointer;
    }

@media (max-width: 991px) and (min-width: 768px) {
    .digital-lenders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

        .digital-lenders-grid .digital-lender-body {
            padding: 18px;
        }

        .digital-lenders-grid .digital-lender-logo,
        .digital-lenders-grid .digital-lender-logo span {
            font-size: 27px;
        }

            .digital-lenders-grid .digital-lender-logo small {
                font-size: 21px;
            }
}

@media (max-width: 767px) {
    .digital-lenders-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

        .digital-lenders-grid .digital-lender-logo {
            min-height: 135px;
            font-size: 30px;
        }

            .digital-lenders-grid .digital-lender-logo span {
                font-size: 30px;
            }

            .digital-lenders-grid .digital-lender-logo small {
                font-size: 24px;
            }

        .digital-lenders-grid .digital-lender-body {
            padding: 20px;
        }

        .digital-lenders-grid .digital-offer-amount b {
            font-size: 20px;
        }
}

/* =========================================================
   FINAL FIX - LENDER OFFERS VISIBILITY AND TWO-COLUMN ALIGNMENT
   IMPORTANT: .digitalOffers is hidden initially. The grid must
   become visible only when #digitalOffers has inline display:block.
========================================================= */

/* Keep the lender grid hidden until the offers section is opened. */
.digital-offers-wrapper .digital-lenders-grid {
    display: none !important;
}

/* Show lender cards only after showDigitalOffers() opens the wrapper. */
.digital-offers-wrapper[style*="display: block"] .digital-lenders-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 100%;
    margin: 24px auto 0;
    align-items: stretch;
}

/* Equal-height cards and clean alignment. */
.digital-offers-wrapper[style*="display: block"] .digital-lender-card {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    word-break: normal;
    overflow-wrap: normal;
}

.digital-offers-wrapper[style*="display: block"] .digital-lender-logo {
    min-height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 22px 16px;
    line-height: 1.2;
    white-space: normal;
    overflow: hidden;
    box-sizing: border-box;
}

.digital-offers-wrapper[style*="display: block"] .digital-lender-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    box-sizing: border-box;
}

    .digital-offers-wrapper[style*="display: block"] .digital-lender-body h3 {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin: 0 0 18px;
        line-height: 1.35;
        word-break: normal;
        overflow-wrap: normal;
    }

        .digital-offers-wrapper[style*="display: block"] .digital-lender-body h3 span {
            display: block;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            text-align: center;
            white-space: normal;
            overflow-wrap: normal;
            word-break: normal;
        }

.digital-offers-wrapper[style*="display: block"] .digital-offer-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

    .digital-offers-wrapper[style*="display: block"] .digital-offer-amount span,
    .digital-offers-wrapper[style*="display: block"] .digital-offer-amount b {
        white-space: nowrap;
        word-break: normal;
        overflow-wrap: normal;
    }

.digital-offers-wrapper[style*="display: block"] .digital-proceed-btn {
    width: 100%;
    margin-top: auto;
    white-space: nowrap;
}

/* Tablet */
@media (max-width: 991px) and (min-width: 768px) {
    .digital-offers-wrapper[style*="display: block"] .digital-lenders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .digital-offers-wrapper[style*="display: block"] .digital-lender-body {
        padding: 18px;
    }
}

/* Mobile: one card per row for readable content. */
@media (max-width: 767px) {
    .digital-offers-wrapper[style*="display: block"] .digital-lenders-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .digital-offers-wrapper[style*="display: block"] .digital-lender-body {
        padding: 20px;
    }

    .digital-offers-wrapper[style*="display: block"] .digital-lender-logo {
        min-height: 135px;
    }
}



/* ==========================================
   BUSINESS DETAILS - SELECT FIX
   ========================================== */

#digitalSelfEmployedDetails
.digital-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 28px;
    width: 100%;
}

    #digitalSelfEmployedDetails
    .digital-form-grid > div {
        min-width: 0;
        width: 100%;
    }

/* Business labels */

#digitalSelfEmployedDetails label {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

/* Business dropdown */

#digitalSelfEmployedDetails select {
    display: block;
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 16px;
    border: 1px solid #d9d9e5;
    border-radius: 14px;
    background-color: #fff;
    color: #444;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    #digitalSelfEmployedDetails select:focus {
        border-color: #4b3fb5;
        box-shadow: 0 0 0 3px rgba(75, 63, 181, 0.10);
    }

/* Business registration full width */

#digitalSelfEmployedDetails
#businessRegistrationType {
    width: 100%;
}


/* ==========================================
   EXTRA BUSINESS FIELDS
   ========================================== */

#digitalBusinessExtraFields {
    width: 100%;
    margin-top: 22px;
}

    #digitalBusinessExtraFields
    .digital-form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 28px;
    }


/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 767px) {

    #digitalSelfEmployedDetails
    .digital-form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #digitalBusinessExtraFields
    .digital-form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #digitalSelfEmployedDetails select {
        width: 100%;
        height: 58px;
        font-size: 16px;
        border-radius: 16px;
    }

    #digitalSelfEmployedDetails label {
        font-size: 15px;
        margin-bottom: 8px;
    }
}


/* ==========================================
   DROPDOWN ARROW FIX
   ========================================== */

#digitalSelfEmployedDetails select {
    width: 100%;
    height: 58px;
    padding: 0 40px 0 16px;
    border: 1px solid #d8d8e6;
    border-radius: 16px;
    background-color: #ffffff;
    color: #35336f;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
    cursor: pointer;
}

/* Remove browser default arrow */

#digitalSelfEmployedDetails select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

    /* Focus */

    #digitalSelfEmployedDetails select:focus {
        outline: none;
        border-color: #4b3fb5;
    }


/* MOBILE */

@media (max-width: 767px) {

    #digitalSelfEmployedDetails select {
        width: 100%;
        height: 58px;
        padding: 0 40px 0 14px;
        border-radius: 16px;
    }
}

/* ==========================================
   FINAL LENDER LOGO ALIGNMENT FIX
========================================== */

.digital-lenders-grid .digital-lender-logo {
    width: 100% !important;
    height: 125px !important;
    min-height: 125px !important;
    max-height: 125px !important;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #ffffff !important;
    font-size: 0 !important;
    line-height: 1 !important;
}

    .digital-lenders-grid .digital-lender-logo img {
        display: block !important;
        width: auto !important;
        height: auto !important;
        max-width: 75% !important;
        max-height: 90px !important;
        object-fit: contain !important;
        object-position: center !important;
        margin: 0 auto !important;
    }





/* ==========================================
   CUSTOM DOB CALENDAR
   ========================================== */

.custom-dob-wrapper {
    position: relative;
    width: 100%;
}

.custom-dob-input {
    width: 100%;
    cursor: pointer;
    background: #fff;
}

.custom-dob-calendar {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 290px;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    z-index: 99999;
    padding: 10px;
}

    .custom-dob-calendar.show {
        display: block;
    }

.custom-dob-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#dobMonthYear {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.dob-nav-btn {
    width: 34px !important;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: #f1f1f1;
    color: #333;
    font-size: 22px;
    cursor: pointer;
    padding: 0 !important;
}

    .dob-nav-btn:hover {
        background: #e4e4e4;
    }

.custom-dob-weekdays,
.custom-dob-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

    .custom-dob-weekdays span {
        font-size: 12px;
        font-weight: 700;
        color: #777;
        padding: 7px 0;
    }

    .custom-dob-days button {
        width: 34px !important;
        height: 34px;
        margin: 2px auto;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #333;
        cursor: pointer;
        padding: 0 !important;
        font-size: 13px;
    }

        .custom-dob-days button:hover {
            background: #eee;
        }

        .custom-dob-days button.other-month {
            color: #aaa;
        }

        .custom-dob-days button.today {
            border: 1px solid #4b3bbd;
        }

        .custom-dob-days button.selected {
            background: #4b3bbd;
            color: #fff;
        }

.custom-dob-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

    .custom-dob-footer button {
        border: 0;
        background: transparent;
        color: #4b3bbd;
        font-weight: 600;
        cursor: pointer;
        padding: 5px 8px;
    }


/* ==========================================
   DOB YEAR SELECTOR
   ========================================== */

#dobMonthYear {
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    user-select: none;
}

    #dobMonthYear:hover {
        background: #f1f1f1;
    }

.custom-dob-year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 230px;
    overflow-y: auto;
    padding: 5px;
}

    .custom-dob-year-grid button {
        border: 0;
        background: transparent;
        border-radius: 6px;
        padding: 9px 4px;
        cursor: pointer;
        font-size: 13px;
    }

        .custom-dob-year-grid button:hover {
            background: #eee;
        }

        .custom-dob-year-grid button.selected {
            background: #4b3bbd;
            color: #fff;
            font-weight: 700;
        }

        .custom-dob-year-grid button.current-year {
            border: 1px solid #4b3bbd;
        }
/* =========================================================
   FINAL LAYOUT FIX - AGENT FIXED HEADER + LEFT SIDEBAR
   ---------------------------------------------------------
   The Agent layout has a fixed top header and a fixed left
   sidebar. The loan page itself must reserve that space so
   the hero/content is not hidden behind either element.

   Existing loan/card/lender styles are kept intact.
   These rules only correct the page positioning/centering.
========================================================= */

@media (min-width: 992px) {

    .digital-loan-page {
        /* Reserve the fixed Agent header and sidebar space. */
        padding-top: 125px !important;
        padding-left: 250px !important;
        padding-right: 0 !important;
        box-sizing: border-box;
        width: 100%;
        position: relative;
        z-index: 1;
    }

        /* Keep the complete loan content inside the usable area. */
        .digital-loan-page > .container {
            width: 100%;
            max-width: 1140px;
            margin-left: auto;
            margin-right: auto;
            padding-left: 15px;
            padding-right: 15px;
            box-sizing: border-box;
        }

        /* Make every main step/card stay centered in the content area. */
        .digital-loan-page .digital-step-content {
            width: 100%;
            box-sizing: border-box;
        }

        .digital-loan-page .digital-card {
            width: 100%;
            max-width: 900px;
            margin-left: auto !important;
            margin-right: auto !important;
            box-sizing: border-box;
        }

        .digital-loan-page .digital-navigation {
            width: 100%;
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
            box-sizing: border-box;
        }

        /* Offers section also remains centered after the sidebar. */
        .digital-loan-page .digital-offers-wrapper {
            width: 100%;
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
            box-sizing: border-box;
        }
}

/* =========================================================
   TABLET / MOBILE
   ---------------------------------------------------------
   On smaller screens the desktop sidebar spacing must not be
   applied. Keep the original responsive behavior intact.
========================================================= */

@media (max-width: 991px) {

    .digital-loan-page {
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box;
    }

        .digital-loan-page > .container {
            width: 100%;
            max-width: 100%;
            padding-left: 0;
            padding-right: 0;
            box-sizing: border-box;
        }

        .digital-loan-page .digital-card,
        .digital-loan-page .digital-navigation,
        .digital-loan-page .digital-offers-wrapper {
            width: 100%;
            box-sizing: border-box;
        }
}

/* =========================================================
   PREVENT HORIZONTAL OVERFLOW
========================================================= */

.digital-loan-page,
.digital-loan-page * {
    box-sizing: border-box;
}
