/* ================================================================
   Treble Ahead Events — front-end styles
   Brand tokens mirror the child theme so this looks identical
   whether the child theme is loaded or not.
   ================================================================ */

:root {
    --tae-yellow:      #FFD700;
    --tae-yellow-soft: rgba(255, 215, 0, 0.12);
    --tae-yellow-bg:   rgba(255, 215, 0, 0.07);
    --tae-yellow-bg-h: rgba(255, 215, 0, 0.40);
    --tae-card:        #1E1E1E;
    --tae-text:        #F5F0E8;
    --tae-muted:       #8A8A8A;
    --tae-font-head:   'Playfair Display', Georgia, serif;
    --tae-font-mono:   'Space Mono', monospace;
    --tae-ease:        0.25s ease;
}

/* ── List ─────────────────────────────────────────────────────── */
ul.tae-events {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

li.tae-event {
    display: flex;
    align-items: stretch;
    background: var(--tae-card);
    border: 1px solid var(--tae-yellow-soft);
    transition: border-color var(--tae-ease);
}
li.tae-event:hover,
li.tae-event:focus-within {
    border-color: var(--tae-yellow-bg-h);
}

/* ── Date badge ───────────────────────────────────────────────── */
.tae-event__date {
    flex: 0 0 auto;
    width: 72px;
    background: var(--tae-yellow-bg);
    border-right: 1px solid var(--tae-yellow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 0;
}
.tae-event__month {
    font-family: var(--tae-font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--tae-yellow);
    line-height: 1;
}
.tae-event__day {
    font-family: var(--tae-font-head);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--tae-text);
    line-height: 1.1;
    margin-top: 0.25rem;
}

/* ── Body ─────────────────────────────────────────────────────── */
.tae-event__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tae-event__venue {
    font-family: var(--tae-font-head);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tae-text);
    overflow-wrap: break-word;
    margin-bottom: 0.25rem;
}
.tae-event__venue a {
    color: inherit;
    text-decoration: none;
}
.tae-event__venue a:hover,
.tae-event__venue a:focus-visible {
    color: var(--tae-yellow);
}
.tae-event__meta {
    font-family: var(--tae-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--tae-muted);
}

/* ── Empty state ──────────────────────────────────────────────── */
p.tae-empty {
    color: var(--tae-muted);
    font-size: 0.875rem;
}

/* ── CTAs ─────────────────────────────────────────────────────── */
.tae-cta {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.tae-cta__primary,
.tae-cta__secondary {
    font-family: var(--tae-font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    transition: background var(--tae-ease), color var(--tae-ease);
}
.tae-cta__primary {
    background: var(--tae-yellow);
    color: #0A0A0A;
}
.tae-cta__primary:hover,
.tae-cta__primary:focus-visible {
    background: #d4b000;
    color: #0A0A0A;
}
.tae-cta__secondary {
    color: var(--tae-yellow);
    border: 1px solid var(--tae-yellow-bg-h);
}
.tae-cta__secondary:hover,
.tae-cta__secondary:focus-visible {
    background: var(--tae-yellow-bg);
}

/* ── Focus visibility ─────────────────────────────────────────── */
.tae-event a:focus-visible,
.tae-cta__primary:focus-visible,
.tae-cta__secondary:focus-visible {
    outline: 2px solid var(--tae-yellow);
    outline-offset: 3px;
}

/* ================================================================
   Event poster — thumbnail + lightbox  (added v1.4.0)
   ================================================================ */

/* ── Poster thumbnail button in the list row ─────────────────── */

.tae-event__poster-btn {
    flex: 0 0 auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 68px;
    padding: 0.75rem 0.5rem;
    background: var(--tae-yellow-bg);
    border: none;
    border-left: 1px solid var(--tae-yellow-soft);
    cursor: pointer;
    transition:
        background var(--tae-ease),
        border-color var(--tae-ease);
    /* Remove default button appearance */
    -webkit-appearance: none;
    appearance: none;
}

.tae-event__poster-btn:hover,
.tae-event__poster-btn:focus-visible {
    background: var(--tae-yellow-bg-h);
    border-left-color: rgba(255, 215, 0, 0.4);
    outline: none;
}

.tae-event__poster-btn:focus-visible {
    outline: 2px solid var(--tae-yellow);
    outline-offset: -2px;
}

.tae-event__poster-thumb {
    display: block;
    width: 48px;
    height: 64px;
    object-fit: cover;
    border: 1px solid var(--tae-yellow-soft);
    transition: transform var(--tae-ease), border-color var(--tae-ease);
}

.tae-event__poster-btn:hover .tae-event__poster-thumb,
.tae-event__poster-btn:focus-visible .tae-event__poster-thumb {
    transform: scale(1.04);
    border-color: rgba(255, 215, 0, 0.5);
}

.tae-event__poster-hint {
    font-family: var(--tae-font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tae-yellow);
    line-height: 1;
}

/* ── Lightbox overlay ────────────────────────────────────────── */

#tae-poster-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0);
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
    cursor: pointer;
}

#tae-poster-lightbox.tae-lightbox--open {
    display: flex;
    background: rgba(0, 0, 0, 0.90);
}

/* Prevent body scroll while lightbox is open */
body.tae-lightbox-active {
    overflow: hidden;
}

#tae-poster-img {
    display: block;
    max-width: min(88vw, 560px);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: default;
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.9);
    /* Subtle entrance animation */
    animation: tae-poster-in 0.22s ease both;
}

@keyframes tae-poster-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

#tae-poster-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--tae-yellow);
    font-size: 1.5rem;
    line-height: 1;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--tae-ease), border-color var(--tae-ease);
    -webkit-appearance: none;
    appearance: none;
}

#tae-poster-close:hover,
#tae-poster-close:focus-visible {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--tae-yellow);
    outline: none;
}

#tae-poster-close:focus-visible {
    outline: 2px solid var(--tae-yellow);
    outline-offset: 2px;
}

/* ── Responsive — tighten up on narrow screens ───────────────── */

@media (max-width: 480px) {
    .tae-event__poster-btn {
        width: 56px;
        padding: 0.5rem 0.35rem;
    }
    .tae-event__poster-thumb {
        width: 40px;
        height: 54px;
    }
    .tae-event__poster-hint {
        display: none;
    }
}