/* The exhibition header: logo | name with the full name under it; under them the
   dates and venue, with the countdown at the row's end (exhibitions/partials/
   header_band.html); then a line. Straight on the header: no box. No motion. */

/* Logo | name. */
.exhibition-title {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.exhibition-title__logo {
    flex: none;
    max-block-size: 5rem;
    max-inline-size: 11rem;
    object-fit: contain;
}

/* Organizer logos are usually dark on transparent: a light plate on dark. */
[data-theme="dark"] .exhibition-title__logo {
    padding: var(--space-2);
    border-radius: var(--radius-md);
    background: var(--color-logo-plate);
}

.exhibition-title--logo .exhibition-title__text {
    padding-inline-start: var(--space-4);
    border-inline-start: 1px solid var(--color-border-default);
}

.exhibition-title h1 {
    margin: 0;
    line-height: var(--line-height-tight);
}

.exhibition-title__full {
    margin: var(--space-1) 0 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-lg);
    line-height: 1.35;
}

.exhibition-header--photo .exhibition-title__full {
    color: rgba(255, 255, 255, 0.85);
}

/* Dates and venue at the start, the countdown at the end. Colours follow the
   header's text, so it reads on a photo header too. */
.exhibition-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4) var(--space-6);
    margin-block-start: var(--space-5);
}

.exhibition-band p {
    margin: 0;
}

.exhibition-band__when {
    display: grid;
    gap: var(--space-3);
    min-inline-size: 0;
}

.exhibition-band__row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-inline-size: 0;
}

.exhibition-band__icon {
    flex: none;
    inline-size: 2rem;
    block-size: 2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.exhibition-band__date {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    line-height: 1.25;
}

.exhibition-band__venue {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.exhibition-band__note {
    color: var(--color-text-secondary);
}

.exhibition-header--photo .exhibition-band__note,
.exhibition-header--photo .exhibition-band__count-label {
    color: rgba(255, 255, 255, 0.85);
}

/* The countdown: plain text at the row's end, a large number over its words. */
.exhibition-band__end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-3);
    text-align: end;
}

.exhibition-band__count-value {
    color: var(--color-text-accent);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.exhibition-header--photo .exhibition-band__count-value {
    color: inherit;
}

.exhibition-band__count-value--word {
    font-size: var(--font-size-2xl);
}

.exhibition-band__count--ended .exhibition-band__count-value {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xl);
}

/* Number and words centred on each other. */
.exhibition-band__count {
    text-align: center;
}

.exhibition-band__count-label {
    margin-block-start: var(--space-1) !important;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
}

/* The line under it: a short accent rule, the sentence, then the open-to-register
   badges at its end. Italic in English only: Persian has no italics (ADR 0032) and
   slanted Chinese reads as broken. */
.exhibition-tagline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    margin: var(--space-5) 0 0;
    color: var(--color-text-secondary);
}

.exhibition-tagline p {
    margin: 0;
}

.exhibition-tagline__text:lang(en) {
    font-style: italic;
}

.exhibition-tagline__open {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-inline-start: auto !important;
}

.exhibition-tagline__open .exhibition-header__badge {
    font-style: normal;
    white-space: nowrap;
}

.exhibition-header--photo .exhibition-tagline {
    color: rgba(255, 255, 255, 0.9);
}

.exhibition-tagline::before {
    content: "";
    flex: none;
    inline-size: 3rem;
    block-size: 3px;
    border-radius: 2px;
    background: var(--color-brand-accent);
}

/* Phones: the countdown under the dates and venue, its number beside its words. */
@media (max-width: 40rem) {
    .exhibition-band__end {
        align-items: flex-start;
        text-align: start;
    }

    .exhibition-band__count {
        display: flex;
        align-items: baseline;
        gap: var(--space-2);
    }

    .exhibition-band__count-value {
        font-size: var(--font-size-2xl);
    }

    .exhibition-tagline__open {
        margin-inline-start: 0 !important;
    }
}

@media (max-width: 30rem) {
    .exhibition-title {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .exhibition-title--logo .exhibition-title__text {
        padding-inline-start: 0;
        border-inline-start: none;
    }
}
