body.cg-appt-open {
        overflow: hidden;
}

.cg-appt-modal[hidden] {
        display: none !important;
}

.cg-appt-modal {
        position: fixed;
        inset: 0;
        z-index: 100000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 32px;
}

.cg-appt-modal__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(33, 31, 29, 0.58);
        backdrop-filter: blur(2px);
}

.cg-appt-dialog {
        position: relative;
        z-index: 1;
        width: min(780px, 100%);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        box-sizing: border-box;
        padding: 40px;
        background: #FFFFFF;
        border-top: 4px solid #570801;
        border-radius: 10px;
        box-shadow: 0 24px 70px rgba(33, 31, 29, 0.22);
}

.cg-appt-dialog h2,
.cg-appt-dialog h3,
.cg-appt-dialog p,
.cg-appt-dialog fieldset,
.cg-appt-dialog legend {
        margin: 0;
}

.cg-appt-dialog__close {
        position: absolute;
        top: 14px;
        right: 16px;
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #211F1D;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
}

.cg-appt-dialog__close:hover {
        background: #F7F5F2;
}

.cg-appt-dialog__close:focus-visible {
        outline: 2px solid #570801;
        outline-offset: 2px;
}

.cg-appt-dialog__header {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding-right: 48px;
        margin-bottom: 32px;
}

.cg-appt-dialog__eyebrow {
        color: #570801;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.4;
        letter-spacing: .04em;
        text-transform: uppercase;
}

.cg-appt-dialog__title {
        color: #211F1D;
        font-size: 36px;
        font-weight: 700;
        line-height: 1.12;
}

.cg-appt-dialog__intro {
        max-width: 62ch;
        color: #5E5954;
        font-size: 17px;
        line-height: 1.6;
}

.cg-appt-form {
        display: flex;
        flex-direction: column;
        gap: 28px;
}

.cg-appt-form__section {
        display: flex;
        flex-direction: column;
        gap: 18px;
}

.cg-appt-form__section + .cg-appt-form__section {
        padding-top: 28px;
        border-top: 1px solid #DDD8D3;
}

.cg-appt-form__section-head {
        display: flex;
        flex-direction: column;
        gap: 8px;
}

.cg-appt-form__section-head p {
        color: #5E5954;
        font-size: 15px;
        line-height: 1.5;
}

.cg-appt-form__section-title,
.cg-appt-form__fieldset legend {
        color: #211F1D;
        font-size: 20px;
        font-weight: 600;
        line-height: 1.3;
}

.cg-appt-form__fieldset {
        padding: 0;
        border: 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
}

.cg-appt-form__choices {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
}

.cg-appt-form__choice {
        min-height: 72px;
        display: flex;
        align-items: flex-start;
        gap: 11px;
        box-sizing: border-box;
        padding: 15px 16px;
        border: 1px solid #DDD8D3;
        border-radius: 7px;
        background: #FFFFFF;
        cursor: pointer;
}

.cg-appt-form__choice--large {
        min-height: 132px;
}

.cg-appt-form__choice:has(input:checked) {
        border-color: #570801;
        background: #FCFAF9;
        box-shadow: inset 0 3px 0 #570801;
}

.cg-appt-form__choice input {
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        margin: 2px 0 0;
        accent-color: #570801;
}

.cg-appt-form__choice-copy {
        display: flex;
        flex-direction: column;
        gap: 5px;
}

.cg-appt-form__choice-copy strong {
        color: #211F1D;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.35;
}

.cg-appt-form__choice-copy small {
        color: #5E5954;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.5;
}

.cg-appt-form__decision-help {
        color: #4F4944;
        font-size: 14px;
        line-height: 1.55;
}

.cg-appt-form__rule,
.cg-appt-form__reschedule-note {
        display: flex;
        flex-direction: column;
        gap: 7px;
        padding: 18px 20px;
        border-radius: 7px;
        background: #F7F5F2;
        border-left: 3px solid #570801;
}

.cg-appt-form__rule[hidden],
.cg-appt-form__reschedule-note[hidden] {
        display: none;
}

.cg-appt-form__rule strong,
.cg-appt-form__reschedule-note strong {
        color: #211F1D;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
}

.cg-appt-form__rule p,
.cg-appt-form__reschedule-note p {
        color: #5E5954;
        font-size: 14px;
        line-height: 1.55;
}

.cg-appt-form__row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
}

.cg-appt-form__field {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
}

.cg-appt-form__field[hidden] {
        display: none;
}

.cg-appt-form__field label {
        color: #211F1D;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.4;
}

.cg-appt-form__field input,
.cg-appt-form__field select {
        width: 100%;
        min-height: 48px;
        box-sizing: border-box;
        padding: 10px 12px;
        border: 1px solid #BEB8B1;
        border-radius: 4px;
        background: #FFFFFF;
        color: #211F1D;
        font: inherit;
}

.cg-appt-form__field input:focus,
.cg-appt-form__field select:focus {
        border-color: #570801;
        outline: 2px solid rgba(87, 8, 1, 0.14);
        outline-offset: 1px;
}

.cg-appt-form__help {
        color: #6B655F;
        font-size: 14px;
        line-height: 1.5;
}

.cg-appt-form__appointments {
        display: flex;
        flex-direction: column;
        gap: 14px;
}

.cg-appt-form__appointment {
        display: flex;
        flex-direction: column;
        gap: 13px;
        padding: 18px;
        border: 1px solid #DDD8D3;
        border-radius: 7px;
        background: #FCFAF9;
}

.cg-appt-form__appointment-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
}

.cg-appt-form__appointment-head strong {
        color: #211F1D;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
}

.cg-appt-form__remove,
.cg-appt-form__add {
        padding: 0;
        border: 0;
        background: transparent;
        color: #570801;
        font: inherit;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.4;
        text-decoration: underline;
        text-underline-offset: 3px;
        cursor: pointer;
}

.cg-appt-form__remove[hidden],
.cg-appt-form__add[hidden] {
        display: none;
}

.cg-appt-form__add {
        align-self: flex-start;
        font-size: 15px;
}

.cg-appt-form__remove:focus-visible,
.cg-appt-form__add:focus-visible {
        outline: 2px solid #570801;
        outline-offset: 3px;
}

.cg-appt-form__privacy {
        color: #6B655F;
        font-size: 14px;
        line-height: 1.55;
}

.cg-appt-form__privacy a {
        color: #570801;
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 2px;
}

.cg-appt-form__status {
        display: none;
        padding: 14px 16px;
        border-radius: 6px;
        font-size: 15px;
        line-height: 1.5;
}

.cg-appt-form__status.is-visible {
        display: block;
}

.cg-appt-form__status.is-success {
        background: #F2FAFE;
        border: 1px solid #B8D8E7;
        color: #17445B;
}

.cg-appt-form__status.is-error {
        background: #FFF5F4;
        border: 1px solid #E4B8B4;
        color: #751A13;
}

.cg-appt-form__actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px 16px;
}

.cg-appt-form__submit,
.cg-appt-form__cancel {
        min-height: 48px;
        padding: 11px 20px;
        border-radius: 4px;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.25;
        cursor: pointer;
}

.cg-appt-form__submit {
        border: 1px solid #570801;
        background: #570801;
        color: #FFFFFF;
}

.cg-appt-form__submit:hover {
        background: #3F0601;
        border-color: #3F0601;
}

.cg-appt-form__cancel {
        border: 1px solid #BEB8B1;
        background: #FFFFFF;
        color: #211F1D;
}

.cg-appt-form__cancel:hover {
        background: #F7F5F2;
}

.cg-appt-form__submit:focus-visible,
.cg-appt-form__cancel:focus-visible {
        outline: 2px solid #570801;
        outline-offset: 3px;
}

.cg-appt-form__submit[disabled] {
        opacity: .6;
        cursor: wait;
}

@media (max-width: 767px) {
        .cg-appt-modal {
                align-items: flex-end;
                padding: 0;
        }

        .cg-appt-dialog {
                width: 100%;
                max-height: 92vh;
                padding: 32px 20px 24px;
                border-radius: 12px 12px 0 0;
        }

        .cg-appt-dialog__header {
                padding-right: 40px;
                margin-bottom: 28px;
        }

        .cg-appt-dialog__title {
                font-size: 30px;
        }

        .cg-appt-form__choices,
        .cg-appt-form__row {
                grid-template-columns: minmax(0, 1fr);
        }

        .cg-appt-form__choice--large {
                min-height: 0;
        }

        .cg-appt-form__actions {
                flex-direction: column;
                align-items: stretch;
        }

        .cg-appt-form__submit,
        .cg-appt-form__cancel {
                width: 100%;
        }
}

@media (prefers-reduced-motion: reduce) {
        .cg-appt-dialog,
        .cg-appt-modal__backdrop {
                scroll-behavior: auto;
        }
}
