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

.template-quote-modal {
    position: fixed;
    z-index: 10080;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.template-quote-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.template-quote-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 12, 0.78);
    backdrop-filter: blur(5px);
}

.template-quote-modal__dialog {
    position: relative;
    width: min(1040px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    color: #1a1a1a;
    border-top: 5px solid #ed6c00;
    background: #f6f3ed;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    transform: translateY(18px);
    transition: transform 240ms cubic-bezier(0.22, 0.61, 0.24, 1);
}

.template-quote-modal.is-open .template-quote-modal__dialog {
    transform: translateY(0);
}

.template-quote-modal__close {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 18px;
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    border: 0;
    border-radius: 50%;
    background: #151515;
    cursor: pointer;
    transition: background-color 180ms ease, transform 180ms ease;
}

.template-quote-modal__close:hover {
    background: #ed6c00;
    transform: rotate(90deg);
}

.template-quote-modal__close svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.7;
}

.template-quote-modal__body {
    max-height: calc(100vh - 53px);
    padding: 46px 54px 42px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #ed6c00 #ded9cf;
    scrollbar-width: thin;
}

.template-quote-header {
    max-width: 760px;
    margin-bottom: 36px;
    padding-right: 48px;
}

.template-quote-header__eyebrow {
    display: block;
    margin-bottom: 13px;
    color: #ed6c00;
    font-family: "sourcehansanscn-medium", "Montserrat", sans-serif;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.template-quote-header__title {
    margin: 0 0 14px;
    color: #171717;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.template-quote-header__intro {
    max-width: 700px;
    margin: 0;
    color: #66635e;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

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

.template-quote-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 9px;
}

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

.template-quote-field label,
.template-quote-field legend {
    padding: 0;
    color: #3d3b38;
    font-family: "sourcehansanscn-medium", "Montserrat", sans-serif;
    font-size: 16px;
    letter-spacing: 0.07em;
    line-height: 1.4;
    text-transform: uppercase;
}

.template-quote-field label span,
.template-quote-field legend span {
    color: #ed6c00;
}

.template-quote-field input:not([type="radio"]):not([type="checkbox"]),
.template-quote-field select {
    width: 100%;
    height: 46px;
    min-width: 0;
    padding: 8px 0;
    color: #1b1b1b;
    border: 0;
    border-bottom: 1px solid #bdb8ae;
    border-radius: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 14px;
    transition: border-color 180ms ease;
}

.template-quote-field input:not([type="radio"]):not([type="checkbox"]):focus,
.template-quote-field select:focus {
    border-color: #ed6c00;
}

.template-quote-field input:user-invalid,
.template-quote-field select:user-invalid {
    border-color: #b63a2b;
}

.template-quote-field input::placeholder {
    color: #98948d;
    opacity: 1;
}

.template-quote-combobox {
    position: relative;
    min-width: 0;
}

.template-quote-combobox__control {
    display: flex;
    height: 46px;
    align-items: center;
    border-bottom: 1px solid #bdb8ae;
    transition: border-color 180ms ease;
}

.template-quote-combobox__control:focus-within {
    border-color: #ed6c00;
}

.template-quote-combobox:has(input:user-invalid) .template-quote-combobox__control {
    border-color: #b63a2b;
}

.template-quote-combobox__control input:not([type="radio"]):not([type="checkbox"]) {
    height: 45px;
    flex: 1;
    padding-right: 28px;
    border-bottom: 0;
}

.template-quote-combobox__control input:not([type="radio"]):not([type="checkbox"]):focus {
    border-bottom: 0;
}

.template-quote-combobox__flag {
    flex: 0 0 auto;
    margin-right: 8px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 17px;
    line-height: 1;
}

.template-quote-combobox__flag:empty {
    display: none;
}

.template-quote-combobox__toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: 28px;
    height: 45px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.template-quote-combobox__toggle::after {
    width: 7px;
    height: 7px;
    border-right: 1px solid #222;
    border-bottom: 1px solid #222;
    content: "";
    transform: translateY(-2px) rotate(45deg);
    transition: transform 180ms ease;
}

.template-quote-combobox__control:has(input[aria-expanded="true"])
    .template-quote-combobox__toggle::after {
    transform: translateY(2px) rotate(225deg);
}

.template-quote-combobox__menu {
    position: absolute;
    z-index: 8;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    max-height: 258px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #d3cdc1;
    background: #fff;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
    overscroll-behavior: contain;
    scrollbar-color: #ed6c00 #ece8df;
    scrollbar-width: thin;
}

.template-quote-combobox__menu[hidden] {
    display: none;
}

.template-quote-combobox__menu.is-dropup {
    top: auto;
    bottom: calc(100% + 1px);
}

.template-quote-combobox__option {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    color: #393632;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
}

.template-quote-combobox__option:hover,
.template-quote-combobox__option.is-active,
.template-quote-combobox__option[aria-selected="true"] {
    background: rgba(237, 108, 0, 0.09);
}

.template-quote-combobox__option.is-matched {
    color: #8c3d00;
    font-family: "sourcehansanscn-medium", "Montserrat", sans-serif;
}

.template-quote-combobox__option.is-exact {
    color: #303030;
    border-bottom: 1px solid #eee9e0;
    font-family: "sourcehansanscn-medium", "Montserrat", sans-serif;
}

.template-quote-combobox__option > span:not(.template-quote-combobox__flag) {
    min-width: 0;
}

.template-quote-combobox__match {
    margin-left: auto;
    color: #ed6c00;
    font-family: "sourcehansanscn-medium", "Montserrat", sans-serif;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.template-quote-combobox__empty {
    margin: 0;
    padding: 12px 10px;
    color: #88837b;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 12px;
    line-height: 1.5;
}

.template-quote-combobox__hint {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: block;
    margin: 0;
    color: #8a6c50;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 11px;
    line-height: 1.45;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, visibility 160ms ease;
}

.template-quote-combobox__hint.is-visible {
    visibility: visible;
    opacity: 1;
}

.template-quote-select {
    position: relative;
    display: block;
}

.template-quote-select::after {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 7px;
    height: 7px;
    border-right: 1px solid #222;
    border-bottom: 1px solid #222;
    content: "";
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}

.template-quote-select select {
    padding-right: 28px;
    appearance: none;
    cursor: pointer;
}

.template-quote-field--radio {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    gap: 0;
}

.template-quote-radio-group {
    display: flex;
    min-height: 46px;
    align-items: flex-end;
    gap: 10px;
    margin-top: 9px;
}

.template-quote-radio {
    position: relative;
    cursor: pointer;
}

.template-quote-radio input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.template-quote-radio span {
    display: flex;
    min-width: 72px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: #55514b;
    border: 1px solid #c9c3b8;
    border-radius: 999px;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 13px;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.template-quote-radio input:checked + span {
    color: #fff;
    border-color: #ed6c00;
    background: #ed6c00;
}

.template-quote-radio input:focus-visible + span {
    outline: 2px solid #ed6c00;
    outline-offset: 3px;
}

.template-quote-form__message {
    display: none;
    margin-top: 24px;
    padding: 13px 15px;
    color: #5f3b16;
    border-left: 3px solid #ed6c00;
    background: rgba(237, 108, 0, 0.08);
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 13px;
    line-height: 1.6;
}

.template-quote-form__message.is-visible {
    display: block;
}

.template-quote-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 34px;
}

.template-quote-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #67635c;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 12px;
    line-height: 1.55;
    cursor: pointer;
}

.template-quote-consent input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin: 1px 0 0;
    accent-color: #ed6c00;
}

.template-quote-submit {
    display: inline-flex;
    min-width: 188px;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 13px 24px;
    color: #fff;
    border: 1px solid #ed6c00;
    border-radius: 999px;
    background: #ed6c00;
    cursor: pointer;
    font-family: "sourcehansanscn-medium", "Montserrat", sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.template-quote-submit svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.template-quote-submit:hover,
.template-quote-submit:focus-visible {
    color: #171717;
    border-color: #ffb26b;
    background: #ffb26b;
}

.template-quote-modal__close:focus-visible,
.template-quote-submit:focus-visible {
    outline: 2px solid #ed6c00;
    outline-offset: 3px;
}

.template-quote-form__note {
    margin: 16px 0 0;
    color: #8b877f;
    font-family: "sourcehansanscn-light", "Montserrat", sans-serif;
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .template-quote-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .template-quote-modal__dialog {
        max-height: calc(100vh - 20px);
    }

    .template-quote-modal__body {
        max-height: calc(100vh - 25px);
        padding: 32px 20px 28px;
    }

    .template-quote-modal__close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .template-quote-header {
        margin-bottom: 28px;
        padding-right: 40px;
    }

    .template-quote-header__title {
        font-size: 34px;
    }

    .template-quote-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .template-quote-combobox__menu {
        max-height: 220px;
    }

    .template-quote-field--full {
        grid-column: auto;
    }

    .template-quote-form__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin-top: 42px;
    }

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

@media (prefers-reduced-motion: reduce) {
    .template-quote-modal,
    .template-quote-modal__dialog,
    .template-quote-modal__close,
    .template-quote-radio span,
    .template-quote-submit {
        transition: none;
    }
}
