/* =========================================================================
   WhatsOnMasonry block — tiyatro-hayali theme skin
   -------------------------------------------------------------------------
   The block's STRUCTURE (CSS columns, card shapes, badge geometry, the
   stretched link, reduced-motion handling) ships inline with the view
   (resources/views/tenant/blocks/WhatsOnMasonry/view.blade.php), every
   colour behind a --whats-on-masonry-* knob. This file is the paint only:
   it turns those knobs plus a few borders and type details, and touches no
   layout. Deleting it leaves the block fully usable on its baseline.

   The baseline <style> is emitted inline by the view (after this file loads
   in <head>), so every rule is scoped under `body` to win on specificity
   regardless of order.

   Tiyatro Hayali is the theatrical dark-navy stage with a marquee-red
   accent: smoked-glass cards, a soft red glow when one is hovered, the date
   badge in the marquee red (the Brand Kit primary when the tenant set one),
   and a red-curtain tile for a production with no picture. The theme has no
   derived tokens of its own, so the tints below are mixed from the contract
   variables (partials/styles.blade.php) and follow a tenant repaint:

     --color-bg / --color-text / --color-accent / --color-accent-hover
     --brand-primary          the Brand Kit's status accent, when set
     --font-heading / --font-body / --font-accent
   ========================================================================= */

body .st-whats-on-masonry {
    color: var(--color-text);

    /* Cards: smoked glass on the stage navy. */
    --whats-on-masonry-radius: 8px;
    --whats-on-masonry-card-bg: color-mix(in srgb, var(--color-text) 4%, transparent);
    --whats-on-masonry-card-color: var(--color-text);
    --whats-on-masonry-card-shadow: 0 20px 40px -24px color-mix(in srgb, var(--color-bg) 95%, transparent);

    /* The marquee red on the calendar badge. */
    --whats-on-masonry-accent: var(--brand-primary, var(--color-accent));
    --whats-on-masonry-accent-text: #fff;

    /* Hover: the stage navy rising from the bottom (pictures are never zoomed or cropped). */
    --whats-on-masonry-overlay: linear-gradient(to top, color-mix(in srgb, var(--color-bg) 85%, transparent), transparent 65%);

    /* Type. */
    --whats-on-masonry-name-font: var(--font-heading);
    --whats-on-masonry-meta-color: color-mix(in srgb, var(--color-text) 70%, transparent);

    /* No-image tiles: a red curtain drawn over the navy, solid so the
       builder's sample sheen still has something to sit on. */
    --whats-on-masonry-placeholder-bg: color-mix(in srgb, var(--color-accent) 20%, var(--color-bg));
    --whats-on-masonry-placeholder-text: var(--color-text);
}

/* ── Cards ────────────────────────────────────────────────────────────── */

body .st-whats-on-masonry__card {
    border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

body .st-whats-on-masonry__card:hover,
body .st-whats-on-masonry__card:focus-within {
    border-color: color-mix(in srgb, var(--color-accent) 60%, transparent);
    box-shadow: 0 24px 48px -22px color-mix(in srgb, var(--color-accent) 35%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
    body .st-whats-on-masonry__card {
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    }
}

/* ── Type ─────────────────────────────────────────────────────────────────
   The block heading is .block-title-global and belongs to the Brand Kit;
   this is the theme's voice around it. */

body .st-whats-on-masonry__name {
    font-weight: 600;
    letter-spacing: -0.01em;
}

body .st-whats-on-masonry__type-name {
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

body .st-whats-on-masonry__meta,
body .st-whats-on-masonry__empty-text {
    font-family: var(--font-body);
}

/* The 70% mix is the contrast floor; the baseline's extra dimming would
   push the time and venue line below it. */
body .st-whats-on-masonry__meta {
    opacity: 1;
}

body .st-whats-on-masonry__range {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: color-mix(in srgb, var(--color-text) 70%, transparent);
    opacity: 1;
}

body .st-whats-on-masonry__weekday,
body .st-whats-on-masonry__month {
    font-family: var(--font-body);
    letter-spacing: 0.08em;
}

body .st-whats-on-masonry__day {
    font-family: var(--font-heading);
}

body .st-whats-on-masonry__date {
    box-shadow: 0 6px 18px color-mix(in srgb, var(--color-accent) 30%, transparent);
}

/* Keyboard focus on the stretched link: the accent, not currentColor. */
body .st-whats-on-masonry__link:focus-visible::after {
    outline-color: var(--color-accent);
}

/* ── Empty state and builder note ─────────────────────────────────────── */

body .st-whats-on-masonry__empty {
    border: 1px dashed color-mix(in srgb, var(--color-text) 15%, transparent);
}

body .st-whats-on-masonry__empty-text {
    color: color-mix(in srgb, var(--color-text) 70%, transparent);
}

body .st-whats-on-masonry__programme {
    color: var(--color-accent);
    text-underline-offset: 0.2em;
}

body .st-whats-on-masonry__programme:hover,
body .st-whats-on-masonry__programme:focus-visible {
    color: var(--color-accent-hover, var(--color-accent));
}

body .st-whats-on-masonry__note {
    border-color: color-mix(in srgb, var(--color-text) 35%, transparent);
    color: color-mix(in srgb, var(--color-text) 85%, transparent);
    opacity: 1;
}
