/* =====================================================
   ===== STRYV4 LUCKY TICKETS · SHOP CSS · FRAME    =====
   ===== Phase C3 · file 1 / 4                      =====
   ===== Tag: STR · file: shop_frame_STR.css        =====
   ===================================================== */

/*
 * Frame layer: page chrome, top region, control row, ticket vendor strip,
 * showman console, filter row, footer, AND the trademark lights border.
 *
 * REVISION NOTE (2026-05-15, third pass): Section 5 reworked again,
 * this time properly. Abandoned the CSS-only pseudo-element bulb
 * approach — it fundamentally cannot match the glassy lamp look from
 * lotto_card_variations_v1_STR.html. Switched to true DOM-element
 * bulbs (one div per bulb, injected by lotto_shop_bulbs_v1_STR.js)
 * with styles copied verbatim from the variations file. The
 * .trademark-frame__sides div is repurposed as the bulb container —
 * no HTML structure changes required.
 */





/* =====================================================
   ===== SECTION 1: FONT DECLARATIONS               =====
   ===================================================== */

/* CodeNumber 1.1 — Self-hosted font face declarations. */

@font-face {
    font-family: 'CormorantGaramond';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/CormorantGaramond-Variable_STR.woff2') format('woff2-variations'),
         url('/fonts/CormorantGaramond-Variable_STR.woff2') format('woff2');
}

@font-face {
    font-family: 'CrimsonPro';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/CrimsonPro-Variable_STR.woff2') format('woff2-variations'),
         url('/fonts/CrimsonPro-Variable_STR.woff2') format('woff2');
}

@font-face {
    font-family: 'PlayfairDisplay';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/fonts/PlayfairDisplay-Variable_STR.woff2') format('woff2-variations'),
         url('/fonts/PlayfairDisplay-Variable_STR.woff2') format('woff2');
}

/* CodeNumber 1.2 — CarnivaleeFreakshow display face, shared with the
   WordPress site. Lives in the twentytwentyfive-child theme's fonts dir;
   referenced via root-relative URL since the lucky-tickets shop is on
   the same domain. Used for the ticket panel's brand banner. */
@font-face {
    font-family: 'CarnivaleeFreakshow';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/wp-content/themes/twentytwentyfive-child/fonts/CarnivaleeFreakshow-DLrm.ttf') format('truetype');
}





/* =====================================================
   ===== SECTION 2: ROOT TOKENS                     =====
   ===================================================== */

/* CodeNumber 2.1 — Palette: velvet & gold (default theme). */

:root {
    --velvet-deep: #4a0608;
    --velvet-mid: #6e0a0d;
    --velvet-light: #8b1014;
    --velvet-ink: #1a0608;

    --gold-deep: #6b4d12;
    --gold-mid: #b08a2e;
    --gold-light: #ead78a;
    --gold-bright: #fff3c4;
    --gold-shimmer: #ffe69c;

    --ink: #2a0202;
    --ribbon-red: #9a0a14;

    --paper-cream: #f0e6d8;
    --paper-warm: #d8c69a;

    /* CodeNumber 2.2 — Bulb colour palette retained for cheat-engine
       compatibility. Not directly used by Section 5 anymore (the .bulb.r/.y/.b
       CSS rules embed their own hex values from the variations file),
       but kept here so any cheat code that sets these variables still
       has something to set. */
    --light-bulb-1: #e6212b;
    --light-bulb-2: #f4c842;
    --light-bulb-3: #2548d8;

    --state-active: #ffd870;
    --state-hover-glow: rgba(255, 216, 112, 0.55);
    --state-disabled: #6a5a44;

    --tier-free: #4a8a6a;
    --tier-survey: #4a78b0;
    --tier-quiz: #b07028;
    --star-gold: #ffd870;

    --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(176, 138, 46, 0.18);
    --shadow-card-hover: 0 14px 44px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(234, 215, 138, 0.45);
    --shadow-recess: inset 0 2px 4px rgba(0, 0, 0, 0.6);

    --font-display: 'CormorantGaramond', 'PlayfairDisplay', 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'CrimsonPro', 'Crimson Pro', Georgia, 'Times New Roman', serif;
    --font-numerals: 'PlayfairDisplay', 'Playfair Display', Georgia, 'Times New Roman', serif;

    --t-fast: 0.12s;
    --t-med: 0.25s;
    --t-slow: 0.45s;
    --ease-soft: cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}





/* =====================================================
   ===== SECTION 3: PAGE CHROME                      =====
   ===================================================== */

/* CodeNumber 3.1 — Reset and base */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background:
        radial-gradient(ellipse at top, rgba(74, 6, 8, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(110, 10, 13, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, var(--velvet-ink) 0%, #0a0203 100%);
    background-attachment: fixed;
    color: var(--paper-cream);
    min-height: 100vh;
    line-height: 1.55;
}

/* CodeNumber 3.2 — Tiny grain overlay layer */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.06;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 230, 156, 0.4) 1px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255, 230, 156, 0.25) 1px, transparent 2px);
    background-size: 4px 4px, 7px 7px;
}

/* CodeNumber 3.3 — Master container */
.shop-container {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 24px 80px;
    z-index: 2;
}

@media (max-width: 720px) {
    .shop-container {
        padding: 16px 12px 60px;
    }
}





/* =====================================================
   ===== SECTION 4: HEADER & TAGLINE                 =====
   ===================================================== */

/* CodeNumber 4.1 — The page brand */
.shop-header {
    text-align: center;
    padding: 30px 12px 22px;
    position: relative;
}

.shop-header__title {
    font-family: 'CarnivaleeFreakshow', var(--font-display);
    color: var(--gold-light);
    font-size: clamp(40px, 6.5vw, 64px);
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.02em;
    margin: 0 0 14px;
    line-height: 1.05;
    text-shadow:
        0 2px 16px rgba(255, 216, 112, 0.18),
        0 0 1px rgba(255, 230, 156, 0.5);
    line-height: 1.05;
}

/* CodeNumber 4.2 — Tagline */
.shop-header__tagline {
    font-family: var(--font-display);
    color: var(--paper-warm);
    font-size: clamp(17px, 2.1vw, 22px);
    font-style: italic;
    font-weight: 400;
    margin: 0;
    opacity: 0.94;
    letter-spacing: 0.02em;
}

/* CodeNumber 4.3 — Gold flourish divider */
.shop-header__flourish {
    margin: 22px auto 0;
    width: 220px;
    height: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shop-header__flourish::before,
.shop-header__flourish::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gold-mid) 30%,
        var(--gold-light) 100%);
}
.shop-header__flourish::after {
    background: linear-gradient(90deg,
        var(--gold-light) 0%,
        var(--gold-mid) 70%,
        transparent 100%);
}
.shop-header__flourish-jewel {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        var(--gold-bright) 0%,
        var(--gold-mid) 60%,
        var(--gold-deep) 100%);
    box-shadow:
        0 0 6px rgba(234, 215, 138, 0.7),
        inset 0 0 1px rgba(255, 255, 255, 0.6);
    margin: 0 8px;
}





/* =====================================================
   ===== SECTION 5: TRADEMARK LIGHTS BORDER          =====
   ===================================================== */

/* CodeNumber 5.1 — The signature element. Real DOM-element bulbs
   placed around the perimeter of every .trademark-frame by the
   companion script lotto_shop_bulbs_v1_STR.js.

   Styles copied verbatim from lotto_card_variations_v1_STR.html
   (CodeNumber 2.3 / 2.4 of that file). Each bulb is a 14×14px div
   with a radial-gradient body (offset highlight at 35% 30%),
   stacked box-shadows for halo and recess, and drop-shadow filters
   from the animation for the outer light bleed.

   The .trademark-frame__sides div serves as the bulb container so
   no HTML changes are needed. */

.trademark-frame {
    position: relative;
    padding: 22px;
    margin: 18px 0;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(110, 10, 13, 0.18) 0%, rgba(74, 6, 8, 0.05) 100%);
    box-shadow:
        var(--shadow-recess),
        0 4px 24px rgba(0, 0, 0, 0.4);
}

/* CodeNumber 5.2 — Bulb container (re-uses existing .trademark-frame__sides div). */
.trademark-frame__sides {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 12px;
    z-index: 5;
}

/* CodeNumber 5.3 — Individual bulb base styles. */
.bulb {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: filter 0.2s ease;
}

/* CodeNumber 5.4 — Three colour variants (red / yellow / blue). */

.bulb.r {
    background: radial-gradient(circle at 35% 30%,
        #ff8a8a 0%,
        #e6212b 55%,
        #6e0010 100%);
    box-shadow:
        0 0 0 1px #2a0408,
        0 0 8px 2px rgba(230, 33, 43, 0.5),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4);
}

.bulb.y {
    background: radial-gradient(circle at 35% 30%,
        #fff7b8 0%,
        #f4c842 55%,
        #8a6300 100%);
    box-shadow:
        0 0 0 1px #2e1f00,
        0 0 8px 2px rgba(244, 200, 66, 0.5),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4);
}

.bulb.b {
    background: radial-gradient(circle at 35% 30%,
        #aac6ff 0%,
        #2548d8 55%,
        #0a1450 100%);
    box-shadow:
        0 0 0 1px #00081f,
        0 0 8px 2px rgba(37, 72, 216, 0.5),
        inset -1px -1px 2px rgba(0, 0, 0, 0.4);
}

/* CodeNumber 5.5 — Colour-cycle animation.
   Each bulb cycles its own colour through R → Y → B over 1.5s.
   Phase-offset by initial colour creates the marching-lights effect. */
@keyframes bulb-cycle {
    0%, 33.32% {
        background: radial-gradient(circle at 35% 30%,
            #ff8a8a 0%,
            #e6212b 55%,
            #6e0010 100%);
        box-shadow:
            0 0 0 1px #2a0408,
            0 0 8px 2px rgba(230, 33, 43, 0.5),
            inset -1px -1px 2px rgba(0, 0, 0, 0.4);
        filter:
            drop-shadow(0 0 3px #ff4848)
            drop-shadow(0 0 6px rgba(255, 50, 50, 0.4));
    }
    33.33%, 66.65% {
        background: radial-gradient(circle at 35% 30%,
            #fff7b8 0%,
            #f4c842 55%,
            #8a6300 100%);
        box-shadow:
            0 0 0 1px #2e1f00,
            0 0 8px 2px rgba(244, 200, 66, 0.5),
            inset -1px -1px 2px rgba(0, 0, 0, 0.4);
        filter:
            drop-shadow(0 0 3px #ffe070)
            drop-shadow(0 0 6px rgba(255, 220, 80, 0.4));
    }
    66.66%, 100% {
        background: radial-gradient(circle at 35% 30%,
            #aac6ff 0%,
            #2548d8 55%,
            #0a1450 100%);
        box-shadow:
            0 0 0 1px #00081f,
            0 0 8px 2px rgba(37, 72, 216, 0.5),
            inset -1px -1px 2px rgba(0, 0, 0, 0.4);
        filter:
            drop-shadow(0 0 3px #5a8aff)
            drop-shadow(0 0 6px rgba(60, 120, 255, 0.4));
    }
}

.bulb { animation: bulb-cycle 1.5s linear infinite; }
.bulb.r { animation-delay: 0s; }
.bulb.y { animation-delay: -0.5s; }
.bulb.b { animation-delay: -1s; }

/* CodeNumber 5.6 — Content padding so children clear the bulbs. */
.trademark-frame__content {
    padding: 22px 28px;
    position: relative;
    z-index: 2;
}
@media (max-width: 720px) {
    .trademark-frame__content {
        padding: 18px 12px;
    }
}





/* =====================================================
   ===== SECTION 6: TOP REGION                       =====
   ===== Lucky Numbers + Date + Countdown            =====
   ===================================================== */

/* CodeNumber 6.1 — Top region container */
.shop-top-region {
    text-align: center;
    margin: 0 auto 24px;
    padding: 28px 16px 24px;
    background:
        radial-gradient(ellipse at center,
            rgba(110, 10, 13, 0.4) 0%,
            rgba(74, 6, 8, 0.15) 70%);
    border-radius: 10px;
    border: 1px solid rgba(176, 138, 46, 0.25);
}

.shop-top-region__draw-label {
    font-family: var(--font-display);
    color: var(--paper-warm);
    font-style: italic;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 18px;
    opacity: 0.7;
}

.shop-top-region__balls {
    display: inline-flex;
    gap: 16px;
    margin: 0 auto 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* CodeNumber 6.2 — Individual lucky ball */
.lucky-ball {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 28%,
            var(--gold-shimmer) 0%,
            var(--gold-light) 18%,
            var(--gold-mid) 60%,
            var(--gold-deep) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-numerals);
    font-weight: 700;
    font-size: 24px;
    color: var(--ink);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.55),
        inset -2px -3px 6px rgba(0, 0, 0, 0.25),
        inset 1px 2px 4px rgba(255, 230, 156, 0.6),
        0 0 18px rgba(234, 215, 138, 0.35);
    transform-origin: center;
}

/* CodeNumber 6.3 — Countdown line */
.shop-top-region__countdown {
    margin-top: 14px;
    font-family: var(--font-display);
    color: var(--gold-light);
    font-size: 16px;
    font-style: italic;
    letter-spacing: 0.05em;
}
.shop-top-region__countdown-value {
    color: var(--gold-bright);
    font-weight: 600;
    font-style: normal;
}

/* CodeNumber 6.4 — Live indicator placeholder */
.shop-top-region.is-revealing .lucky-ball {
    /* Animations defined in shop_animations_STR.css */
}





/* =====================================================
   ===== SECTION 7: CONTROL ROW                      =====
   ===================================================== */

/* CodeNumber 7.1 — Control row */
.shop-control-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px auto 22px;
    flex-wrap: wrap;
}

.shop-control-row__btn {
    background: linear-gradient(180deg,
        rgba(110, 10, 13, 0.55) 0%,
        rgba(74, 6, 8, 0.7) 100%);
    border: 1px solid rgba(176, 138, 46, 0.4);
    color: var(--gold-light);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-display);
    transition:
        background var(--t-med) var(--ease-soft),
        border-color var(--t-med) var(--ease-soft),
        transform var(--t-fast) var(--ease-soft),
        box-shadow var(--t-med) var(--ease-soft);
}
.shop-control-row__btn:hover {
    background: linear-gradient(180deg,
        rgba(139, 16, 20, 0.7) 0%,
        rgba(110, 10, 13, 0.85) 100%);
    border-color: var(--gold-light);
    box-shadow: 0 0 14px rgba(234, 215, 138, 0.35);
}
.shop-control-row__btn:active {
    transform: scale(0.96);
}
.shop-control-row__btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}





/* =====================================================
   ===== SECTION 8: TICKET VENDOR STRIP              =====
   ===================================================== */

/* CodeNumber 8.1 — Cart visualisation */
.ticket-vendor-strip {
    margin: 22px auto;
    padding: 16px 20px;
    background:
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(0, 0, 0, 0.15) 100%),
        repeating-linear-gradient(45deg,
            rgba(110, 10, 13, 0.08) 0px,
            rgba(110, 10, 13, 0.08) 14px,
            rgba(74, 6, 8, 0.12) 14px,
            rgba(74, 6, 8, 0.12) 28px);
    border-radius: 10px;
    border: 1px solid rgba(176, 138, 46, 0.3);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-recess);
}

.ticket-vendor-strip.is-empty {
    opacity: 0.55;
    filter: saturate(0.4);
}

.ticket-vendor-strip__label {
    font-family: var(--font-display);
    color: var(--gold-light);
    font-style: italic;
    font-size: 14px;
    letter-spacing: 0.06em;
    flex: 0 0 auto;
    opacity: 0.85;
}

/* CodeNumber 8.2 — Three slot containers */
.ticket-vendor-strip__slots {
    display: flex;
    gap: 10px;
    flex: 1 1 auto;
}

.vendor-slot {
    flex: 1 1 0;
    min-width: 90px;
    height: 56px;
    border: 1px dashed rgba(176, 138, 46, 0.5);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    color: var(--paper-warm);
    font-size: 12px;
    font-style: italic;
    opacity: 0.6;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    transition:
        opacity var(--t-med) var(--ease-soft),
        border-color var(--t-med) var(--ease-soft),
        background var(--t-med) var(--ease-soft);
}

.vendor-slot.is-filled {
    opacity: 1;
    border-style: solid;
    border-color: var(--gold-light);
    background: linear-gradient(180deg,
        rgba(176, 138, 46, 0.25) 0%,
        rgba(110, 10, 13, 0.4) 100%);
    color: var(--gold-light);
    font-style: normal;
    font-weight: 600;
    font-size: 13px;
}

.vendor-slot__name {
    text-align: center;
    padding: 4px 6px;
    line-height: 1.2;
}

.vendor-slot__remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--velvet-mid);
    border: 1px solid var(--gold-mid);
    color: var(--paper-cream);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: var(--font-body);
    transition: transform var(--t-fast) var(--ease-soft);
}
.vendor-slot.is-filled .vendor-slot__remove-btn {
    display: inline-flex;
}
.vendor-slot__remove-btn:hover {
    background: var(--velvet-light);
    transform: scale(1.15);
}

/* CodeNumber 8.3 — Generate ticket button */
.ticket-vendor-strip__generate-btn {
    flex: 0 0 auto;
    padding: 10px 22px;
    background: linear-gradient(180deg,
        var(--gold-light) 0%,
        var(--gold-mid) 60%,
        var(--gold-deep) 100%);
    color: var(--ink);
    border: 1px solid var(--gold-mid);
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-style: italic;
    font-size: 16px;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    transition:
        transform var(--t-fast) var(--ease-soft),
        box-shadow var(--t-med) var(--ease-soft),
        filter var(--t-med) var(--ease-soft);
}
.ticket-vendor-strip__generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.6),
        0 0 18px rgba(234, 215, 138, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
}
.ticket-vendor-strip__generate-btn:disabled {
    cursor: not-allowed;
    filter: grayscale(0.6) brightness(0.7);
}





/* =====================================================
   ===== SECTION 9: SHOWMAN CONSOLE                  =====
   ===================================================== */

/* CodeNumber 9.1 — Scrolling log */
.showman-console {
    margin: 12px auto 22px;
    padding: 10px 16px;
    height: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    background:
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.45) 100%);
    border: 1px solid rgba(176, 138, 46, 0.25);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--paper-warm);
    line-height: 1.55;
    box-shadow: var(--shadow-recess);
    scrollbar-width: thin;
    scrollbar-color: var(--gold-mid) transparent;
}

.showman-console::-webkit-scrollbar {
    width: 5px;
}
.showman-console::-webkit-scrollbar-thumb {
    background: var(--gold-mid);
    border-radius: 3px;
}

.showman-console__line {
    padding: 2px 0;
    opacity: 0;
    transform: translateY(4px);
    animation: console-line-in 0.4s var(--ease-soft) forwards;
}
.showman-console__line::before {
    content: '› ';
    color: var(--gold-mid);
}

@keyframes console-line-in {
    to { opacity: 0.95; transform: translateY(0); }
}





/* =====================================================
   ===== SECTION 10: FILTER ROW                      =====
   ===================================================== */

/* CodeNumber 10.1 — Filter pills row */
.shop-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px auto 28px;
    align-items: center;
}

.shop-filter-row__label {
    font-family: var(--font-display);
    color: var(--paper-warm);
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.06em;
    margin-right: 8px;
    opacity: 0.75;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.55) 100%);
    border: 1px solid var(--pill-colour, rgba(176, 138, 46, 0.4));
    border-radius: 999px;
    color: var(--paper-cream);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition:
        background var(--t-med) var(--ease-soft),
        transform var(--t-fast) var(--ease-soft),
        box-shadow var(--t-med) var(--ease-soft);
}
.filter-pill:hover {
    background: linear-gradient(180deg,
        rgba(74, 6, 8, 0.5) 0%,
        rgba(110, 10, 13, 0.55) 100%);
    transform: translateY(-1px);
}
.filter-pill.is-active {
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--pill-colour, var(--gold-mid)) 25%, transparent) 0%,
            color-mix(in srgb, var(--pill-colour, var(--gold-mid)) 10%, transparent) 100%),
        rgba(0, 0, 0, 0.3);
    border-color: var(--pill-colour, var(--gold-light));
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.4),
        0 0 12px var(--pill-colour, rgba(234, 215, 138, 0.5));
}

.filter-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pill-colour, var(--gold-mid));
    box-shadow: 0 0 4px var(--pill-colour, var(--gold-mid));
    flex-shrink: 0;
}

/* CodeNumber 10.2 — Sort toggle */
.shop-filter-row__sort {
    margin-left: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}
.shop-filter-row__sort-btn {
    background: transparent;
    border: 1px solid rgba(176, 138, 46, 0.4);
    color: var(--paper-warm);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--t-med) var(--ease-soft);
}
.shop-filter-row__sort-btn.is-active {
    background: rgba(176, 138, 46, 0.25);
    color: var(--gold-light);
    border-color: var(--gold-mid);
}





/* =====================================================
   ===== SECTION 11: SHOP GRID                       =====
   ===================================================== */

/* CodeNumber 11.1 — The grid wrapping all 129 ticket cards. */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin: 18px auto;
}

@media (min-width: 920px) {
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 22px;
    }
}





/* =====================================================
   ===== SECTION 12: GENERATED TICKET PANEL          =====
   ===================================================== */

/* CodeNumber 12.1 — Panel shell.
   The outer .generated-ticket-panel is just a positioning wrapper;
   the visual frame lives in the nested .trademark-frame inside it. */
.generated-ticket-panel {
    margin: 36px auto 24px;
    display: none;
    max-width: 100%;
}
.generated-ticket-panel.is-visible {
    display: block;
    animation: ticket-panel-in 0.5s var(--ease-pop) forwards;
}

@keyframes ticket-panel-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* CodeNumber 12.2 — Inner frame styling. */
.generated-ticket-panel__frame.trademark-frame {
    margin: 0;
    background:
        radial-gradient(ellipse at top,
            rgba(110, 10, 13, 0.45) 0%,
            rgba(74, 6, 8, 0.2) 70%);
}
.generated-ticket-panel__frame .trademark-frame__content {
    padding: 32px 30px;
}
@media (max-width: 720px) {
    .generated-ticket-panel__frame .trademark-frame__content {
        padding: 24px 14px;
    }
}

/* CodeNumber 12.3 — Carnival ticket layout: ADMIT ONE stub + body. */
.generated-ticket-panel__ticket {
    display: flex;
    gap: 16px;
    align-items: stretch;
    min-height: 280px;
    margin-bottom: 18px;
    /* Carnival notched outline: small semi-circle bites taken out of the
       left and right edges at the vertical midpoint. Approximated with
       a polygon clip-path since clip-path: path() requires absolute
       coordinates. The notch is 16px wide and ~28px tall. */
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(50% - 14px),
        calc(100% - 4px) calc(50% - 12px),
        calc(100% - 10px) calc(50% - 8px),
        calc(100% - 14px) calc(50%),
        calc(100% - 10px) calc(50% + 8px),
        calc(100% - 4px) calc(50% + 12px),
        100% calc(50% + 14px),
        100% 100%,
        0 100%,
        0 calc(50% + 14px),
        4px calc(50% + 12px),
        10px calc(50% + 8px),
        14px calc(50%),
        10px calc(50% - 8px),
        4px calc(50% - 12px),
        0 calc(50% - 14px)
    );
    /* Painted plate background so the notched edge reads cleanly */
    background:
        radial-gradient(ellipse at top,
            rgba(110, 10, 13, 0.45) 0%,
            rgba(58, 5, 8, 0.85) 80%),
        rgba(58, 5, 8, 1);
    padding: 16px 0;
}
@media (max-width: 640px) {
    .generated-ticket-panel__ticket {
        flex-direction: column;
        gap: 0;
        min-height: 0;
        /* Mobile: drop the side notches (would be on top/bottom in column
           layout — visually awkward). Keep clean rounded corners. */
        clip-path: none;
        border-radius: 8px;
    }
}

/* CodeNumber 12.4 — The ADMIT ONE stub on the left. */
.generated-ticket-panel__stub {
    flex: 0 0 auto;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    background:
        linear-gradient(180deg,
            rgba(26, 6, 8, 0.9) 0%,
            rgba(74, 6, 8, 0.6) 100%);
    border-right: 2px dashed rgba(216, 198, 154, 0.45);
    border-radius: 6px 0 0 6px;
    position: relative;
    /* Perforation effect via dotted-pattern dashes on the right border */
}
@media (max-width: 640px) {
    .generated-ticket-panel__stub {
        width: 100%;
        flex-direction: row;
        padding: 12px 16px;
        border-right: none;
        border-bottom: 2px dashed rgba(216, 198, 154, 0.45);
        border-radius: 6px 6px 0 0;
        justify-content: space-between;
    }
}

.generated-ticket-panel__stub-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.4em;
    color: var(--paper-cream);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-shadow: 0 1px 4px rgba(255, 216, 112, 0.3);
}
@media (max-width: 640px) {
    .generated-ticket-panel__stub-label {
        writing-mode: horizontal-tb;
        transform: none;
        letter-spacing: 0.25em;
    }
}

.generated-ticket-panel__stub-mark {
    font-size: 16px;
    color: var(--gold-mid);
    text-shadow: 0 0 6px rgba(234, 215, 138, 0.6);
}

.generated-ticket-panel__stub-serial {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: var(--paper-warm);
    opacity: 0.7;
    letter-spacing: 0.05em;
}

/* CodeNumber 12.5 — The main body (right of the stub). */
.generated-ticket-panel__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    position: relative;
}

/* CodeNumber 12.5b — Superline above the brand banner: 'Numbers for The National Lottery'.
   Tiny, restrained, descriptive — distinguishes purpose without claiming affiliation. */
.generated-ticket-panel__superline {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--paper-warm);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-align: center;
    margin: 0 0 4px;
    opacity: 0.75;
    text-transform: uppercase;
}

/* CodeNumber 12.6 — The Stryv4 Lucky Tickets brand banner.
   Uses the carnival display face from the WordPress theme. */
.generated-ticket-panel__brand {
    font-family: 'CarnivaleeFreakshow', var(--font-display);
    color: var(--gold-bright);
    font-style: normal;
    font-weight: 400;
    font-size: clamp(28px, 3.6vw, 42px);
    text-align: center;
    margin: 0 0 6px;
    text-shadow:
        0 2px 12px rgba(255, 216, 112, 0.35),
        0 0 1px rgba(255, 230, 156, 0.6);
    letter-spacing: 0.02em;
    line-height: 1.1;
}
.generated-ticket-panel__brand-star {
    color: var(--gold-mid);
    font-size: 0.7em;
    margin: 0 0.4em;
    text-shadow: 0 0 6px rgba(234, 215, 138, 0.6);
    vertical-align: 0.1em;
}

/* CodeNumber 12.7 — Personalised title line below the brand. */
.generated-ticket-panel__title {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--paper-warm);
    font-size: clamp(14px, 1.5vw, 17px);
    text-align: center;
    margin: 0 0 18px;
    opacity: 0.9;
}

/* CodeNumber 12.8 — Rows container. */
.generated-ticket-panel__rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto 18px;
}

/* CodeNumber 12.9 — Single ticket row. */
.ticket-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--row-colour, var(--gold-light)) 18%, transparent) 0%,
        transparent 60%);
    border-radius: 6px;
    border-left: 3px solid var(--row-colour, var(--gold-light));
    position: relative;
}
/* CodeNumber 12.9b — Perforation divider between consecutive rows.
   A dotted line styled to read as a ticket-stub perforation. */
.ticket-row + .ticket-row::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 20px;
    right: 20px;
    height: 1px;
    background-image: radial-gradient(circle, rgba(216, 198, 154, 0.5) 1px,
                                      transparent 1.5px);
    background-size: 8px 1px;
    background-repeat: repeat-x;
    pointer-events: none;
}
@media (max-width: 720px) {
    .ticket-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

.ticket-row__label {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(14px, 1.7vw, 18px);
    color: var(--row-colour, var(--gold-light));
    text-shadow:
        0 1px 6px color-mix(in srgb, var(--row-colour, var(--gold-light)) 40%, transparent),
        0 0 1px rgba(0, 0, 0, 0.4);
    flex: 0 0 auto;
    min-width: 160px;
}

.ticket-row__balls {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex: 1 1 auto;
    justify-content: center;
}
@media (max-width: 720px) {
    .ticket-row__balls { justify-content: flex-start; }
}

.ticket-row__ball {
    width: 40px;
    height: 40px;
    font-size: 16px;
}
@media (max-width: 540px) {
    .ticket-row__ball {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

/* CodeNumber 12.10 — Footer. */
.generated-ticket-panel__footer {
    text-align: center;
    margin: 14px auto 16px;
    font-family: var(--font-body);
    line-height: 1.65;
}
.generated-ticket-panel__footer-line { margin: 4px 0; }
.generated-ticket-panel__footer-line--show {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--gold-light);
    font-size: 14px;
    opacity: 0.9;
}
.generated-ticket-panel__footer-line--meta {
    font-size: 11px;
    color: var(--paper-warm);
    opacity: 0.65;
}
.generated-ticket-panel__footer-line--disclaimer {
    font-size: 10px;
    color: var(--paper-warm);
    opacity: 0.5;
    font-style: italic;
    margin-top: 6px;
}
.generated-ticket-panel__footer a {
    color: var(--gold-light);
    text-decoration: none;
    border-bottom: 1px dotted var(--gold-mid);
}
.generated-ticket-panel__footer a:hover {
    color: var(--gold-bright);
    border-bottom-style: solid;
}

/* CodeNumber 12.11 — Action buttons (Download GIF, PNG, Close). */
.generated-ticket-panel__actions {
    margin-top: 4px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.generated-ticket-panel__action {
    background: transparent;
    color: var(--gold-light);
    border: 1px solid var(--gold-mid);
    padding: 8px 18px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--t-med) var(--ease-soft);
}
.generated-ticket-panel__action:hover:not(:disabled) {
    background: rgba(176, 138, 46, 0.2);
    border-color: var(--gold-light);
    color: var(--gold-bright);
}
.generated-ticket-panel__action:disabled {
    cursor: wait;
    opacity: 0.6;
}





/* =====================================================
   ===== SECTION 12b: VENDOR STRIP — NAME INPUT &     =====
   =====              LOCKED GENERATE BUTTON          =====
   ===================================================== */

.ticket-vendor-strip__name-label {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--paper-warm);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.ticket-vendor-strip__name-input {
    width: 140px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(176, 138, 46, 0.5);
    border-radius: 6px;
    color: var(--paper-cream);
    font-family: var(--font-body);
    font-size: 14px;
    transition:
        border-color var(--t-med) var(--ease-soft),
        background var(--t-med) var(--ease-soft),
        box-shadow var(--t-med) var(--ease-soft);
}
.ticket-vendor-strip__name-input:focus {
    outline: none;
    border-color: var(--gold-light);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(234, 215, 138, 0.3);
}
.ticket-vendor-strip__name-input::placeholder {
    color: var(--paper-warm);
    opacity: 0.4;
}

/* Locked Generate button — applied when player has already generated for this cycle */
.ticket-vendor-strip__generate-btn.is-locked,
.ticket-vendor-strip__generate-btn.is-locked:hover:not(:disabled) {
    background: linear-gradient(180deg,
        rgba(74, 60, 30, 0.7) 0%,
        rgba(50, 40, 20, 0.8) 100%) !important;
    color: var(--paper-warm) !important;
    cursor: not-allowed !important;
    filter: grayscale(0.4);
    transform: none !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.1) !important;
}
.ticket-vendor-strip__generate-btn.is-locked::before {
    content: '🔒 ';
    margin-right: 4px;
}





/* =====================================================
   ===== SECTION 12e: STRYV LOGO + HOVER              =====
   ===================================================== */

/* CodeNumber 12e.1 — Base logo styling. Universal — any .stryv-logo-img
   on the page gets this transition and cursor. The hover treatment
   from the homepage card (warm gold glow + scale) is applied so the
   logo feels alive when interacted with. */
.stryv-logo-img {
    transition:
        transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1),
        filter   320ms ease-out;
    cursor: pointer;
}
.stryv-logo-img:hover {
    transform: scale(1.06);
    filter:
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45))
        drop-shadow(0 0 18px rgba(255, 216, 112, 0.55))
        drop-shadow(0 0 36px rgba(255, 200, 80, 0.35));
}
@media (prefers-reduced-motion: reduce) {
    .stryv-logo-img {
        transition: filter 320ms ease-out;
    }
    .stryv-logo-img:hover {
        transform: none;
    }
}

/* CodeNumber 12e.2 — Logo placement: top-right of the ticket body
   (inside the notched plate), not on the outer trademark-frame padding
   (which would overlap the bulbs). Body has position:relative so this
   anchors correctly. */
.generated-ticket-panel__logo-link {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 6;
    display: inline-block;
    line-height: 0;
}
.generated-ticket-panel__logo {
    width: clamp(54px, 6.5vw, 80px);
    height: auto;
    display: block;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}
@media (max-width: 720px) {
    .generated-ticket-panel__logo-link {
        position: static;
        text-align: center;
        margin: 4px auto 8px;
        line-height: 1;
    }
    .generated-ticket-panel__logo {
        margin: 0 auto;
    }
}





/* =====================================================
   ===== SECTION 13: FOOTER                          =====
   ===================================================== */

/* CodeNumber 13.1 — Honest randomness footer */
.shop-footer {
    margin: 60px auto 0;
    padding: 24px 16px;
    text-align: center;
    color: var(--paper-warm);
    font-family: var(--font-body);
    font-size: 12px;
    font-style: italic;
    opacity: 0.75;
    line-height: 1.7;
}
.shop-footer__line {
    margin: 4px 0;
}
.shop-footer__divider {
    margin: 12px auto;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gold-mid) 50%,
        transparent 100%);
    opacity: 0.4;
}
.shop-footer a {
    color: var(--gold-light);
    text-decoration: none;
    border-bottom: 1px dotted var(--gold-mid);
}
.shop-footer a:hover {
    color: var(--gold-bright);
    border-bottom-style: solid;
}





/* =====================================================
   ===== SECTION 14: ACCESSIBILITY                   =====
   ===================================================== */

/* CodeNumber 14.1 — Visible focus indicators */
button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

/* CodeNumber 14.2 — Honour prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
body.stryv-no-motion *,
body.stryv-no-motion *::before,
body.stryv-no-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}