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

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

.quote-request-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.quote-request-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 10, 6, .58);
}

.quote-request-modal__dialog {
    position: relative;
    display: flex;
    width: min(760px, 100%);
    max-height: calc(100dvh - 36px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #161616;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
    color: #050505;
}

.quote-request-modal__header {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px 16px;
    border-bottom: 1px solid #e4e4e4;
}

.quote-request-modal__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #666;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.quote-request-modal__header h2 {
    margin: 0;
    color: #050505;
    font-size: clamp(23px, 3.2vw, 31px);
    line-height: 1.14;
}

.quote-request-modal__close {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #b7b7b7;
    border-radius: 50%;
    background: #fff;
    color: #050505;
    font: 500 28px/1 Arial, sans-serif;
    cursor: pointer;
}

.quote-request-modal__close:hover,
.quote-request-modal__close:focus-visible {
    border-color: #050505;
    background: #fff3ad;
}

.quote-request-modal__body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.quote-request-summary {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 9px 18px;
    padding: 12px 22px;
    border-bottom: 1px solid #eadb8a;
    background: #fff9d8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .04);
}

.quote-request-summary__item {
    min-width: 0;
}

.quote-request-summary__item > span {
    display: block;
    margin-bottom: 1px;
    color: #5c542e;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.quote-request-summary__item strong {
    display: block;
    overflow-wrap: anywhere;
    color: #161616;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.32;
}

.quote-request-summary__item--service strong {
    font-size: 16px;
    font-weight: 700;
}

.quote-request-summary__item--estimate strong {
    font-size: 15px;
    font-weight: 700;
}

.quote-request-summary__actions {
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 14px;
    white-space: nowrap;
}

.quote-request-summary__toggle,
.quote-request-summary__edit {
    padding: 5px 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: transparent;
    color: #26220d;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}

.quote-request-summary__toggle:hover,
.quote-request-summary__toggle:focus-visible,
.quote-request-summary__edit:hover,
.quote-request-summary__edit:focus-visible {
    color: #000;
    outline: 0;
}

.quote-request-summary__details {
    padding: 12px 22px 14px;
    border-bottom: 1px solid #e6e0c9;
    background: #fffdf3;
}

.quote-request-summary__details dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 22px;
    margin: 0;
}

.quote-request-summary__details dl > div {
    min-width: 0;
}

.quote-request-summary__details dt {
    margin-bottom: 2px;
    color: #666;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.quote-request-summary__details dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #161616;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.quote-request-summary__details p {
    margin: 10px 0 0;
    color: #666;
    font-size: 12px;
    line-height: 1.45;
}

.quote-request-form {
    min-width: 0;
    padding: 22px;
}

.quote-request-form__intro h3 {
    margin: 0 0 4px;
    color: #050505;
    font-size: 20px;
    line-height: 1.2;
}

.quote-request-form__intro p {
    margin: 0 0 18px;
    color: #5b5b5b;
    font-size: 13px;
    line-height: 1.45;
}

.quote-request-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quote-request-field {
    display: block;
    min-width: 0;
    margin: 0;
}

.quote-request-field--wide,
.quote-request-form__contact-hint {
    grid-column: 1 / -1;
}

.quote-request-field > span {
    display: block;
    margin-bottom: 5px;
    color: #272727;
    font-size: 13px;
    font-weight: 600;
}

.quote-request-field input,
.quote-request-field select,
.quote-request-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #b5b5b5;
    border-radius: 6px;
    background: #fff;
    color: #050505;
    font: inherit;
    font-size: 16px;
}

.quote-request-field input,
.quote-request-field select {
    height: 46px;
}

.quote-request-field textarea {
    min-height: 94px;
    resize: vertical;
}

.quote-request-field input:focus-visible,
.quote-request-field select:focus-visible,
.quote-request-field textarea:focus-visible {
    border-color: #050505;
    outline: 3px solid rgba(254, 212, 3, .55);
    outline-offset: 1px;
}

.quote-request-form__contact-hint {
    margin: -3px 0 0;
    color: #666;
    font-size: 12px;
    line-height: 1.35;
}

.quote-request-form__optional {
    margin-top: 16px;
    border-top: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
}

.quote-request-form__optional > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    color: #252525;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.quote-request-form__optional > summary::-webkit-details-marker {
    display: none;
}

.quote-request-form__optional > summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
}

.quote-request-form__optional[open] > summary::after {
    content: '–';
}

.quote-request-form__optional > summary span {
    margin-left: auto;
    color: #777;
    font-weight: 400;
}

.quote-request-form__optional-content {
    padding: 2px 0 16px;
}

.quote-request-form__optional .quote-request-field select,
.quote-request-form__optional .quote-request-field textarea,
.quote-request-form__optional .quote-request-field textarea::placeholder {
    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-weight: 400;
}

.quote-request-form__optional .quote-request-field textarea::placeholder {
    color: #707070;
    opacity: 1;
}

.quote-request-form__optional .quote-request-field select option {
    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-weight: 400;
}

.quote-request-upload {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed #a9b2aa;
    border-radius: 8px;
    background: #f7f8f5;
    cursor: pointer;
}

.quote-request-upload.is-dragover {
    border-color: #1a6b3c;
    background: #eef8f1;
}

.quote-request-upload__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.quote-request-upload__row span {
    color: #606060;
    font-size: 12px;
    line-height: 1.4;
}

.quote-request-upload__row strong {
    display: block;
    color: #222;
    font-size: 13px;
    font-weight: 600;
}

.quote-request-upload button {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 0;
    border-radius: 5px;
    background: #161616;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.quote-request-upload > small {
    display: block;
    margin-top: 7px;
    color: #777;
    font-size: 11px;
}

.contact-file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.contact-file-preview__item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 6px;
    background: #eee;
}

.contact-file-preview__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-file-preview__item button {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #161616;
    color: #fff;
    line-height: 24px;
}

.contact-upload-progress {
    display: none;
    height: 7px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #dde5dd;
}

.contact-upload-progress__bar {
    width: 0;
    height: 100%;
    background: #1a6b3c;
    transition: width .18s ease;
}

.quote-request-form__submit {
    display: inline-flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding: 12px 18px;
    border: 1px solid #050505;
    border-radius: 6px;
    background: #ffe100;
    color: #050505;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.quote-request-form__submit:hover,
.quote-request-form__submit:focus-visible {
    background: #161616;
    color: #fff;
}

.quote-request-form__submit:disabled {
    cursor: wait;
    opacity: .7;
}

.quote-request-form__privacy {
    margin: 9px 0 0;
    color: #777;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}

.quote-request-form__privacy a {
    color: inherit;
    text-decoration: underline;
}

#contact-form-response {
    margin-top: 12px;
}

@media (prefers-reduced-motion: no-preference) {
    .quote-request-modal {
        animation: quote-request-fade-in .16s ease-out;
    }

    .quote-request-modal__dialog {
        animation: quote-request-dialog-in .2s cubic-bezier(.2, .8, .2, 1);
    }
}

@keyframes quote-request-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes quote-request-dialog-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767.98px) {
    .quote-request-modal {
        align-items: flex-end;
        padding: 0;
    }

    .quote-request-modal__dialog {
        width: 100%;
        max-height: 91dvh;
        border-width: 1px 0 0;
        border-radius: 17px 17px 0 0;
    }

    .quote-request-modal__header {
        padding: 14px 16px 12px;
    }

    .quote-request-modal__header h2 {
        font-size: 24px;
    }

    .quote-request-summary {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 9px 14px;
        padding: 11px 16px;
    }

    .quote-request-summary__item--service,
    .quote-request-summary__actions {
        grid-column: 1 / -1;
    }

    .quote-request-summary__item--service strong {
        font-size: 15px;
    }

    .quote-request-summary__item--estimate strong {
        font-size: 17px;
    }

    .quote-request-summary__actions {
        gap: 14px;
    }

    .quote-request-summary__details {
        padding: 11px 16px 13px;
    }

    .quote-request-summary__details dl {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .quote-request-form {
        padding: 18px 16px 22px;
    }

    .quote-request-form__grid {
        grid-template-columns: 1fr;
    }

    .quote-request-field--wide,
    .quote-request-form__contact-hint {
        grid-column: auto;
    }

    .quote-request-upload__row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 399.98px) {
    .quote-request-modal__header,
    .quote-request-summary,
    .quote-request-summary__details,
    .quote-request-form {
        padding-right: 14px;
        padding-left: 14px;
    }

    .quote-request-modal__close {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
}
