/* Ticket option card (TicketCard component). Laid out on a 7-row subgrid so badges, prices and buttons line up across cards. */

.ticket-card {
    display: grid;
    grid-row: span 7;
    grid-template-rows: subgrid;
    filter: drop-shadow(0 26px 30px rgba(30, 0, 8, .35)) drop-shadow(0 4px 8px rgba(30, 0, 8, .18));
    /*
     * The notch mask under stacked drop-shadow filters is costly to paint.
     * On its own layer the card is painted once and only moved while the
     * page scrolls, instead of being repainted (and showing blank for a
     * moment) each time it comes into view.
     */
    will-change: transform;
}

.ticket-card.is-highlight {
    filter:
        drop-shadow(1.5px 0 0 var(--c-gold)) drop-shadow(-1.5px 0 0 var(--c-gold))
        drop-shadow(0 1.5px 0 var(--c-gold)) drop-shadow(0 -1.5px 0 var(--c-gold))
        drop-shadow(0 30px 34px rgba(30, 0, 8, .42)) drop-shadow(0 4px 8px rgba(30, 0, 8, .2));
}

.ticket-card__body {
    --notch: 13px;
    --cut-y: 150px;
    grid-row: 1 / span 7;
    display: grid;
    grid-template-rows: subgrid;
    justify-items: center;
    align-content: start;
    height: 100%;
    padding: clamp(24px, 2.2vw, 32px) clamp(16px, 1.6vw, 24px) clamp(22px, 2vw, 28px);
    border-radius: 12px;
    background: var(--c-card);
    color: var(--c-ink);
    text-align: center;
}

.ticket-card :focus-visible { outline-color: var(--c-accent); }

.ticket-card__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
}

.ticket-card__badge span {
    padding: 6px 16px;
    border-radius: 6px;
    background: var(--c-accent);
    color: var(--c-cream);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1.3;
}

.ticket-card__name {
    margin: 12px 0 0;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(1.75rem, 2.2vw, 2.125rem);
    line-height: 1.05;
    color: var(--c-accent);
    text-wrap: balance;
}

.ticket-card__perf {
    align-self: start;
    width: calc(100% + 2 * clamp(16px, 1.6vw, 24px) - 2 * var(--notch) - 16px);
    height: 0;
    margin: clamp(18px, 1.8vw, 24px) 0 0;
    border: 0;
    border-top: 1.5px dashed var(--c-line);
}

.ticket-card__price {
    margin: clamp(18px, 1.8vw, 24px) 0 0;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(3.375rem, 4.6vw, 4.5rem);
    line-height: 1;
    color: var(--c-accent);
    font-variant-numeric: lining-nums;
}

.ticket-card__ended {
    margin: clamp(22px, 2vw, 30px) 0 6px;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(1.875rem, 2.4vw, 2.25rem);
    line-height: 1.1;
    color: #6B6262;
}

.ticket-card__note {
    min-height: 1.5em;
    margin: 8px 0 0;
    font-size: 0.9375rem;
    color: var(--c-ink-soft);
}

/* what's included: the option's description from the admin editor, ideally a bullet list */
.ticket-card__items {
    justify-self: stretch;
    width: 100%;
    margin: clamp(16px, 1.6vw, 22px) 0 clamp(22px, 2vw, 28px);
    padding: 0 0 0 clamp(4px, 1.2vw, 22px);
    font-size: clamp(1rem, 1.15vw, 1.0938rem);
    text-align: left;
}

.ticket-card__items ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }

.ticket-card__items li { display: flex; align-items: center; gap: 16px; }

.ticket-card__items li::before {
    content: "";
    flex: none;
    width: 26px;
    height: 26px;
    background: var(--c-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.2 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.2 4L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ticket-card__buy { align-self: end; width: 100%; }
.ticket-card__buy.btn,
.ticket-card__buy .btn { padding-inline: 20px; }

/* sales ended */
.ticket-card.is-ended { filter: drop-shadow(0 18px 22px rgba(30, 0, 8, .28)); }
.ticket-card.is-ended .ticket-card__body { background: #E7E1DB; color: #6B6262; }
.ticket-card.is-ended .ticket-card__badge span { background: #8A8080; }
.ticket-card.is-ended .ticket-card__name { color: #7D7373; }
.ticket-card.is-ended .ticket-card__items li::before { background: #7D7373; }
.ticket-card.is-ended .ticket-card__items { opacity: .75; }
