.quote-modal[aria-hidden="true"] {
    display: none;
}

.quote-modal[aria-hidden="false"] {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 20px;
}

.quote-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(3, 25, 21, .76);
    backdrop-filter: blur(5px);
    cursor: default;
}

.quote-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    max-height: min(90vh, 820px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .3);
    animation: quote-modal-enter .2s ease-out;
}

.quote-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px 24px;
    background:
        radial-gradient(circle at 90% 15%, rgba(241, 202, 112, .2), transparent 30%),
        linear-gradient(115deg, #032a23, #305649);
    color: #fff;
}

.quote-modal-eyebrow {
    color: #f1ca70;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.quote-modal-header h2 {
    margin: 8px 0;
    color: #fff;
    font: 800 clamp(1.5rem, 4vw, 2rem)/1.15 Manrope, "DM Sans", sans-serif;
}

.quote-modal-header p {
    margin: 0;
    color: #d8e2dc;
    font-size: .94rem;
}

.quote-modal-close {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
    font-size: 1.7rem;
    line-height: 1;
}

.quote-modal-close:hover,
.quote-modal-close:focus-visible {
    background: #f1ca70;
    color: #032a23;
}

.quote-modal-form {
    padding: 28px 32px 26px;
}

.quote-modal-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.quote-modal-fields label {
    display: grid;
    min-width: 0;
    gap: 7px;
    color: #263b32;
    font-size: .86rem;
    font-weight: 700;
}

.quote-modal-fields label small {
    color: #758179;
    font-weight: 400;
}

.quote-modal-full {
    grid-column: 1 / -1;
}

.quote-modal-fields input,
.quote-modal-fields select,
.quote-modal-fields textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #d6e0d9;
    border-radius: 9px;
    padding: 12px 13px;
    outline: none;
    background: #fbfcfb;
    color: #17231f;
    font: 500 .95rem/1.45 "DM Sans", sans-serif;
}

.quote-modal-fields textarea {
    min-height: 112px;
    resize: vertical;
}

.quote-modal-fields input:focus,
.quote-modal-fields select:focus,
.quote-modal-fields textarea:focus {
    border-color: #bd8550;
    box-shadow: 0 0 0 3px rgba(189, 133, 80, .16);
}

.quote-modal-submit {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 20px;
    padding: 12px 23px;
    border: 0;
    border-radius: 8px;
    background: #bd8550;
    color: #10251d;
    cursor: pointer;
    font: 800 .94rem Manrope, "DM Sans", sans-serif;
    transition: transform .2s ease, background .2s ease;
}

.quote-modal-submit:hover {
    transform: translateY(-2px);
    background: #e7b52e;
}

.quote-modal-privacy {
    margin: 13px 0 0;
    color: #758179;
    font-size: .77rem;
}

.quote-modal-errors {
    margin: 0 0 18px;
    padding: 12px 16px 12px 34px;
    border-left: 4px solid #b42318;
    border-radius: 6px;
    background: #fff1f0;
    color: #7a271a;
    font-size: .87rem;
}

@keyframes quote-modal-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@media (max-width: 560px) {
    .quote-modal[aria-hidden="false"] {
        padding: 12px;
    }

    .quote-modal-dialog {
        max-height: 94vh;
        border-radius: 15px;
    }

    .quote-modal-header {
        padding: 22px 20px 19px;
    }

    .quote-modal-form {
        padding: 20px;
    }

    .quote-modal-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
    }

    .quote-modal-full {
        grid-column: auto;
    }

    .quote-modal-submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .quote-modal-dialog,
    .quote-modal-submit {
        animation: none;
        transition: none;
    }
}
