/* live bar, countdown, Team of the Week, share pictures, install button, time zones */

/* ---------- match day at the top of the home page: Live now / On stream now / Next kick-off / Kicked off */
.md .hero-in { padding: 16px 20px 18px }
.md .hero-top { flex-wrap: wrap }
.md .hero-top .muted { text-align: right; margin-left: auto }
.md .board .side b { overflow-wrap: anywhere }
.md-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%); gap: 22px; align-items: center }
.md-split > .md-info:only-child { grid-column: 1 / -1 }
.md-info, .md-stream { min-width: 0 }
.md-note { text-align: center; margin-top: 12px }
@media (max-width: 900px) { .md-split { grid-template-columns: 1fr; gap: 16px } }
@media (max-width: 760px) { .md .hero-in { padding: 14px 14px 16px } }
/* the stream: a placeholder in the page, the real player floats exactly on top of it (js/stream.js) */
.streamslot { aspect-ratio: 16 / 9; border-radius: 14px; background: #000; display: grid; place-items: center; overflow: hidden; color: #8e9aad; font-size: 13px; font-weight: 600 }
.streambox { position: absolute; z-index: 5; border-radius: 14px; overflow: hidden; background: #000 }
.streambox iframe { display: block; width: 100%; height: 100%; border: 0 }
/* countdown: between the crests on wide screens, on its own line on phones */
.cd { display: inline-flex; gap: 8px }
.cd span { display: grid; justify-items: center; min-width: 60px; padding: 9px 6px 7px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid var(--line2) }
.cd b { font: 800 34px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink) }
.cd small { margin-top: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.md-next .mid .md-vs { display: none }
.md-cdrow { display: none; justify-content: center; margin-top: 14px }
@media (max-width: 760px) {
  .md-next .mid .cd { display: none }
  .md-next .mid .md-vs { display: flex }
  .md-cdrow { display: flex }
  .cd span { min-width: 64px }
}
@media (max-width: 360px) { .cd { gap: 6px } .cd span { min-width: 56px } .cd b { font-size: 30px } }

/* ---------- add to calendar */
.hero-actions { align-items: center }
.calbtns { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center }
.cal-l { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2) }
.cal-l svg { width: 16px; height: 16px; color: var(--accent2) }
.calbtn { display: inline-flex; align-items: center; gap: 5px; padding: 4px; margin: -4px; border-radius: 8px; color: var(--muted) }
.calbtn:hover, .mrow .ex a:hover { color: var(--accent2) }
.calbtn svg { width: 16px; height: 16px }
.calbtn span, .mrow .ex a span, .mrow .fx-d { display: none }
.calmenu a { white-space: nowrap }
@media (max-width: 560px) {      /* phones: the two main buttons share a line, the calendar choices share the next */
  .md .hero-actions, .hero-actions:has(.calbtns) { gap: 8px }
  .md .hero-actions > .btn, .hero-actions:has(.calbtns) > .btn { padding: 9px 13px; font-size: 14px }
  .calbtns { flex-basis: 100%; gap: 6px; flex-wrap: nowrap }
  .calbtns .btn.sm { padding: 7px 10px; font-size: 12.5px; white-space: nowrap }
  .cal-l { font-size: 12.5px; white-space: nowrap }
}
.calbtn:focus-visible, .seg button:focus-visible, .tw-p:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px }

/* ---------- fixture rows: on phones the kick-off time replaces "VS" and a second line has the date + actions */
.mrow .ex { align-items: center }
@media (min-width: 561px) { .mrow.fx { grid-template-columns: minmax(58px, max-content) minmax(0, 1fr) auto minmax(0, 1fr) 42px } .mrow.fx .meta { white-space: nowrap } }   /* "7:00 PM CT" stays on one line */
.mrow .sc.up .ko { display: none }
@media (max-width: 560px) {
  .mrow.fx { row-gap: 7px }
  .mrow.fx .sc.up { padding: 5px 8px }
  .mrow.fx .sc.up .vs { display: none }
  .mrow.fx .sc.up .ko { display: grid; justify-items: center; font-size: 17px; line-height: 1; color: var(--ink); white-space: nowrap }
  .mrow.fx .sc.up .ko small { margin-top: 2px; font: 700 9.5px var(--body); letter-spacing: .06em; color: var(--muted) }
  .mrow.fx .ex { display: flex; grid-column: 1 / -1; justify-self: center; gap: 16px; font-size: 12px; font-weight: 600; color: var(--muted) }
  .mrow.fx .ex .calbtn span, .mrow.fx .ex a span, .mrow.fx .fx-d { display: inline }
  .mrow.fx .ex a { display: inline-flex; align-items: center; gap: 5px }
  .mrow.fx .ex svg { width: 14px; height: 14px }
  .mrow.fx .calbtn { margin: 0; padding: 0; font: inherit }
}

/* ---------- time zone switch ("Times: My time zone / Eastern") */
.tzswitch { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center }
.tz-l { font-size: 12.5px; font-weight: 600; color: var(--muted) }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line2) }
.seg button { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap }
.seg button i { font-style: normal; font-weight: 500; opacity: .8 }
.seg button.on { background: var(--accent); color: var(--on-accent) }
.tzline { display: flex; justify-content: center; padding: 10px 12px 12px; border-top: 1px solid var(--line) }
#tzbox, #installbox { display: block; margin-top: 10px }
#tzbox:empty, #installbox:empty { display: none }

/* ---------- add to home screen */
.installbtn svg { color: var(--accent2) }
.installhint { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line2); color: var(--ink2); text-align: left }
.installhint svg { width: 18px; height: 18px; flex: none; color: var(--accent2) }
.installhint b, .install-row small b { color: var(--ink) }
.sheet nav a.install-row { grid-column: 1 / -1; background: color-mix(in srgb, var(--gold) 13%, var(--surface2)); border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent) }
.sheet nav a svg { flex: none }
.install-row small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--ink2) }

/* ---------- share pictures: preview window */
.picmodal { padding: 40px 14px; overflow: auto }
.picbox { width: min(780px, 100%) }
.pic-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line) }
.pic-h b { font-size: 16px }
.pic-frame { display: grid; place-items: center; min-height: 200px; padding: 14px; background: var(--bg2) }
.pic-frame img { width: auto; height: auto; max-width: 100%; max-height: 64vh; border-radius: 10px; box-shadow: var(--shadow) }
.pic-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px }
.pic-actions:empty { display: none }
.pic-actions p { flex-basis: 100% }
.btn.busy { opacity: .6; cursor: progress }
@media (max-width: 560px) { .picmodal { padding: 16px 10px } .pic-actions .btn { flex: 1 } }

/* ---------- Team of the Week */
.tw-hero .hero-in { padding: 24px 24px 22px }
.nac-hero h1.tw-h { margin-top: 10px; font: 700 clamp(30px, 6vw, 56px)/1 "Barlow", var(--body); letter-spacing: .05em; color: var(--ink) }
.tw-hero p { margin-top: 12px }
.tw-hero .hero-actions { margin-top: 18px }
@media (max-width: 760px) { .tw-hero .hero-in { padding: 20px 16px 18px } }
.tw-card { padding: 14px }
/* the pitch is always navy with gold lines (it is the poster, in both themes) */
.tw-pitch { position: relative; aspect-ratio: 6 / 5; border-radius: 18px; overflow: hidden; background: repeating-linear-gradient(180deg, #182e4a 0 12.5%, #14273f 12.5% 25%); box-shadow: inset 0 0 0 1.5px rgba(197,161,90,.5) }
.tw-pitch::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,20,34,.4), rgba(10,20,34,0) 50%, rgba(10,20,34,.4)) }
.tw-pitch .ln { position: absolute; border: 2px solid rgba(197,161,90,.4); pointer-events: none }
.tw-pitch .edge { inset: 10px; border-radius: 10px }
.tw-pitch .half { left: 10px; right: 10px; top: 50%; border-width: 2px 0 0 }
.tw-pitch .circle { width: 18%; aspect-ratio: 1; border-radius: 50%; left: 41%; top: 50%; transform: translateY(-50%) }
.tw-pitch .box1, .tw-pitch .box2 { left: 28%; right: 28%; height: 14% }
.tw-pitch .six1, .tw-pitch .six2 { left: 41%; right: 41%; height: 5.5% }
.tw-pitch .box1, .tw-pitch .six1 { top: 10px; border-top: 0 }
.tw-pitch .box2, .tw-pitch .six2 { bottom: 10px; border-bottom: 0 }
.tw-p { position: absolute; z-index: 1; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; width: 168px; text-align: center; color: #f2ece1 }
.tw-f { position: relative; display: inline-grid }
.tw-f .face { box-shadow: 0 0 0 3px var(--fc, #c5a15a), 0 6px 16px rgba(0,0,0,.45) }
.tw-f .rt { position: absolute; top: -7px; right: -20px; box-shadow: 0 2px 6px rgba(0,0,0,.45) }
.tw-p b { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 3px; padding: 3px 11px 3px 6px; border-radius: 999px; background: rgba(10,20,34,.86); border: 1px solid rgba(197,161,90,.32); font: 700 16px/1.25 var(--display); letter-spacing: .03em; text-transform: uppercase }
.tw-p b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tw-p b .crest { filter: none }
.tw-p small { font-size: 11px; font-weight: 600; color: #8e9aad }
.tw-p:hover b { border-color: #c5a15a }
.tw-p.star b { border-color: #c5a15a; color: #d7b877 }
@media (max-width: 640px) {
  .tw-card { padding: 10px }
  .tw-pitch { aspect-ratio: 5 / 7; border-radius: 14px }
  .tw-p { width: 112px; gap: 3px }
  .tw-p .face { width: 56px !important; height: 56px !important; font-size: 21px !important }
  .tw-f .rt { top: -6px; right: -16px; min-width: 31px; height: 19px; font-size: 12.5px; border-radius: 5px }
  .tw-p b { padding: 2px 8px 2px 4px; font-size: 13px; gap: 4px }
  .tw-p b .crest { width: 14px; height: 14px; font-size: 0 !important }
  .tw-p small { font-size: 10px }
}
.tw-potw { display: flex; align-items: center; gap: 14px }
/* one column (tablet, phone): pitch, Player of the Week, why these six, just missed out, games */
@media (max-width: 1080px) {
  .tw-cols > .stack, .tw-cols > .rail { display: contents }
  .tw-cols .tw-o1 { order: 1 } .tw-cols .tw-o2 { order: 2 } .tw-cols .tw-o3 { order: 3 } .tw-cols .tw-o4 { order: 4 } .tw-cols .tw-o5 { order: 5 }
}
.tw-potw-n { font: 800 26px/1 var(--display); text-transform: uppercase; overflow-wrap: anywhere }
/* small card on the home page */
.twmini { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 4px 16px 14px }
.twmini:hover .twmini-t b { color: var(--accent2) }
.twmini-faces { grid-column: 1 / -1; display: flex }
.twmini-faces .face { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface) }
.twmini-faces .face:first-child { margin-left: 0 }
.twmini-t { min-width: 0 }
.twmini-t b { display: block }
.twmini-t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted) }

/* ---------- phones: with Log in / the account picture in the header, the "Live" pill made the header wider than the
   screen during a live match. On narrow screens the pill is just its pulsing red dot (still a link to /live). */
@media (max-width: 480px) { .livepill.on { width: 28px; height: 28px; padding: 0; gap: 0; justify-content: center; font-size: 0; flex: none } }
@media (max-width: 380px) { .livepill.on { width: 16px; background: none } }
