/* Maximum mortgage calculator ("Bereken je maximale hypotheek").
   Ported from the Homechecker MaxMortgageModal component; the site font is
   used instead of Nunito. */

.wl-hypo-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 30, 55, 0.5);
}

.wl-hypo-modal {
    width: 100%;
    max-width: 960px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(20, 30, 55, 0.3);
    font: normal 16px "Segoe UI", Arial, sans-serif;
    line-height: 1.4;
    text-align: left;
    color: #1c2430;
}

.wl-hypo-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 26px 18px;
}

.wl-hypo-title {
    margin: 0 0 4px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #1c2430;
}

.wl-hypo-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #7a8093;
}

.wl-hypo-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: #eef2fb;
    font-size: 18px;
    line-height: 1;
    color: #2f4b9b;
    cursor: pointer;
}

.wl-hypo-close:hover {
    background: #e0e7f7;
}

.wl-hypo-body {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    border-top: 1px solid #eef1f7;
    border-bottom: 1px solid #eef1f7;
}

/* Left column - the input form. */
.wl-hypo-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 26px;
    border-right: 1px solid #eef1f7;
}

.wl-hypo-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wl-hypo-label {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    color: #3a4152;
}

.wl-hypo-label-hint {
    font-weight: 600;
    color: #9aa0b0;
}

/* Input shell: a currency/percentage affix plus a borderless inner input. */
.wl-hypo-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 15px;
    border: 1px solid #e3e8f2;
    border-radius: 10px;
    background: #fbfaf6;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wl-hypo-input:focus-within {
    border-color: #2f4b9b;
    box-shadow: 0 0 0 3px rgba(47, 75, 155, 0.12);
    background: #ffffff;
}

.wl-hypo-input input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 800;
    color: #1c2430;
    outline: none;
    /* base.css puts a pointer cursor on every input. */
    cursor: text;
}

.wl-hypo-input-affix {
    flex-shrink: 0;
    font-size: 14.5px;
    color: #9aa0b0;
}

/* The native arrow sits flush against the border, so it is replaced by an
   inline chevron that keeps the same 15px gutter as the text. */
.wl-hypo-select {
    width: 100%;
    padding: 13px 42px 13px 15px;
    border: 1px solid #e3e8f2;
    border-radius: 10px;
    background-color: #fbfaf6;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239aa0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 800;
    color: #1c2430;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* IE/Edge legacy keeps its own arrow on top of the background one. */
.wl-hypo-select::-ms-expand {
    display: none;
}

.wl-hypo-select:focus {
    outline: none;
    border-color: #2f4b9b;
    box-shadow: 0 0 0 3px rgba(47, 75, 155, 0.12);
}

/* Right column - the result panel. */
.wl-hypo-result {
    padding: 20px 22px;
    background: #faf8f2;
}

.wl-hypo-eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a8093;
    margin-bottom: 6px;
}

.wl-hypo-amount {
    font-size: 32px;
    font-weight: 800;
    color: #2f4b9b;
    line-height: 1.1;
    margin-bottom: 14px;
}

.wl-hypo-card {
    border: 1px solid #e8ecf4;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 12px;
}

.wl-hypo-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f7;
}

.wl-hypo-line:last-child {
    border-bottom: none;
}

.wl-hypo-line--highlight {
    background: #eef2fb;
}

.wl-hypo-line-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: #1c2430;
}

.wl-hypo-line-sub {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: #9aa0b0;
}

.wl-hypo-line-value {
    font-size: 14.5px;
    font-weight: 700;
    color: #1c2430;
    white-space: nowrap;
}

.wl-hypo-line--highlight .wl-hypo-line-value {
    color: #1e3a6e;
}

/* "This home" comparison card. */
.wl-hypo-card--home {
    padding: 14px;
}

.wl-hypo-home-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.wl-hypo-home-title {
    font-size: 15px;
    font-weight: 800;
    color: #1c2430;
}

.wl-hypo-badge {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
}

.wl-hypo-badge--short {
    background: #fdeadd;
    color: #c26120;
}

.wl-hypo-badge--fit {
    background: #e6f0e8;
    color: #3d7a54;
}

.wl-hypo-bars {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
    align-items: center;
    margin-bottom: 12px;
}

.wl-hypo-bar-label {
    font-size: 13px;
    color: #3a4152;
}

.wl-hypo-bar {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: #efe9db;
    overflow: hidden;
}

.wl-hypo-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.25s ease;
}

.wl-hypo-bar-fill--max {
    background: #2f4b9b;
}

.wl-hypo-bar-fill--ask {
    background: #d9822b;
}

.wl-hypo-home-note {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #4b5263;
}

/* NHG pill under the comparison card. */
.wl-hypo-nhg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #4e8c63;
    border-radius: 999px;
    background: #f2f8f3;
    font-size: 13px;
    font-weight: 800;
    color: #3d7a54;
}

.wl-hypo-nhg-amount {
    font-weight: 700;
    opacity: 0.75;
}

/* "Talk with an expert" card at the bottom of the result panel. */
.wl-hypo-expert {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
    background: #e9ebf5;
    border: 1.5px solid #dadfed;
}

.wl-hypo-expert-text {
    flex: 1 1 150px;
    min-width: 0;
}

.wl-hypo-expert-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #1e3a6e;
    margin-bottom: 2px;
}

.wl-hypo-expert-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #4b5263;
}

/* base.css colours every link welocate blue, so the link states are spelled
   out here to keep the button label white. */
a.wl-hypo-expert-cta,
a.wl-hypo-expert-cta:link,
a.wl-hypo-expert-cta:visited,
a.wl-hypo-expert-cta:hover,
a.wl-hypo-expert-cta:active {
    flex-shrink: 0;
    display: inline-block;
    padding: 12px 22px;
    border: none;
    border-radius: 999px;
    background: #2f4b9b;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

a.wl-hypo-expert-cta:hover {
    background: #25407e;
}

/* Footer - disclaimer plus the action buttons. */
.wl-hypo-foot {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 26px 22px;
}

.wl-hypo-foot-note {
    flex: 1;
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: #9aa0b0;
}

.wl-hypo-foot-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.wl-hypo-btn {
    padding: 13px 26px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.wl-hypo-btn--secondary {
    border: 1px solid #e3e8f2;
    background: #ffffff;
    color: #1c2430;
}

.wl-hypo-btn--secondary:hover {
    border-color: #cdd6ec;
    background: #f6f8fd;
}

/* Stack the modal on narrow screens. */
@media (max-width: 760px) {
    .wl-hypo-body {
        grid-template-columns: 1fr;
    }

    .wl-hypo-form {
        border-right: none;
        border-bottom: 1px solid #eef1f7;
    }

    .wl-hypo-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .wl-hypo-foot-actions {
        justify-content: stretch;
    }

    .wl-hypo-btn {
        flex: 1;
    }
}

/* Dock the modal to the bottom edge as a sheet on phones. */
@media (max-width: 600px) {
    .wl-hypo-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .wl-hypo-modal {
        max-width: none;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
    }

    .wl-hypo-head {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 20px 20px 14px;
        background: #ffffff;
        border-bottom: 1px solid #eef1f7;
    }

    .wl-hypo-title {
        font-size: 16.5px;
        letter-spacing: 0;
        text-transform: none;
    }

    .wl-hypo-subtitle {
        font-size: 12.5px;
    }

    .wl-hypo-form,
    .wl-hypo-result {
        padding: 18px 16px;
    }

    /* Keep the input text at 16px: anything smaller makes iOS Safari zoom the
       page when the field is focused. */
    .wl-hypo-input input {
        font-size: 16px;
    }

    .wl-hypo-expert-cta {
        width: 100%;
        text-align: center;
    }
}
