/* Loptashi viewer: the Shtemeri viewer's HUD (imported below, shared), with the leaf green of Loptashi as the accent instead of the amber, a
   scoreboard in place of the clock box, player names over the disks, the huddle caption and the goal flash. Everything here is scoped to .lp. */
@import url('../../viewer/viewer.css');

/* ------------------------------------------------------------------ accent: leaf green (site.css --leaf) */
.app.lp { --amber: #9ee37d; --amber-glow: rgba(158, 227, 125, 0.35); }
/* the rules of the shared sheet that write the amber as a number */
.lp .wordmark { text-shadow: 0 0 22px rgba(158, 227, 125, 0.22); }
.lp .playbtn { background: rgba(158, 227, 125, .10); }
.lp .playbtn:hover { background: rgba(158, 227, 125, .22); }
.lp .scrub .fill { background: linear-gradient(90deg, rgba(158, 227, 125, .55), var(--amber)); }
.lp .scrub canvas { filter: hue-rotate(62deg) saturate(.85); }   /* the shared HUD draws its activity graph in amber */
.lp .sheet .res-next { color: var(--amber); }
/* no vision cones in this game */
.lp #b-cones { display: none; }

/* ------------------------------------------------------------------ scoreboard (top centre, where the Shtemeri clock box is) */
.lp .sb { grid-column: 2; justify-self: center; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 10px 8px; min-width: 300px;
  background: linear-gradient(180deg, var(--glass-a), var(--glass-b)); border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.45); position: relative; }
.lp .sb::before, .lp .sb::after { content: ''; position: absolute; width: 11px; height: 11px; border: 0 solid var(--amber); pointer-events: none; }
.lp .sb::before { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; }
.lp .sb::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.lp .sb-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; width: 100%; }
.lp .sb-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lp #sb-west { justify-content: flex-end; }
.lp .sb-bar { width: 6px; height: 28px; background: var(--c); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 70%, transparent); flex: none; }
.lp .sb-team.crashed .sb-bar { background: repeating-linear-gradient(-45deg, var(--c) 0 4px, #20242c 4px 8px); box-shadow: none; }
.lp .sb-name { font: 800 20px/1 var(--display); letter-spacing: .07em; text-transform: uppercase; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; padding-top: .2em; margin-top: -.2em; }
.lp .sb-score { display: flex; align-items: baseline; gap: 6px; font: 900 40px/0.9 var(--display); font-feature-settings: 'tnum' 1; color: var(--paper); text-shadow: 0 2px 18px rgba(0,0,0,.8); }
.lp .sb-score b { font-weight: 900; display: inline-block; min-width: .62em; text-align: center; }
.lp #sb-w { --c: var(--cw); } .lp #sb-e { --c: var(--ce); }
.lp .sb-score b.bump { animation: sbbump 1s cubic-bezier(.2,.8,.2,1); }
@keyframes sbbump { 0% { transform: scale(1.7); color: #fff; text-shadow: 0 0 22px var(--c), 0 0 6px var(--c); } 100% { transform: none; } }
.lp .sb-sep { color: var(--dim); font-size: .8em; }
.lp .sb-sub { display: flex; align-items: center; gap: 8px; }
.lp .sb-clock { font: 700 14px/1 var(--mono); letter-spacing: .08em; color: var(--paper-2); font-feature-settings: 'tnum' 1; }
.lp .live-badge { position: static; font-size: 12px; padding: 3px 7px 2px; gap: 5px; }
.lp .live-badge i { width: 6px; height: 6px; }
/* goals per minute: a cell per minute, the west team's goals on top, the east team's under them; the minute running fills, the ones to come are dim */
.lp .sb-strip { display: flex; gap: 3px; }
.lp .sb-strip .m { position: relative; width: 24px; height: 13px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0 2px; background: rgba(255,255,255,.07); overflow: hidden; }
.lp .sb-strip .m.next { background: rgba(255,255,255,.03); }
.lp .sb-strip .m u { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--amber); opacity: .8; }
.lp .sb-strip .m.past u { transform: scaleX(1); opacity: .25; }
.lp .sb-strip .m.now u { transform: scaleX(var(--p, 0)); }
.lp .sb-strip .m i { display: flex; gap: 1px; height: 5px; align-items: center; }
.lp .sb-strip .m b { width: 5px; height: 5px; border-radius: 50%; background: var(--cw); box-shadow: 0 0 4px var(--cw); flex: none; }
.lp .sb-strip .m i.e b { background: var(--ce); box-shadow: 0 0 4px var(--ce); }
.lp .sb-strip .m em { font: 700 7px/1 var(--mono); font-style: normal; color: var(--paper); }

/* ------------------------------------------------------------------ names over the disks (shared labels.js), bubbles (what a player says) */
.lp .ulabel .tag { display: block; font-size: 11.5px; letter-spacing: .05em; padding: 2px 5px 1px; max-width: 132px; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.lp .shout { white-space: normal; width: max-content; max-width: 210px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.2; }

/* ------------------------------------------------------------------ the huddle before kick-off */
.huddle { position: absolute; z-index: 7; left: 50%; top: 114px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 5px 5px 5px 14px; white-space: nowrap;
  background: linear-gradient(180deg, var(--glass-a), var(--glass-b)); border: 1px solid var(--line-strong); box-shadow: 0 10px 40px rgba(0,0,0,.45); pointer-events: auto; }
.huddle .hd-title { font: 900 18px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--amber); }
.huddle .hd-round { font: 400 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--paper-2); }
.huddle .btn { padding: 6px 12px 5px; font-size: 12px; }

/* ------------------------------------------------------------------ goal: a flash of the scoring team's colour over the picture */
#flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(ellipse 70% 60% at 50% 55%, color-mix(in srgb, var(--c, #fff) 60%, transparent), transparent 75%); }
#flash.go { animation: lpflash .75s ease-out both; }
@keyframes lpflash { 0% { opacity: .9; } 100% { opacity: 0; } }

/* ------------------------------------------------------------------ the scrubber: a dot per goal in the scorer's colour (white rim: an own goal) */
.lp .scrub .marks i.g { width: 9px; height: 9px; margin-left: -4.5px; bottom: 0; border-radius: 50%; border: 1.5px solid #0a0c10; background: var(--c); box-shadow: 0 0 6px var(--c); opacity: 1; }
.lp .scrub .marks i.g.own { border-color: #fff; }

/* ------------------------------------------------------------------ final sheet */
.lp-sheet h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 18px; }
.lp-final { font: 900 42px/1 var(--display); letter-spacing: .06em; color: var(--amber); font-feature-settings: 'tnum' 1; }
.lp-final i { font-style: normal; color: var(--dim); margin: 0 .12em; }
.lp-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 10px; }
.lp-team { padding: 10px 12px 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, #0c0f14), #0a0d12); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); border-top: 4px solid var(--c); min-width: 0; }
.lp-th { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.lp-th i { width: 8px; height: 16px; background: var(--c); align-self: center; box-shadow: 0 0 8px var(--c); flex: none; }
.lp-th b { font: 800 20px/1 var(--display); letter-spacing: .07em; text-transform: uppercase; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lp-th .ow { font: 400 11px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.lp-g { margin-left: auto; font: 900 30px/1 var(--display); color: var(--paper); }
table.lp-res { width: 100%; border-collapse: collapse; margin-top: 8px; font: 400 12px/1 var(--mono); }
table.lp-res th { text-align: right; font: 400 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 5px 6px; border-bottom: 1px solid var(--line-strong); }
table.lp-res td { text-align: right; padding: 6px 6px; border-bottom: 1px solid var(--line); color: var(--paper-2); font-feature-settings: 'tnum' 1; white-space: nowrap; }
table.lp-res th:nth-child(-n+2), table.lp-res td:nth-child(-n+2) { text-align: left; }
table.lp-res td.ix { width: 22px; color: var(--muted); }
table.lp-res td.nm { font: 600 13px/1 var(--text); color: var(--paper); max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
table.lp-res .og { margin-left: 5px; font-size: 9.5px; letter-spacing: .06em; color: #ff8393; }
.lp-tf { margin-top: 8px; font: 400 11px/1.3 var(--mono); letter-spacing: .06em; color: var(--paper-2); }
.lp-tf.crash { color: #ff8393; }
@container (width < 640px) { .lp-teams { grid-template-columns: 1fr; } }
@container (width < 420px) { table.lp-res .hide-n { display: none; } .lp-final { font-size: 32px; } }

/* ------------------------------------------------------------------ smaller viewers (main.js sets .compact / .narrow / .tiny from its own size) */
.app.lp.compact .sb { padding: 5px 8px 6px; gap: 3px; min-width: 250px; }
.app.lp.compact .sb-name { font-size: 16px; max-width: 120px; }
.app.lp.compact .sb-bar { height: 22px; }
.app.lp.compact .sb-score { font-size: 31px; }
.app.lp.compact .sb-clock { font-size: 12px; }
.app.lp.compact .sb-strip .m { width: 20px; height: 12px; }
.app.lp.compact .huddle { top: 90px; }
.app.lp.compact .ulabel .tag { font-size: 10px; padding: 1px 4px 0; max-width: 104px; }
.app.lp.compact .shout { font-size: 11px; max-width: 170px; }

/* a phone: the logo makes room for the scoreboard, the names shrink, the labels and bubbles too */
.app.lp.narrow .brand { display: none; }
.app.lp.narrow .sb { min-width: 0; max-width: calc(100vw - 2 * var(--gutter) - 76px); }
.app.lp.narrow .sb-main { gap: 7px; }
.app.lp.narrow .sb-team { gap: 5px; }
.app.lp.narrow .sb-name { font-size: 13px; max-width: min(84px, 21vw); }
.app.lp.narrow .sb-bar { width: 4px; height: 18px; }
.app.lp.narrow .sb-score { font-size: 26px; gap: 4px; }
.app.lp.narrow .sb-strip { gap: 2px; }
.app.lp.narrow .sb-strip .m { width: 16px; height: 11px; padding: 0 1px; }
.app.lp.narrow .sb-strip .m b { width: 4px; height: 4px; }
.app.lp.narrow .huddle { top: 84px; gap: 7px; padding-left: 10px; }
.app.lp.narrow .huddle .hd-title { font-size: 15px; letter-spacing: .14em; }
.app.lp.narrow .huddle .hd-round { font-size: 10px; letter-spacing: .08em; }
.app.lp.narrow .ulabel .tag { font-size: 9px; padding: 1px 3px 0; max-width: 78px; letter-spacing: .03em; }
.app.lp.narrow .shout { font-size: 10.5px; max-width: 140px; padding: 2px 5px; }

/* a short viewer (a phone held sideways): no strip, the clock beside nothing else */
.app.lp.tiny .sb-strip { display: none; }
.app.lp.tiny .huddle { top: 70px; }

@media (prefers-reduced-motion: reduce) {
  #flash.go, .lp .sb-score b.bump { animation: none; }
}
