/** .mortgage-services-page SPECIFIC STYLES **/
.mortgage-services-page .label {
    background-color: var(--gray2);
    color: var(--black-text);
}

.mortgage-services-page .sticky-side-header {
    gap: 24px;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.mortgage-services-page .sticky-side-header img {
    max-height: 80vh;
    width: 100%;
}

.mortgage-services-page .step {
    padding: 40px 40px 48px;
    border-bottom: solid 1px var(--gray-line);
}

.mortgage-services-page .step:first-child {
    border-top: solid 1px var(--gray-line);
}

.mortgage-services-page .step .label {
    margin-bottom: 24px;
}

.mortgage-services-page .step .large-text {
    margin-bottom: 8px;
}

.mortgage-services-page .flex-center {
    max-width: none;
}

/** Sticky side grid sections **/
.mortgage-services-page .mortgage-services-grid-with-sticky-side {
    display: grid;
    grid-template-columns: 2fr 3fr;
    grid-auto-flow: column;
    column-gap: 80px;
}

.mortgage-services-page .mortgage-services-grid-with-sticky-side > .btn:last-child {
    display: none;
}

.mortgage-services-page .mortgage-services-grid-with-sticky-side .sticky-side-header {
    position: sticky;
    top: 140px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mortgage-services-page .mortgage-services-grid-with-sticky-side .sticky-side-header h2 {
    line-height: 1;
}

.mortgage-services-page .mortgage-services-grid-with-sticky-side .list-of-steps { 
    grid-row-start: 1;
    grid-row-end: 4;
}

/** LOAN OPTIONS **/
.mortgage-services-page .loan-options-section .loan-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    outline: solid 2px white;
    outline-offset: -1px;
}

.mortgage-services-page .loan-options-section .loan-options-grid-item {
    text-align: center;
    padding: 36px;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
    justify-content: start;
    border: solid 0.5px var(--gray-line);
    transition: background-color 300ms ease;
}

/** CHECKLIST FILTERS **/
.mortgage-services-page .documents-checklist-section {
    gap: 60px;
    text-align: left;
}

.mortgage-services-page .documents-checklist-section .filters .filter-label {
    display: block;
    font-size: 24px;
    font-weight: 300;
    text-align: center;
    margin-bottom: 24px;
}

.mortgage-services-page .documents-checklist-section input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mortgage-services-page .documents-checklist-section .filters label {
    font-size: 16px;
    width: fit-content;
    padding: 12px 16px;
    margin-bottom: 8px;
    text-transform: uppercase;
    background-color: var(--gray1);
    border-radius: 8px;
    margin: 4px;
    transition: background-color 300ms ease;
}

.mortgage-services-page .documents-checklist-section .filters input[type="radio"]:checked + label {
    background-color: var(--mardel-teal);
    color: white;
}

.mortgage-services-page .documents-checklist-section .filters input[type="radio"]:not(:checked) + label:hover {
    background-color: var(--gray3);
    cursor: pointer;
}

/** INTERACTIVE CHECKLIST **/
.mortgage-services-page .documents-checklist-section .checklist {
    border-top: solid 1px var(--gray-line);
    width: fit-content;
}

.mortgage-services-page .documents-checklist-section .checklist li {
    position: relative;
}

.mortgage-services-page .documents-checklist-section .checklist label {
    display: flex;
    padding: 20px 8px 20px 0;
    width: 60vw;
    max-width: 1200px;
    border-bottom: solid 1px var(--gray-line);
    transition: background-color 300ms ease;
}

.mortgage-services-page .documents-checklist-section .checklist .label-text {
    display: flex;
    flex-direction: column;
    padding: 2px 0 2px 18px;
    border-left: solid 1px var(--gray3);
    transition: border-color 100ms ease, border-width 100ms ease, margin-left 300ms ease;
}

.mortgage-services-page .documents-checklist-section .checklist .label-text .small-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-bold-text);
    margin-bottom: 2px;
}

.mortgage-services-page .documents-checklist-section .checklist label:hover {
    cursor: pointer;
}

.mortgage-services-page .documents-checklist-section .checklist li.purchase-requirement .label-text {
    margin-left: 152px;
}

.mortgage-services-page .documents-checklist-section .checklist li.refinance-requirement .label-text {
    margin-left: 64px;
}

.mortgage-services-page .documents-checklist-section:has(#refinance:checked) li.refinance-requirement .label-text {
    margin-left: 152px;
}

.mortgage-services-page .documents-checklist-section .checklist li::before {
    content: "";
    color: white;
    position: absolute;
    left: 16px;
    top: 20px;
    justify-self: center;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 100%;
    border: solid 1px var(--gray-line);
    pointer-events: none;
}

.mortgage-services-page .documents-checklist-section .checklist label:hover {
    background-color: var(--gray2);
    cursor: pointer;
}

.mortgage-services-page .documents-checklist-section .checklist label:hover .label-text {
    border-color: var(--mardel-teal);
    border-width: 4px;
}

.mortgage-services-page .documents-checklist-section .checklist .required-text-marker {
    position: absolute;
    top: 24px;
    left: 62px;
    font-weight: 700;
    color: var(--mardel-magenta);
    pointer-events: none;
}

.mortgage-services-page .documents-checklist-section li.refinance-requirement .required-text-marker {
    display: none;
}

.mortgage-services-page .documents-checklist-section:has(#refinance:checked) li.refinance-requirement .required-text-marker {
    display: block;
}

.mortgage-services-page .documents-checklist-section .checklist li:has(input[type="checkbox"]:checked)::before {
    background-color: var(--mardel-magenta);
    border-color: var(--mardel-magenta);
    background-image: url("/assets/icons-and-logos/check-mark.png");
    background-size: 100%;
}




/*______________MORTGAGE CALC Start____________*/


.mortgage-calculator-section {
    padding: 64px 24px;
}

.mortgage-calculator {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
    margin-top: 24px;
}

.mortgage-calculator-panel,
.mortgage-chart-panel {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 20px;
}

.mortgage-form {
    display: grid;
    gap: 16px;
}

.mortgage-field {
    display: grid;
    gap: 8px;
}

.mortgage-field label,
.mortgage-row-label {
    font-size: 1rem;
    font-weight: 600;
}

.mortgage-input,
.mortgage-select {
    width: 100%;
    height: 50px;
    font-size: 1rem;
    padding: 10px 14px;
    border: 2px solid #bdbdbd;
    border-radius: 0;
    box-sizing: border-box;
    background: #fff;
}

.mortgage-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mortgage-loan-row {
    display: grid;
    grid-template-columns: auto 1px 1fr;
    align-items: center;
    column-gap: 10px;
    padding: 10px 0;
}

.mortgage-loan-divider {
    width: 1px;
    height: 25px;
    background: #2f2f2f;
    display: block;
}

.mortgage-loan-value {
    font-weight: 700;
}

.mortgage-term-toggle {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mortgage-term-btn {
    min-width: 140px;
    padding: 12px 16px;
    border: 1px solid #bdbdbd;
    background: #fff;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
}

.mortgage-term-btn.active {
    background: #005d86;
    color: #fff;
    border-color: #005d86;
}

.mortgage-toggle-link {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    width: fit-content;
    color: inherit;
}

.mortgage-toggle-panel {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    margin-top: 8px;
}

.mortgage-slider-row {
    display: grid;
    gap: 8px;
}

.mortgage-slider-label {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.mortgage-range {
    width: 100%;
}

.mortgage-chart-wrap {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.mortgage-chart-box {
    width: 100%;
    height: 320px;
    position: relative;
}

.mortgage-chart-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    flex-direction: column;
    transform: translateY(8px);
}

.mortgage-chart-total {
    font-size: 22px;
    font-weight: 700;
}

.mortgage-chart-subtitle {
    font-size: 16px;
    opacity: 0.7;
}

.mortgage-legend {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.mortgage-legend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    width: fit-content;
}

.mortgage-legend-item {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    column-gap: 10px;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    min-width: 280px;
}

.mortgage-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.mortgage-legend-value {
    font-weight: 600;
    text-align: right;
}

[hidden] {
    display: none !important;
}

.mortgage-input-wrap {
    position: relative;
    width: 100%;
}

.mortgage-input-wrap .mortgage-input {
    width: 100%;
}

.mortgage-input-symbol {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}

.mortgage-input-wrap-left .mortgage-input-symbol {
    left: 14px;
}

.mortgage-input-wrap-right .mortgage-input-symbol {
    right: 14px;
}

.mortgage-input-wrap-left .mortgage-input {
    padding-left: 32px;
}

.mortgage-input-wrap-right .mortgage-input {
    padding-right: 32px;
}

#down-payment-percent {
    -moz-appearance: textfield;
}

#down-payment-percent::-webkit-outer-spin-button,
#down-payment-percent::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/*______________MORTGAGE CALC END____________*/



/*______________MORTGAGE CALC MEDIA QUERIES ____________*/
@media (max-width: 1100px) {
    .mortgage-calculator {
        grid-template-columns: 1fr;
    }
}
/*______________MORTGAGE CALC END____________*/



/** MEDIA QUERIES **/
@media screen and (max-width: 1100px) {
    .mortgage-services-page .mortgage-services-grid-with-sticky-side {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .mortgage-services-page .mortgage-services-grid-with-sticky-side .sticky-side-header {
        position: static;
        width: 95%;
        min-width: 600px;
        padding-left: 40px;
        padding-right: 40px;
        text-align: center;
    }

    .mortgage-services-page .mortgage-services-grid-with-sticky-side .sticky-side-header > .btn {
        display: none;
    }

    .mortgage-services-page .mortgage-services-grid-with-sticky-side > .btn:last-child {
        display: block;
    }

    .mortgage-services-page .mortgage-services-grid-with-sticky-side .list-of-steps {
        width: 95%;
        min-width: 600px;
    }

    .mortgage-services-page .loan-options-section .loan-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mortgage-services-page .documents-checklist-section .checklist label {
        width: 80vw;
    }
}

@media screen and (max-width: 680px) {
    .mortgage-services-page .mortgage-services-grid-with-sticky-side .sticky-side-header {
        min-width: 0px;
        width: 100%;
        padding-right: 16px;
        padding-left: 16px;
    }

    .mortgage-services-page .mortgage-services-grid-with-sticky-side .sticky-side-header > img {
        object-fit: contain;
    }

    .mortgage-services-page .mortgage-services-grid-with-sticky-side .list-of-steps {
        display: block;
        padding: 0;
        width: 100%;
        min-width: 0px;
    }

    .mortgage-services-page .mortgage-services-grid-with-sticky-side .list-of-steps .step {
        padding-right: 16px;
        padding-left: 16px;
    }

    .mortgage-services-page .loan-options-section .loan-options-grid {
        grid-template-columns: repeat(1, 1fr);
        outline: none;
        row-gap: 24px;
    }

    .mortgage-services-page .loan-options-section .loan-options-grid .loan-options-grid-item {
        border: none;
        border: solid 1px var(--gray-line);
    }

    .mortgage-services-page .documents-checklist-section .checklist label {
        width: 85vw;
    }
}

@media screen and (max-width: 480px) {
    .mortgage-services-page .mortgage-services-grid-with-sticky-side .sticky-side-header,
    .mortgage-services-page .mortgage-services-grid-with-sticky-side .list-of-steps .step {
        padding-right: 0px;
        padding-left: 0px;
    }

    .mortgage-services-page .documents-checklist-section .checklist label {
        width: 90vw;
    }
}
