/* ============================================================
   Pool/live-feed.css - SINGLE SOURCE for the Live Feed widget
   (notif mini-log) styling on ALL pages: index, side-pots,
   picks-distribution, pool-history, tournament-history.
   Extracted June 4 2026 from the five formerly-inline copies
   (verified byte-identical at extraction time).
   RULE (Andrew, ABSOLUTE): every live feed on every page within
   a tournament must look + function identically. Edit HERE only;
   bump the ?v= querystring on the <link> tags when you do
   (Cloudflare caches static assets - see HANDOFF.md).
   Page CSS loads AFTER this sheet, so page-specific overrides
   still win the cascade if ever genuinely needed.
   ============================================================ */
/* New entry highlight in live feed */
        .notif-log-entry.notif-new {
            animation: notif-entry-flash 3s ease-out forwards;
        }

/* End-of-round notif backdrop animation. Aurora-style gold/green
           gradient sweep behind the row content; +a soft golf-flag emoji
           drifting across slowly. Triggered when the renderer tags a row
           with .notif-eor based on body text matching the round-complete
           pool-leader / tourney-leader patterns from check-notifications.
           Subtle on purpose - text stays primary. Honors reduced-motion. */
        .notif-log-entry.notif-eor {
            position: relative;
            overflow: hidden;
        }

.notif-log-entry.notif-eor::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(
                110deg,
                transparent 0%,
                rgba(212, 168, 67, 0.20) 28%,
                rgba(74, 222, 128, 0.22) 50%,
                rgba(212, 168, 67, 0.20) 72%,
                transparent 100%
            );
            background-size: 220% 100%;
            background-position: 50% 0;
            /* Perf May 11 2026: notif-eor-sweep retired. Cost multiplied per
               EOR entry in the log; gradient now sits static at midpoint. */
            pointer-events: none;
            z-index: 0;
        }

.notif-log-entry.notif-eor::after {
            content: '\1F3CC';
            position: absolute;
            top: 50%;
            left: 88%;
            font-size: 22px;
            opacity: 0.16;
            transform: translateY(-50%);
            /* Perf May 11 2026: notif-eor-flag drift retired. Flag now parks
               near the right edge as a static accent (was a 14s `left` tween
               that forced layout per frame on every EOR row). */
            pointer-events: none;
            z-index: 0;
            filter: drop-shadow(0 0 6px rgba(212,168,67,0.4));
        }

.notif-log-entry.notif-eor > * {
            position: relative;
            z-index: 1;
        }

@keyframes notif-eor-sweep {
            0%, 100% { background-position: 220% 0; }
            50%      { background-position: -120% 0; }
        }

@keyframes notif-eor-flag {
            0%   { left: -10%;  opacity: 0; }
            12%  { opacity: 0.18; }
            85%  { opacity: 0.18; }
            100% { left: 110%; opacity: 0; }
        }

@media (prefers-reduced-motion: reduce) {
            .notif-log-entry.notif-eor::before { animation: none; }
            .notif-log-entry.notif-eor::after  { animation: none; opacity: 0; }
        }

@keyframes notif-entry-flash {
            0% { background: rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.35); }
            100% { background: transparent; }
        }

/* US Open contrast override (May 28 2026): live feed title/time/btn
           render as --t-secondary red (#C41E3A) on primaryDark navy (#00243a)
           when --t-on-primary isn't resolved (race) or when CSS fallback
           kicks in -> 2.74:1, fails WCAG AA. Force warm gold #f5e6a8
           (matches .notif-tag-pool fg, 12.77:1) so the title bar reads.
           Scoped to body.tid-us-open-2026 ONLY - other tournaments unchanged. */
        body.tid-us-open-2026 .notif-mini-title {
            color: #f5e6a8 !important;
        }

body.tid-us-open-2026 .notif-log-time {
            color: #f5e6a8 !important;
        }

body.tid-us-open-2026 .notif-mini-btn {
            color: #f5e6a8 !important;
            text-shadow: 0 0 8px rgba(245,230,168,0.4) !important;
        }

body.tid-us-open-2026 .notif-mini-live-dot.dormant {
            background: #b8a878 !important;
        }

/* Notification mini-window */
        .notif-mini-window {
            position: fixed;
            bottom: 16px;
            right: 16px;
            width: 390px;
            max-height: 340px;
            background: var(--t-primary-dark);
            background-image:
                radial-gradient(ellipse at 30% 20%, rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(0,0,0,0.15) 0%, transparent 50%);
            border: 2px solid var(--t-secondary);
            border-radius: 8px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.2);
            z-index: 9000;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: max-height 0.35s ease, box-shadow 0.3s ease;
        }

.notif-mini-window.collapsed {
            max-height: 44px;
        }

.notif-mini-window.notif-peek {
            max-height: 145px; /* header + one entry + progress bar */
        }

.notif-mini-window.notif-peek .notif-mini-body {
            overflow: hidden;
            cursor: pointer;
        }

.notif-mini-window.notif-peek .notif-log-entry {
            display: none;
        }

.notif-mini-window.notif-peek .notif-log-entry:first-child {
            display: flex;
            padding: 12px 14px;
            gap: 10px;
        }

.notif-mini-window.notif-peek .notif-log-entry:first-child .notif-log-meta {
            min-width: 58px;
            padding-top: 4px;
        }

.notif-mini-window.notif-peek .notif-log-entry:first-child .notif-log-time {
            font-size: 11px;
        }

.notif-mini-window.notif-peek .notif-log-entry:first-child .notif-log-icon {
            font-size: 28px;
            padding-top: 0;
        }

.notif-mini-window.notif-peek .notif-log-entry:first-child .notif-log-text {
            line-height: 1.35;
            flex: 1;
            min-width: 0;
        }

.notif-mini-window.notif-pulse {
            box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 12px rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.4);
        }

.notif-peek-progress {
            height: 3px;
            background: var(--t-secondary);
            width: 100%;
            flex-shrink: 0;
            transition: none;
        }

.notif-peek-progress.animate {
            transition: width linear;
            width: 0%;
        }

.notif-mini-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: linear-gradient(90deg, var(--t-primary-dark) 0%, var(--t-primary-dark) 100%);
            padding: 10px 14px;
            cursor: pointer;
            flex-shrink: 0;
            user-select: none;
            border-bottom: 2px solid var(--t-secondary);
        }

.notif-mini-header:hover { background: linear-gradient(90deg, var(--t-primary-mid) 0%, var(--t-primary) 100%); }

.notif-mini-title {
            font-size: 16px;
            font-weight: 800;
            color: var(--t-on-primary, var(--t-secondary));
            letter-spacing: 2px;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            gap: 8px;
        }

.notif-mini-live-dot {
            width: 8px;
            height: 8px;
            background: #ef4444;
            border-radius: 50%;
            animation: notifLivePulse 1.5s infinite;
        }

.notif-mini-live-dot.dormant {
            background: #888;
            animation: none;
        }

@keyframes notifLivePulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.notif-mini-count {
            /* Light-gold number in a red box (Jun 18 2026, Andrew). Fixed red so
               it reads consistently as a distinct badge on every theme/operator
               palette; gold-on-red stays high contrast. */
            background: #d32f2f;
            color: #f5e6a8;
            border-radius: 3px;
            padding: 2px 8px;
            font-size: 10px;
            font-weight: 800;
            min-width: 18px;
            text-align: center;
        }

.notif-mini-count:empty { display: none; }

.notif-mini-actions {
            display: flex;
            gap: 6px;
            align-items: center;
        }

.notif-mini-btn {
            background: none;
            border: none;
            color: var(--t-secondary);
            cursor: pointer;
            font-size: 18px;
            font-weight: 700;
            padding: 0 8px;
            border-radius: 4px;
            text-shadow: 0 0 8px rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.4);
            transition: opacity 0.15s, background 0.15s;
            line-height: 1;
            display: flex;
            align-items: center;
        }

.notif-mini-btn:hover { opacity: 1; background: rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.15); }

.notif-mini-btn-history {
            background: rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.15);
            border: 1px solid rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.4);
            color: #e8d48b;
            cursor: pointer;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            padding: 4px 10px;
            border-radius: 4px;
            transition: background 0.15s;
        }

.notif-mini-btn-history:hover { background: rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.25); color: #f5e6a8; }

.notif-mini-body {
            flex: 1;
            overflow-y: auto;
            max-height: 270px;
        }

.notif-mini-body::-webkit-scrollbar { width: 5px; }

.notif-mini-body::-webkit-scrollbar-thumb { background: rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.3); border-radius: 3px; }

.notif-log-entry {
            display: flex;
            gap: 10px;
            align-items: flex-start;
            padding: 9px 16px;
            border-bottom: 1px solid rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.12);
            font-size: 13px;
            color: rgba(255,255,255,0.8);
        }

.notif-log-entry:nth-child(even) { background: rgba(0,0,0,0.08); }

.notif-log-entry:last-child { border-bottom: none; }

/* Sponsored notification (TravisMathew-presented demo entry). Gray
           background distinguishes it from standard pool/tourney notifs; a
           small "presented by" tag + brand logo as icon make the sponsor
           placement unmistakable without screaming it. Wins against the
           :nth-child striping via !important. */
        .notif-log-entry.notif-sponsored,
        .notif-log-entry.notif-sponsored:nth-child(even) {
            background: linear-gradient(90deg, rgba(40,40,42,0.85), rgba(25,25,27,0.92)) !important;
            border-left: 3px solid #cfcfcf;
            position: relative;
            overflow: hidden; /* clip drifting TM assets inside the row */
        }

/* TM drift stage confined to the notif row — mirrors the header
           .tm-stage animation pattern. Three assets at different sizes and
           speeds sweep across; negative animation-delay offsets each so the
           row isn't perfectly in-phase on every render. */
        .notif-tm-drift {
            position: absolute;
            inset: 0;
            overflow: hidden;
            pointer-events: none;
            z-index: 0;
        }

.notif-tm-drift .drift {
            position: absolute;
            width: auto;
            filter: brightness(0) invert(1);
            animation: notifTmSweep linear infinite;
            will-change: left;
            top: 50%;
            transform: translateY(-50%);
        }

.notif-tm-drift .drift-1 { height: 100%; animation-duration: 24s; animation-delay:   0s; top: 50%; opacity: 0.13; }

.notif-tm-drift .drift-2 { height: 100%; animation-duration: 24s; animation-delay: -16s; top: 50%; opacity: 0.09; }

.notif-tm-drift .drift-3 { height: 100%; animation-duration: 24s; animation-delay:  -8s; top: 50%; opacity: 0.12; }

@keyframes notifTmSweep {
            0%    { left: -60px; }
            33.33%{ left: calc(100% + 60px); }
            100%  { left: calc(100% + 60px); }
        }

.notif-log-entry.notif-sponsored > .notif-log-meta,
        .notif-log-entry.notif-sponsored > .notif-log-icon,
        .notif-log-entry.notif-sponsored > .notif-log-text {
            position: relative;
            z-index: 1;
        }

@media (prefers-reduced-motion: reduce) {
            .notif-tm-drift .drift { animation: none; }
        }

.notif-log-entry.notif-sponsored .notif-log-icon {
            flex-shrink: 0;
        }

/* Marquee scroll for the top sponsor-demo notif body. Wraps content in
           .notif-scroll-marquee (visible window) + .notif-scroll-track (scrolling
           track). The track holds the message duplicated so the scroll is seamless. */
        .notif-scroll-marquee {
            display: block;
            overflow: hidden;
            position: relative;
            width: 100%;
            mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
            -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
        }

.notif-scroll-marquee .notif-scroll-track {
            display: inline-block;
            white-space: nowrap;
            animation: notifMarquee 22s linear infinite;
            will-change: transform;
        }

@keyframes notifMarquee {
            0%   { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }

@media (prefers-reduced-motion: reduce) {
            .notif-scroll-marquee .notif-scroll-track { animation: none; }
        }

.notif-log-meta {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            min-width: 72px;
            gap: 3px;
            padding-top: 2px;
        }

.notif-log-time {
            color: var(--t-secondary);
            font-size: 14px;
            white-space: nowrap;
            font-family: 'Courier New', monospace;
            font-weight: 700;
        }

.notif-log-meta .notif-tag {
            font-size: 10px;
            padding: 2px 6px;
            margin-top: 1px;
            font-weight: 800;
        }

.notif-log-icon {
            font-size: 14px;
            flex-shrink: 0;
            line-height: 1;
            padding-top: 1px;
        }

.notif-log-text { flex: 1; line-height: 1.35; }

.notif-tag {
            display: inline-block;
            font-size: 9px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 1px 5px;
            border-radius: 3px;
            margin-right: 5px;
            vertical-align: middle;
            position: relative;
            top: -1px;
        }

.notif-tag-pool { background: rgba(var(--t-secondary-r),var(--t-secondary-g),var(--t-secondary-b),0.2); color: #f5e6a8; }

.notif-tag-tourney { background: rgba(255,255,255,0.1); color: #7dd3a8; }

.notif-tag-both { background: rgba(96,165,250,0.18); color: #60a5fa; }

.notif-mini-empty {
            text-align: center;
            padding: 20px 12px;
            color: #6a6555;
            font-size: 12px;
            font-style: italic;
        }

@media (max-width: 500px) {
            .notif-mini-window { width: calc(100vw - 20px); right: 10px; bottom: 10px; border-radius: 8px; }
        }
