.ticket-order {
    --ticket-red: #b21d20;
    --ticket-red-hover: #8e141a;
    --ticket-ink: #282021;
    --ticket-muted: #6c5c5e;
    --ticket-border: #e4d9d8;
    box-sizing: border-box;
    width: min(42rem, calc(100% - 2rem));
    max-width: none;
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 26px 88px rgba(33, 10, 13, .29);
    color: var(--ticket-ink);
    font: 400 1rem/1.5 var(--smpls-font-primary, Roboto, Arial, sans-serif);
    text-align: left;
    color-scheme: light;
}

.ticket-order::backdrop {
    background: rgba(27, 15, 17, .63);
}

html:has(.ticket-order[open]) {
    overflow: hidden;
}

.ticket-order [hidden] {
    display: none;
}

.ticket-order__header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 2rem;
    border-bottom: 1px solid var(--ticket-border);
    background: #fcf6f5;
}

.ticket-order__header h2,
.ticket-order__success h3 {
    margin: 0;
    color: var(--ticket-red);
    font: 700 clamp(1.55rem, 4.4vw, 2.2rem)/1.15 "Playfair Display", Georgia, serif;
    letter-spacing: -.02em;
}

.ticket-order__close {
    flex: 0 0 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--ticket-border);
    border-radius: 50%;
    background: #fff;
    color: var(--ticket-red);
    font: 400 1.5rem/1 Arial, sans-serif;
    cursor: pointer;
}

.ticket-order__close:hover {
    border-color: var(--ticket-red);
}

.ticket-order__body {
    margin: 0;
    padding: 1.5rem 2rem 1.75rem;
}

.ticket-order__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .95rem 1rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.ticket-order__selection {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8rem;
    gap: .95rem 1rem;
}

.ticket-order__ticket {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.ticket-order__ticket-caption {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    color: var(--ticket-red);
    font-size: .9rem;
    font-weight: 600;
}

.ticket-order__fields label {
    display: grid;
    gap: .35rem;
    min-width: 0;
    margin: 0;
    color: var(--ticket-ink);
    font-size: .9rem;
    font-weight: 600;
}

.ticket-order__wide {
    grid-column: 1 / -1;
}

.ticket-order__muted {
    color: var(--ticket-muted);
    font-weight: 400;
}

.ticket-order__fields :is(input, select, textarea) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 2.8rem;
    margin: 0;
    padding: .55rem .75rem;
    border: 1px solid var(--ticket-border);
    border-radius: .55rem;
    background-color: #fff;
    box-shadow: none;
    color: var(--ticket-ink);
    font: 400 1rem/1.4 var(--smpls-font-primary, Roboto, Arial, sans-serif);
}

.ticket-order__fields textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.ticket-order :is(input, select, textarea, button):focus-visible {
    outline: 2px solid var(--ticket-red);
    outline-offset: 2px;
}

.ticket-order__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--ticket-border);
}

.ticket-order__submit {
    min-height: 2.9rem;
    padding: .6rem 1.5rem;
    border: 0;
    border-radius: 999px;
    background: var(--ticket-red);
    color: #fff;
    font: 600 .95rem/1.35 var(--smpls-font-primary, Roboto, Arial, sans-serif);
    cursor: pointer;
}

.ticket-order__submit:hover {
    background: var(--ticket-red-hover);
}

.ticket-order__submit:disabled {
    opacity: .75;
    cursor: wait;
}

.ticket-order__error {
    margin: 1rem 0 0;
    padding: .75rem 1rem;
    border-radius: .55rem;
    background: #fcf0ef;
    color: #861820;
}

.ticket-order__success {
    padding-block: 2.5rem;
    text-align: center;
}

.ticket-order__success p {
    margin: .75rem 0 1.5rem;
    color: var(--ticket-muted);
}

@media (max-width: 36rem) {
    .ticket-order {
        width: calc(100% - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .ticket-order__header,
    .ticket-order__body {
        padding: 1rem;
    }

    .ticket-order__selection {
        display: contents;
    }

    .ticket-order__fields {
        gap: .7rem .75rem;
    }

    .ticket-order__ticket,
    .ticket-order__fields > label:not(.ticket-order__compact) {
        grid-column: 1 / -1;
    }

    .ticket-order__fields select {
        padding-inline-start: .5rem;
    }

    .ticket-order__actions .ticket-order__submit {
        width: 100%;
    }
}
