.ch-form-is-open {
    overflow: hidden;
}

.ch-form-trigger {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.ch-form-trigger:hover,
.ch-form-trigger:focus-visible {
    background: #fff;
    color: #bd140d;
    outline: 3px solid rgba(255, 255, 255, 0.45);
    outline-offset: 3px;
}

.ch-form-dialog {
    width: min(860px, calc(100vw - 32px));
    max-width: 860px;
    max-height: min(900px, calc(100vh - 32px));
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #222;
    box-shadow: 0 24px 80px rgba(32, 6, 4, 0.35);
}

.ch-form-dialog::backdrop {
    background: rgba(23, 12, 11, 0.74);
    backdrop-filter: blur(3px);
}

.ch-form-dialog__panel {
    position: relative;
    padding: clamp(24px, 3vw, 36px);
    background: #fff;
    border-top: 8px solid #ed1c13;
}

.ch-form-dialog__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d8d8d8;
    border-radius: 50%;
    background: #fff;
    color: #5b1713;
    font: 400 30px/1 Arial, sans-serif;
    cursor: pointer;
}

.ch-form-dialog__close:hover,
.ch-form-dialog__close:focus-visible {
    border-color: #ed1c13;
    color: #bd140d;
    outline: 3px solid rgba(237, 28, 19, 0.24);
    outline-offset: 2px;
}

.ch-form-dialog__eyebrow {
    margin: 0 56px 6px 0;
    color: #d91c13;
    font: 700 13px/1.4 Poppins, Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ch-form-dialog h2 {
    margin: 0 56px 8px 0;
    color: #201817;
    font: 700 clamp(28px, 4vw, 42px)/1.12 "PT Serif", Georgia, serif;
}

.ch-form-dialog__intro {
    max-width: 680px;
    margin: 0 0 18px;
    color: #574e4c;
    font: 400 16px/1.6 Poppins, Arial, sans-serif;
}

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

.ch-form label:not(.ch-form__privacy) {
    display: block;
    min-width: 0;
    margin: 0;
    color: #2c2524;
    font: 600 14px/1.4 Poppins, Arial, sans-serif;
}

.ch-form__wide {
    grid-column: 1 / -1;
}

.ch-form input[type="text"],
.ch-form input[type="email"],
.ch-form input[type="tel"],
.ch-form input[type="file"],
.ch-form textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #b8b2b1;
    border-radius: 4px;
    background: #fff;
    color: #221b1a;
    font: 400 16px/1.45 Poppins, Arial, sans-serif;
    margin-top: 7px;
}

.ch-form input[type="file"] {
    min-height: 54px;
    padding: 8px;
}

.ch-form textarea {
    min-height: 88px;
    resize: vertical;
}

.ch-form input:focus,
.ch-form textarea:focus {
    border-color: #d91c13;
    outline: 3px solid rgba(217, 28, 19, 0.18);
    outline-offset: 1px;
}

.ch-form [aria-invalid="true"] {
    border-color: #a90000;
    background: #fff8f7;
}

.ch-form__optional,
.ch-form__help {
    color: #6e6563;
    font-size: 12px;
    font-weight: 400;
}

.ch-form__help,
.ch-form__field-error {
    display: block;
    margin-top: 5px;
}

.ch-form__field-error {
    min-height: 0;
    color: #9e0700;
    font-size: 12px;
    font-weight: 600;
}

.ch-form__field-error:empty {
    display: none;
}

.ch-form__privacy {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    margin: 16px 0 4px;
    color: #3a3230;
    font: 400 13px/1.55 Poppins, Arial, sans-serif;
}

.ch-form__privacy input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: #d91c13;
}

.ch-form__status {
    min-height: 24px;
    margin: 10px 0 6px;
    padding: 0;
    color: #4b4341;
    font: 600 14px/1.5 Poppins, Arial, sans-serif;
}

.ch-form__status--success,
.ch-form__status--error,
.ch-form__status--pending {
    padding: 10px 12px;
    border-radius: 4px;
}

.ch-form__status--success {
    background: #e8f6ec;
    color: #17652b;
}

.ch-form__status--error {
    background: #fff0ee;
    color: #8b100a;
}

.ch-form__status--pending {
    background: #f5f2f1;
}

.ch-form__submit {
    display: inline-flex;
    min-width: 190px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 2px solid #ed1c13;
    border-radius: 4px;
    background: #ed1c13;
    color: #fff;
    font: 700 15px/1.2 Poppins, Arial, sans-serif;
    cursor: pointer;
}

.ch-form__submit:hover,
.ch-form__submit:focus-visible {
    background: #bd140d;
    border-color: #bd140d;
    outline: 3px solid rgba(237, 28, 19, 0.24);
    outline-offset: 3px;
}

.ch-form__submit:disabled {
    cursor: wait;
    opacity: 0.65;
}

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

@media (max-width: 700px) {
    .ch-form-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    .ch-form-dialog__panel {
        padding: 24px 18px 28px;
        border-top-width: 6px;
    }

    .ch-form-dialog h2 {
        font-size: 28px;
    }

    .ch-form__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .ch-form__wide {
        grid-column: auto;
    }

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

@media (prefers-reduced-motion: reduce) {
    .ch-form-trigger,
    .ch-form__submit {
        transition: none;
    }
}
