/* The fixed block of a show page (template-parts/show-info.php): white, in the
   house type, the same on every show. A design only sets --show-accent (the
   button and the status colour) and where the block sits. */

/* The accent falls back to the house gold where it is used, never set here:
   set on .show-info, it would hide the design's own. */
.show-info {
    display: grid;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-md);
    background-color: var(--paper);
    color: var(--ink);
}

.show-info-heading {
    font-family: var(--font-sans);
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.1;
}

.show-info-lead {
    margin: var(--space-xs) 0 0;
    font-size: var(--text-lg);
}

/* The venue, linked to Google Maps. */
.show-info-venue {
    margin: 0.15rem 0 var(--space-md);
}

.show-info-venue a {
    color: var(--smoke);
    text-decoration: underline;
    text-decoration-color: var(--show-accent, var(--gold));
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.3em;
    transition: color var(--duration-normal) ease;
}

.show-info-venue a:hover {
    color: var(--ink);
}

/* The dates as small cards, like tickets: the weekday, the day large, month
   and year, the time. Three to a row on a phone; from 640px one row that runs
   the full width, where a narrow card (many dates) shortens the weekday and
   month. A screen reader hears the full date. */
.show-dates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xs);
    list-style: none;
}

.show-date {
    flex: 1 1 0;
    min-width: 0;
    container-type: inline-size;
    border: 1px solid var(--line);
}

.show-date-face {
    display: grid;
    justify-items: center;
    padding: var(--space-xs) 0.15rem var(--space-sm);
    text-align: center;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.show-date-weekday,
.show-date-month {
    font-size: var(--text-xs);
    white-space: nowrap;
    color: var(--smoke);
}

.show-date-weekday::first-letter {
    text-transform: uppercase;
}

.show-date-short {
    display: none;
}

.show-date-day {
    margin-block: 0.1rem;
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: 1;
}

.show-date-time {
    align-self: stretch;
    margin-top: var(--space-xs);
    padding-top: var(--space-xs);
    border-top: 1px solid var(--line);
    font-size: var(--text-sm);
    font-weight: 600;
}

.show-date-status {
    margin-top: 0.2rem;
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.15;
    color: var(--show-accent-text, var(--gold-ink));
}

@container (max-width: 5.5rem) {
    .show-date-long {
        display: none;
    }

    .show-date-short {
        display: inline;
    }

    .show-date-day {
        font-size: var(--text-xl);
    }

    .show-date-time,
    .show-date-status {
        font-size: var(--text-xs);
    }
}

/* Too narrow for its words, a status is a coloured bar on top of the card
   (the screen reader still hears it); the type scales with the card. */
@container (max-width: 4.5rem) {
    .show-date-face {
        padding-inline: 0;
    }

    .show-date-weekday,
    .show-date-month {
        font-size: min(var(--text-xs), 34cqi);
    }

    .show-date-day {
        font-size: min(var(--text-xl), 52cqi);
    }

    .show-date-time {
        font-size: min(var(--text-xs), 29cqi);
    }

    .show-date-status {
        display: none;
    }

    .show-date-face:has(.show-date-status) {
        box-shadow: inset 0 3px 0 var(--show-accent-text, var(--gold-ink));
    }

    .show-date--sold_out .show-date-face:has(.show-date-status) {
        box-shadow: inset 0 3px 0 var(--alert);
    }
}

/* A date that sells is a link to the ticket shop: on hover or focus the card
   turns gold, the colour of tickets on every show. */
.show-date-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.show-date:has(.show-date-link:is(:hover, :focus-visible)) {
    border-color: var(--gold);
    box-shadow: inset 0 0 0 1px var(--gold);
}

.show-date-link:is(:hover, :focus-visible) .show-date-day {
    color: var(--gold-ink);
}

.show-date--cancelled :is(.show-date-day, .show-date-time) {
    text-decoration: line-through;
    text-decoration-color: var(--alert);
    color: var(--smoke);
}

.show-date--sold_out .show-date-status,
.show-date--cancelled .show-date-status {
    color: var(--alert);
}

/* Under the dates: what a ticket costs and how buying goes, then the button. */
.show-info-buy {
    display: grid;
    justify-items: start;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.show-info-note {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--smoke);
}

.show-info-price {
    white-space: nowrap;
}

.show-info-price strong {
    font-weight: 600;
    color: var(--ink);
}

.btn--show {
    background-color: var(--show-accent, var(--gold));
    border-color: var(--show-accent, var(--gold));
    color: var(--show-accent-ink, var(--ink));
}

/* Hover turns the button ink; a design whose button is already ink gives
   another hover (--show-accent-hover, --show-accent-hover-ink). */
.btn--show:hover {
    background-color: var(--show-accent-hover, var(--ink));
    border-color: var(--ink);
    color: var(--show-accent-hover-ink, var(--paper));
}

.show-info-next {
    margin: var(--space-md) 0 0;
}

/* The flyer, opens in the lightbox. On a phone a small poster pinned in the
   top corner, over the edge of the block, beside the heading; on a wider
   screen beside the dates. */
.show-info:has(.show-info-flyer) {
    --flyer-width: 4.75rem;
    position: relative;
}

.show-info:has(.show-info-flyer--wide) {
    --flyer-width: 7rem;
}

.show-info:has(.show-info-flyer) :is(.show-info-heading, .show-info-lead) {
    padding-right: calc(var(--flyer-width) + var(--space-sm));
}

.show-info-flyer {
    position: absolute;
    top: calc(-1 * var(--space-md));
    right: var(--space-sm);
    width: var(--flyer-width);
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    transform: rotate(3deg);
    box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 0.25);
    transition: transform var(--duration-normal) ease;
}

.show-info-flyer:hover {
    transform: rotate(0deg) scale(1.02);
}

.show-info-flyer img {
    display: block;
    width: 100%;
    height: auto;
}

/* A landscape flyer is an opened folder: a soft fold down the middle. */
.show-info-flyer--wide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 46%, rgb(0 0 0 / 0.12) 49.6%, rgb(255 255 255 / 0.18) 50.4%, transparent 54%);
    pointer-events: none;
}

/* FAQ (template-parts/show-faq.php): native disclosure, keyboard and screen
   reader friendly. */
.faq-details {
    border-bottom: 1px solid var(--line);
}

.faq-details:first-of-type {
    border-top: 1px solid var(--line);
}

.faq-details summary {
    position: relative;
    padding: var(--space-sm) var(--space-xl) var(--space-sm) 0;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.faq-details summary::-webkit-details-marker {
    display: none;
}

.faq-details summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-lg);
}

.faq-details[open] summary::after {
    content: '−';
}

.faq-details-answer {
    padding: 0 var(--space-xl) var(--space-sm) 0;
    color: var(--smoke);
    text-wrap: pretty;
}

@media (min-width: 640px) {
    .show-dates {
        display: flex;
    }

    .show-info {
        grid-template-columns: 1fr;
        align-items: start;
        padding: var(--space-xl);
    }

    .show-info:has(.show-info-flyer) {
        grid-template-columns: 1fr auto;
    }

    .show-info:has(.show-info-flyer) :is(.show-info-heading, .show-info-lead) {
        padding-right: 0;
    }

    /* Beside the dates, in the middle of the block: a poster as tall as the
       block, a folder wider and less tall, about as much paper. */
    .show-info-flyer {
        position: relative;
        top: auto;
        right: auto;
        align-self: center;
        width: 13rem;
        transform: rotate(2deg);
    }

    .show-info-flyer--wide {
        width: 18rem;
        transform: rotate(-2deg);
    }
}

@media (min-width: 1024px) {
    .show-info {
        column-gap: var(--space-2xl);
    }

    .show-info-heading {
        font-size: var(--text-2xl);
    }

    .show-info-flyer {
        width: 15rem;
    }

    .show-info-flyer--wide {
        width: 21rem;
    }
}
