.estimate-modal[hidden] {
    display: none;
}

.estimate-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 28px;
}

.estimate-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 14, 17, .78);
    backdrop-filter: blur(5px);
}

.estimate-modal__dialog {
    position: relative;
    width: min(100%, 940px);
    max-height: calc(100vh - 56px);
    overflow: auto;
    padding: clamp(34px, 5vw, 62px);
    background: #fff;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .3);
    overscroll-behavior: contain;
}

.estimate-modal__close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #34373b;
    font: 300 36px/1 'Barlow', sans-serif;
    cursor: pointer;
}

.estimate-modal__close:hover,
.estimate-modal__close:focus {
    color: #842af9;
}

.estimate-modal__header {
    max-width: 700px;
    margin: 0 0 36px;
}

.estimate-modal__eyebrow {
    margin: 0 0 12px !important;
    color: #842af9 !important;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
}

.estimate-modal__header h2 {
    margin: 0 0 16px;
    color: #17191b;
    font-family: 'Oswald Medium', 'Oswald Regular', sans-serif;
    font-size: clamp(43px, 5vw, 66px);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: .98;
    text-transform: uppercase;
}

.estimate-modal__header > p:last-child {
    margin: 0;
    color: #62676e;
    font-size: 17px;
    line-height: 1.55;
}

.estimate-alert {
    margin: 0 0 28px;
    padding: 16px 18px;
    border-left: 4px solid;
    font-weight: 600;
    line-height: 1.5;
}

.estimate-alert--success {
    border-color: #26834a;
    background: #edf8f1;
    color: #1e6b3c;
}

.estimate-alert--error {
    border-color: #842af9;
    background: #f6efff;
    color: #57208d;
}

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

.estimate-field {
    display: grid;
    gap: 9px;
    margin: 0;
}

.estimate-field--full {
    grid-column: 1 / -1;
}

.estimate-field > span {
    color: #202327;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.estimate-field b {
    color: #842af9;
}

.estimate-field input,
.estimate-field select,
.estimate-field textarea {
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid #cfd1d6;
    border-radius: 0;
    background: #fff;
    color: #24272b;
    font: 400 16px/1.35 'Barlow', sans-serif;
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.estimate-field textarea {
    min-height: 150px;
    resize: vertical;
}

.estimate-field input:focus,
.estimate-field select:focus,
.estimate-field textarea:focus {
    border-color: #842af9;
    box-shadow: 0 0 0 3px rgba(132, 42, 249, .13);
}

.estimate-form__submit {
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 30px 0 0;
    padding: 17px 26px;
    border: 2px solid #842af9;
    background: #842af9;
    color: #fff;
    font-family: 'Oswald Medium', 'Oswald Regular', sans-serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: .03em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.estimate-form__submit:hover,
.estimate-form__submit:focus {
    background: transparent;
    color: #842af9;
    transform: translateY(-2px);
}

.estimate-form__submit:disabled {
    cursor: wait;
    opacity: .65;
}

.estimate-form__privacy {
    max-width: 680px;
    margin: 18px 0 0;
    color: #74787e;
    font-size: 12px;
    line-height: 1.55;
}

.estimate-form__privacy a {
    color: #6420bb;
    text-decoration: underline;
}

.estimate-form__honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

body.estimate-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .estimate-modal {
        align-items: end;
        padding: 0;
    }

    .estimate-modal__dialog {
        width: 100%;
        max-height: 94svh;
        padding: 42px 20px 34px;
    }

    .estimate-modal__close {
        top: 8px;
        right: 10px;
    }

    .estimate-modal__header {
        margin-bottom: 30px;
        padding-right: 32px;
    }

    .estimate-modal__header h2 {
        font-size: 44px;
    }

    .estimate-form__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .estimate-field--full {
        grid-column: auto;
    }

    .estimate-form__submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .estimate-form__submit,
    .estimate-field input,
    .estimate-field select,
    .estimate-field textarea {
        transition: none;
    }
}
