/* Load AFTER custom-styles.css. All overrides are scoped to this homepage block. */
body.custom-page-home .homepage-widgets.rates-form.home-quote-section {
    position: relative;
    bottom: auto;
    z-index: 2;
    width: calc(100% - 40px);
    max-width: 1140px;
    margin: -140px auto 100px;
    padding: 0;
    box-sizing: border-box;
}

body.custom-page-home .home-quote-section .home-quote-card {
    position: relative;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 25px;
    box-shadow: 0 14px 38px rgb(0 0 0 / 11%);
    box-sizing: border-box;
}

body.custom-page-home .home-quote-section .home-quote-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 32px 8px 85px;
    overflow: visible;
    z-index: 1;
    border-radius: 15px;
    background: linear-gradient(150deg, #ffb600 0%, #ffc900 65%, #ffbf00 100%);
}

body.custom-page-home .home-quote-section .home-quote-art::before {
    content: '';
    position: absolute;
    border-radius: 50%;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse, rgb(255 244 152 / 60%), transparent 70%);
}

body.custom-page-home .home-quote-section .home-quote-art > img {
    position: relative;
    display: block;
    width: 100%;
    max-width: 240px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    transform-origin: 50% 75%;
    animation: homeQuoteCartSway 4s ease-in-out infinite;
    will-change: transform;
}

@keyframes homeQuoteCartSway {
    0%, 100% {
        transform: translateX(32px) rotate(-3deg);
    }
    50% {
        transform: translateX(32px) rotate(3deg);
    }
}

body.custom-page-home .home-quote-section .home-quote-main.hidden-pricing-redirect-form {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 30px 30px 30px 70px;
    background: transparent;
    border: 0;
    box-shadow: none;
    box-sizing: border-box;
}

body.custom-page-home .home-quote-section .home-quote-heading h2 {
    margin: 0 0 8px;
    color: #ffc001;
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 700;
    line-height: 1.3;
    background-image: linear-gradient(
            110deg,
            #b87900 0%,
            #e5a300 25%,
            #ffc001 50%,
            #e5a300 75%,
            #b87900 100%
    );
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: homeQuoteTitleGold 6s ease-in-out infinite;
}

@keyframes homeQuoteTitleGold {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.custom-page-home .home-quote-section .home-quote-heading h2 {
        animation: none;
        background-position: 50% 50%;
    }
}

body.custom-page-home .home-quote-section .home-quote-heading p {
    margin: 0 0 30px;
    color: #686868;
    font-size: 12px;
}

body.custom-page-home .home-quote-section #homepageRateQuoteForm {
    margin: 0;
}

body.custom-page-home .home-quote-section .form-content.home-quote-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px 20px;
    width: 100%;
    margin: 0;
    padding: 0;
}

body.custom-page-home .home-quote-section .home-quote-fields > .home-quote-field {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    grid-column: auto;
    box-sizing: border-box;
}

body.custom-page-home .home-quote-section .home-quote-field > label {
    display: block;
    margin: 0 0 3px;
    color: #5a5a5a;
    font-size: 12px;
    font-weight: 500;
}

body.custom-page-home .home-quote-section .home-quote-field .relative {
    position: relative;
}

body.custom-page-home .home-quote-section .home-quote-field input:not([type='hidden']),
body.custom-page-home .home-quote-section .home-quote-field .custom-select-trigger {
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 3px 16px;
    border: 1px solid #c6c6c6;
    border-radius: 8px;
    background: #fff;
    color: #5a5a5a;
    font-size: 15px;
    box-shadow: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

body.custom-page-home .home-quote-section .home-quote-field .custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
}

body.custom-page-home .home-quote-section .home-down-payment-control:focus-within,
body.custom-page-home .home-quote-section .home-quote-field input:focus,
body.custom-page-home .home-quote-section .custom-select-wrapper.open .custom-select-trigger {
    background-color: #fff;
    border-color: #ffc001;
    outline: none;
}

body.custom-page-home .home-quote-section .home-property-value input,
body.custom-page-home .home-quote-section .home-loan-amount input {
    padding-left: 50px !important;
    padding-right: 16px !important;
}

body.custom-page-home .home-quote-section .home-money-prefix {
    position: absolute;
    top: 50%;
    left: 16px;
    padding-right: 12px;
    border-right: 1px solid #e5e7eb;
    color: #777;
    font-size: 15px;
    line-height: 20px;
    transform: translateY(-50%);
    pointer-events: none;
}

body.custom-page-home .home-quote-section .home-quote-field p.validate-text-form-quote,
body.custom-page-home .home-quote-section .home-quote-field p.noted-text-down,
body.custom-page-home .home-quote-section .home-quote-field p.noted-text-zip-code-custom {
    font-size: 12px;
    font-weight: 400;
    color: #cecece;
    line-height: 1.2;
    min-height: 15px;
    margin-top: 5px;
}

body.custom-page-home .home-quote-section .home-quote-field.has-error > label {
    color: #D32F2F;
}

body.custom-page-home .home-quote-section .home-quote-field.has-error .field-error,
body.custom-page-home .home-quote-section .home-quote-field p.noted-text-zip-code-custom.error {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
    color: #D32F2F;
    margin-top: 5px;
}

body.custom-page-home .home-quote-section .validate-text-form-quote {
    display: none;
    color: #D32F2F;
}

body.custom-page-home .home-quote-section .noted-text-down,
body.custom-page-home .home-quote-section .noted-text-zip-code-custom {
    color: #999;
}

body.custom-page-home .home-quote-section .home-quote-field:has(.error) span.label-text {
    color: #D32F2F;
}

body.custom-page-home .home-quote-section .home-down-payment.has-error .home-down-payment-control,
body.custom-page-home .home-quote-section .home-quote-field.has-error input,
body.custom-page-home .home-quote-section .home-quote-field:has(.error) input {
    border-color: #D32F2F;
}

body.custom-page-home .home-quote-section .custom-select-container,
body.custom-page-home .home-quote-section .custom-select-wrapper {
    position: relative;
    min-width: 0;
}

body.custom-page-home .home-quote-section .home-quote-field .custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
}

body.custom-page-home .home-quote-section .home-quote-field .custom-select-trigger > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

body.custom-page-home .home-quote-section .custom-arrow {
    flex-shrink: 0;
}

body.custom-page-home .home-quote-section .custom-arrow img {
    width: 12px;
    height: auto;
}

body.custom-page-home .home-quote-section .custom-options {
    max-width: unset;
    border-radius: 8px;
}

body.custom-page-home .home-quote-section .home-down-payment-control {
    display: flex;
    align-items: stretch;
    min-height: 38px;
    border: 1px solid #c6c6c6;
    border-radius: 8px;
    background: #fff;
}

body.custom-page-home .home-quote-section .home-down-payment-control > div {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    min-width: 0;
    padding: 0 16px;
}

body.custom-page-home .home-quote-section .home-down-payment-control > div.home-down-payment-percent {
    flex: 0 0 45%;
    position: relative;
    gap: 20px;
}

body.custom-page-home .home-quote-section .home-down-payment-percent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: #c6c6c6;
}

body.custom-page-home .home-quote-section .home-down-payment-control span {
    color: #777;
    font-size: 15px;
    left: 0;
    top: 0;
    position: relative;
    display: block;
}

body.custom-page-home .home-quote-section .home-down-payment-control .home-down-payment-amount span::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 2px;
    bottom: 0;
    width: 1px;
    height: 20px;
    background: #e5e7eb;
}

body.custom-page-home .home-quote-section .home-down-payment-control .home-down-payment-amount input,
body.custom-page-home .home-quote-section .home-down-payment-control .home-down-payment-percent input {
    width: 100%;
    min-width: 0;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #5a5a5a;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

body.custom-page-home .home-quote-section .home-down-payment-control .home-down-payment-amount input:focus,
body.custom-page-home .home-quote-section .home-down-payment-control .home-down-payment-percent input:focus {
    background-color: #fff;
    border-color: #ffc001;
    outline: none;
}

body.custom-page-home .home-quote-section .home-down-payment-percent input {
    text-align: right;
}

body.custom-page-home .home-quote-section .home-down-payment-percent span::before {
    content: "";
    position: absolute;
    right: 20px;
    top: 2px;
    bottom: 0;
    width: 1px;
    height: 20px;
    background: #e5e7eb;
}

body.custom-page-home .home-quote-section .home-quote-footer {
    display: flex;
    justify-content: flex-end;
    min-height: 30px;
}

body.custom-page-home .home-quote-section .home-quote-benefits {
    position: absolute;
    bottom: 30px;
    left: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 1;
}

body.custom-page-home .home-quote-section .home-quote-benefits li {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 3px 5px rgb(0 0 0 / 5%),
    0 7px 9px -4px rgb(0 0 0 / 13%);
    color: #666;
    font-size: 10px;
    line-height: 1.4;
}

body.custom-page-home .home-quote-section .home-quote-benefits img {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

body.custom-page-home .home-quote-section .button-submit-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-width: 100%;
    margin: 23px 0 0;
    padding: 0;
    order: 31;
    grid-column: -2 / -1;
}

body.custom-page-home .home-quote-section .button-submit-container button,
body.custom-page-home .home-quote-section .home-income-popup .btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    min-height: 40px;
    border: none;
    border-radius: 6px;
    background: #181818;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-sizing: border-box;
    cursor: pointer;
    text-transform: none;
}

body.custom-page-home .home-quote-section .button-submit-container button:hover,
body.custom-page-home .home-quote-section .home-income-popup .btn-submit:hover {
    background-color: #181818e0;
    box-shadow: none !important;
}

body.custom-page-home .home-quote-section button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

body.custom-page-home .home-quote-section .button-submit-container button img,
body.custom-page-home .home-quote-section .home-income-popup .btn-submit img {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    transition: transform 0.25s ease;
}

body.custom-page-home .home-quote-section .button-submit-container button:not(.disabled):hover img,
body.custom-page-home .home-quote-section .home-income-popup .btn-submit:not(.disabled):hover img {
    transform: translateX(3px);
}

body.custom-page-home .home-quote-section .button-submit-container .mortgage-disclosures {
    margin: 0;
    color: #777;
    font-size: 10px;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.custom-page-home .home-quote-section .button-submit-container .mortgage-disclosures:hover {
    color: #ffc001;
}

body.custom-page-home .home-quote-section .home-income-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: rgb(0 0 0 / 55%);
}

body.custom-page-home .home-quote-section .home-income-popup .center-element {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 50px 16px;
    transform: none;
    box-sizing: border-box;
}

body.custom-page-home .home-quote-section .home-income-popup .home-financing-program-content {
    position: relative;
    width: 100%;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 550px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    margin: 0;
    padding: 8px 10px 10px 10px;
    border: 0;
    border-radius: 25px;
    background: #fff;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

body.custom-page-home .home-quote-section .home-income-popup .popup-header {
    padding: 25px 50px 15px;
    text-align: left;
    position: relative;
}

body.custom-page-home .home-quote-section .home-income-popup .popup-header-hero {
    display: flex;
    align-items: center;
    gap: 20px;
}

body.custom-page-home .home-quote-section .home-income-popup .popup-header-hero > img {
    width: 38px;
    height: auto;
}

body.custom-page-home .home-quote-section .home-income-popup .popup-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

body.custom-page-home .home-quote-section .home-income-popup .popup-close {
    position: absolute;
    border: none;
    background: transparent;
    cursor: pointer;
    height: 30px;
    top: 25px;
    right: 20px;
    transition: transform 0.2s ease;
}

body.custom-page-home .home-quote-section .home-income-popup .popup-close:hover {
    transform: rotate(90deg);
}

body.custom-page-home .home-quote-section .home-income-popup .line-shadow {
    display: block;
    margin: 0 auto;
}

body.custom-page-home .home-quote-section .home-income-popup .popup-body {
    margin-top: 6px;
    padding: 20px 40px 40px 40px;
}

body.custom-page-home .home-quote-section .home-income-popup .form-group {
    margin: 0 0 20px;
    padding: 0;
}

body.custom-page-home .home-quote-section .home-income-popup .label {
    display: block;
    margin-bottom: 5px;
    color: #444;
    font-size: 14px;
    font-weight: 500;
}

body.custom-page-home .home-quote-section .home-income-popup .custom-select-wrapper {
    display: block;
}

body.custom-page-home .home-quote-section .home-income-popup .custom-select-trigger {
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #c6c6c6;
    padding: 3px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #5a5a5a;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

body.custom-page-home .home-quote-section .home-income-popup .custom-select-trigger span {
    font-size: 14px;
}

body.custom-page-home .home-quote-section .home-income-popup .note {
    font-size: 12px;
    color: #686868;
    line-height: 1.4;
    margin-top: 6px;
}

body.custom-page-home .home-quote-section .home-income-popup .note a {
    color: #ffc001;
    font-weight: 500;
}

body.custom-page-home .home-quote-section .home-income-popup .note a:hover {
    text-decoration: underline;
}

body.custom-page-home .home-quote-section .home-income-popup .btn-submit {
    margin-top: 25px;
}

body.custom-page-home.overflow-hidden {
    overflow: hidden;
}

@media screen and (max-width: 1100px) {
    body.custom-page-home .home-quote-section .home-quote-card {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    body.custom-page-home .home-quote-section .home-quote-main.hidden-pricing-redirect-form {
        padding: 20px 20px 20px 50px;
    }

    body.custom-page-home .home-quote-section .form-content.home-quote-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 20px;
    }

    body.custom-page-home .home-quote-section .home-quote-footer {
        margin-top: 20px;
    }

    body.custom-page-home .home-quote-section .home-quote-art {
        padding-bottom: 32px;
    }
}

@media screen and (max-width: 750px) {
    body.custom-page-home .homepage-widgets.rates-form.home-quote-section {
        width: calc(100% - 24px);
        margin-top: -60px;
    }

    body.custom-page-home .home-quote-section .home-quote-card {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 20px;
    }

    body.custom-page-home .home-quote-section .home-quote-art {
        display: none;
    }

    body.custom-page-home .home-quote-section .home-quote-main.hidden-pricing-redirect-form {
        padding: 20px 15px;
    }

    body.custom-page-home .home-quote-section .home-quote-heading h2 {
        font-size: 24px;
    }

    body.custom-page-home .home-quote-section .home-quote-heading p br {
        display: none;
    }

    body.custom-page-home .home-quote-section .button-submit-container {
        width: 100%;
    }

    body.custom-page-home .home-quote-section .home-quote-footer {
        margin-top: 30px;
        justify-content: center;
    }

    body.custom-page-home .home-quote-section .home-quote-benefits {
        position: unset;
        bottom: unset;
        left: unset;
        justify-content: center;
    }
}

@keyframes homeQuoteCartSwayMobile {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

@media screen and (prefers-reduced-motion: reduce) {
    body.custom-page-home .home-quote-section .home-quote-art > img {
        animation: none;
        transform: translateX(32px);
        will-change: auto;
    }
}

@media screen and (max-width: 750px) and (prefers-reduced-motion: reduce) {
    body.custom-page-home .home-quote-section .home-quote-art > img {
        transform: none;
    }
}

@media screen and (max-width: 480px) {
    body.custom-page-home .home-quote-section .form-content.home-quote-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    body.custom-page-home .home-quote-section .home-quote-heading h2 {
        font-size: 22px;
    }

    body.custom-page-home .home-quote-section .home-quote-field input:not([type='hidden']),
    body.custom-page-home .home-quote-section .home-quote-field .custom-select-trigger {
        font-size: 16px;
    }

    body.custom-page-home .home-quote-section .home-income-popup .popup-header {
        padding: 20px 45px 20px 20px;
    }

    body.custom-page-home .home-quote-section .home-income-popup .popup-header-hero {
        gap: 10px;
    }

    body.custom-page-home .home-quote-section .home-income-popup .popup-title {
        font-size: 16px;
    }

    body.custom-page-home .home-quote-section .home-income-popup .popup-close {
        top: 15px;
        right: 10px;
    }

    body.custom-page-home .home-quote-section .home-income-popup .popup-body {
        padding: 20px 15px 30px;
    }

    body.custom-page-home .home-quote-section .home-quote-main.hidden-pricing-redirect-form {
        padding: 20px 6px;
    }
}
