/*
 * Arcade Comedy Theater — poster grid styling.
 *
 * Scoped, minimal subset pulled from arcade-child/style.css (design tokens,
 * .btn/.btn-ghost, .pill/.pill-time, .poster-grid/.poster* — sections 00,
 * 05, 06, 16 of that file). Deliberately NOT the whole stylesheet: that file
 * also carries global resets and nav/footer overrides (sections 02, 07, 29,
 * 30) meant for when arcade-child is the site's actual active theme, which
 * it currently isn't. Loading it wholesale would touch parts of the page
 * that have nothing to do with the shows grid. This file only defines the
 * exact classes arcade_gl_render_poster_card() and the [arcade_shows_grid]/
 * Grid View markup actually use, so it's safe to enqueue anywhere.
 *
 * Once arcade-child (or its design tokens) become the real site theme,
 * this file is redundant and can be dropped — the real stylesheet will
 * already define all of this.
 */

:root {
    --pink: #ca2779;
    --pink-hot: #ff3d8b;
    --purple: #6b4bc4;
    --purple-deep: #3f2c7e;
    --blue: #2773ca;
    --ink: #1d1626;
    --surface: #ffffff;
    --r-sm: 6px;
    --r-md: 10px;
    --shadow-md: 0 8px 32px rgba(29, 22, 38, 0.10);
    --shadow-lift: 0 20px 56px rgba(202, 39, 121, 0.22);
    --display: 'Oswald', sans-serif;
}

/* Buttons (arcade-child/style.css §05) */
.arcade-shows-grid .btn,
.arcade-grid-nav .btn {
    display: inline-block;
    font-family: var(--display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: var(--r-sm);
    border: none;
    cursor: pointer;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s, border-color 0.18s;
}
.arcade-shows-grid .btn-ghost,
.arcade-grid-nav .btn-ghost {
    background: transparent;
    color: var(--ink);
    padding: 11px 22px;
    border: 1.5px solid var(--ink);
}
.arcade-shows-grid .btn-ghost:hover,
.arcade-grid-nav .btn-ghost:hover {
    border-color: var(--pink);
    color: var(--pink);
}

.poster .btn {
    display: inline-block;
    font-family: var(--display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: var(--r-sm);
    border: none;
    cursor: pointer;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s;
}
.poster .btn-pink {
    background: var(--pink);
    color: #fff;
    padding: 12px 24px;
}
.poster .btn-pink:hover {
    background: var(--pink-hot);
    color: #fff;
}
.poster .btn--full { display: block; width: 100%; }

/* Pills (arcade-child/style.css §06) */
.pill {
    display: inline-block;
    font-family: var(--display);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    line-height: 1.2;
    white-space: nowrap;
}
.pill-time { background: rgba(202, 39, 121, 0.10); color: var(--pink); }
.pill-cost { background: rgba(255, 230, 0, 0.20); color: #7a6200; }

/* Poster cards (arcade-child/style.css §16) */
/* padding lives on .poster-grid itself, not a wrapper — the shortcode's
   .arcade-shows-grid wrapper and the native Grid View's TEC-generated
   container classes are different elements, but both contain .poster-grid */
.poster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 24px 16px; }

/* .poster is a div now (not the link) — .poster__link wraps the
   clickable image+title+details area, and the "Get Tickets" button is a
   sibling so it isn't nested inside that link (invalid HTML otherwise). */
.poster {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--r-md);
    /* overflow stays visible so the hover peek can float outside the card;
       .poster__img clips its own contents, so nothing else needs the crop. */
    box-shadow: var(--shadow-md);
    transition: transform 0.22s, box-shadow 0.22s;
}
.poster:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.poster__link { border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden; }

/* Hover peek — the full uncropped poster + a description snippet, floating
   over the card. Desktop/mouse only: touch devices and small screens never
   see it (display:none below), and the element is aria-hidden either way. */
.poster__peek { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    .poster__peek {
        display: block;
        position: absolute;
        top: -14px;
        left: 50%;
        width: 116%;
        transform: translateX(-50%) translateY(8px) scale(0.97);
        opacity: 0;
        pointer-events: none;
        z-index: 40;
        background: var(--surface);
        border-radius: var(--r-md);
        padding: 10px 10px 6px;
        box-shadow: 0 26px 70px rgba(29, 22, 38, 0.38);
        transition: opacity 0.18s ease, transform 0.18s ease;
        transition-delay: 0s;
    }
    /* Small delay so grazing the grid doesn't strobe peeks */
    .poster:hover { z-index: 41; }
    .poster:hover .poster__peek {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
        transition-delay: 0.12s;
    }
    .poster__peek-img {
        aspect-ratio: 4 / 5;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        background-color: var(--ink);
        border-radius: var(--r-sm);
    }
    .poster__peek-desc {
        font-size: 12.5px;
        line-height: 1.55;
        color: #444;
        padding: 9px 6px 6px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.poster__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: var(--ink);
}

.poster__cta { padding: 0 20px 24px; }

.poster__img {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center top;
    background-color: var(--purple-deep);
    display: flex;
    align-items: flex-end;
    padding: 14px;
    overflow: hidden;
}
.poster__img::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 7px 7px;
}
.poster__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(29, 22, 38, 0.68), transparent 55%);
}
.poster__img-title {
    position: relative;
    z-index: 1;
    font-family: var(--display);
    font-weight: 700;
    font-size: 24px;
    text-transform: uppercase;
    color: #fff;
    line-height: 0.96;
}
.poster__body {
    /* !important: Divi's own builder CSS wins this padding fight otherwise —
       confirmed via DevTools that a non-!important rule here gets crossed
       out by something else in the cascade (couldn't pin the exact rule in
       Divi's minified CSS, but this is a well-known Divi pattern). */
    padding: 28px 20px 32px !important;
    text-align: center;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.poster__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.poster__body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pink), var(--blue), var(--purple));
}
.poster__name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    line-height: 1.1;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .poster-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    .poster-grid { grid-template-columns: 1fr; }
}

/* Supporting layout for our own wrapper classes (no arcade-child equivalent yet) */
.arcade-shows-grid__empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--ink);
    font-family: var(--display);
}
.arcade-shows-grid__more,
.arcade-grid-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}
