/*
 * LIVE obrazovka zápasu (Match:live) - TV / projektor v hale, tmavá, bez layoutu webu.
 * Farby a písmo z www/css/layout.css (:root tokeny, Rajdhani), LIVE / Naplánovaný badge
 * z layout.css (.badge-live, .badge-scheduled) - tu sa len zväčšujú.
 * Všetky rozmery sú v --u = 1 % šírky 16:9 plochy (min z vw a vh), takže obrazovka vyzerá
 * rovnako na 1366x768 aj na 4K a nikdy sa neposúva (overflow: hidden).
 */
html,
body.live-screen {
  height: 100%;
}
body.live-screen {
  --u: min(1vw, 1.7778vh);
  --ls-line: rgba(255, 255, 255, 0.12);
  margin: 0;
  overflow: hidden;
  color: #FFF;
  background-color: var(--bs-body-bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(103, 85, 176, 0.38), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(47, 40, 94, 0.9), transparent 70%);
  font-family: var(--bs-font-sans-serif);
}
body.live-screen.is-idle {
  cursor: none;
}
#snippet--live {
  height: 100%;
}

/* ovládanie - dole v strede (nad pätičkou), po nečinnosti zmizne (web.js pridá body.is-idle) */
.ls-toolbar {
  position: fixed;
  bottom: calc(var(--u) * 0.8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(22, 17, 45, 0.85);
  border: 1px solid var(--bs-tertiary-bg);
  transition: opacity 0.4s ease;
}
body.live-screen.is-idle .ls-toolbar {
  opacity: 0;
  pointer-events: none;
}
.ls-toolbar .btn {
  --bs-btn-font-size: max(15px, calc(var(--u) * 0.85));
  white-space: nowrap;
}
.ls-toolbar-hint {
  font-size: max(13px, calc(var(--u) * 0.75));
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.ls {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--u) * 1.4);
  padding: calc(var(--u) * 2) calc(var(--u) * 3) calc(var(--u) * 1.4);
  box-sizing: border-box;
}

/* hlavička - turnaj, fáza / kolo, miesto */
.ls-head {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.6);
  min-width: 0;
  padding-bottom: calc(var(--u) * 1.2);
  border-bottom: 2px solid var(--bs-tertiary-bg);
}
.ls-head-logo {
  width: calc(var(--u) * 6);
  height: calc(var(--u) * 6);
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}
.ls-head-text {
  min-width: 0;
  flex-grow: 1;
}
.ls-event {
  font-size: calc(var(--u) * 2.8);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--u) * 0.6) calc(var(--u) * 1.6);
  margin-top: calc(var(--u) * 0.5);
  font-size: calc(var(--u) * 1.7);
  font-weight: 600;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.78);
}
.ls-meta .fa {
  color: var(--bs-secondary);
}
.ls-tag {
  padding: 0.05em 0.5em;
  border-radius: 0.3em;
  background: var(--bs-primary);
  color: #16112D;
  font-weight: 700;
  text-transform: uppercase;
}
.ls-head-side {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.6);
  flex-shrink: 0;
}
.ls-clock {
  font-size: calc(var(--u) * 2.8);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
}
.ls-brand {
  height: calc(var(--u) * 2.6);
  width: auto;
}

/* tabuľa - tímy a skóre */
.ls-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: calc(var(--u) * 2.4);
  min-height: 0;
  overflow: hidden;
}
/* s priebehom zápasu je na tabuľu menej miesta - menšie logá a skóre */
.ls:has(.ls-timeline) .ls-team-logo {
  width: calc(var(--u) * 9.5);
  height: calc(var(--u) * 9.5);
}
.ls:has(.ls-timeline) .ls-team-name {
  font-size: calc(var(--u) * 4.2);
}
.ls:has(.ls-timeline) .ls-score {
  font-size: calc(var(--u) * 13.5);
}
.ls:has(.ls-timeline) .ls-parts {
  font-size: calc(var(--u) * 1.9);
}
.ls:has(.ls-timeline) .ls-center {
  gap: calc(var(--u) * 0.9);
}
.ls-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 1.6);
  min-width: 0;
  text-align: center;
  transition: opacity 0.3s ease;
}
.ls-team-logo {
  width: calc(var(--u) * 13);
  height: calc(var(--u) * 13);
  object-fit: cover;
  border-radius: 50%;
  background: var(--bs-secondary-bg);
  border: calc(var(--u) * 0.3) solid var(--bs-tertiary-bg);
}
.ls-team-name {
  max-width: 100%;
  font-size: calc(var(--u) * 4.6);
  font-weight: 700;
  line-height: 1.02;
  text-transform: uppercase;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ls-team.is-winner .ls-team-name {
  color: var(--bs-primary);
}
.ls-team.is-winner .ls-team-logo {
  border-color: var(--bs-primary);
}
.ls-team.is-loser {
  opacity: 0.6;
}
.ls-tbd {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  text-transform: none;
}

.ls-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 1.2);
  min-width: calc(var(--u) * 34);
}
.ls-status {
  min-height: calc(var(--u) * 3.6);
  display: flex;
  align-items: center;
}
.ls-badge {
  font-size: calc(var(--u) * 2);
  padding: 0.35em 0.8em;
  gap: 0.45em;
  border-radius: 0.4em;
  letter-spacing: 0.06em;
}
.ls-badge .badge-live-dot,
.ls-badge .badge-scheduled-dot {
  width: 0.55em;
  height: 0.55em;
}
.ls-badge.badge-scheduled {
  color: rgba(255, 255, 255, 0.82);
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.35);
}
.ls-badge-final {
  color: var(--bs-primary);
  background: rgba(214, 255, 2, 0.08);
  border: 2px solid var(--bs-primary);
}

.ls-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 1.2);
  padding: calc(var(--u) * 0.4) calc(var(--u) * 3);
  border-radius: calc(var(--u) * 2);
  background: rgba(31, 26, 62, 0.9);
  border: calc(var(--u) * 0.25) solid var(--bs-tertiary-bg);
  box-shadow: 0 calc(var(--u) * 1) calc(var(--u) * 4) rgba(0, 0, 0, 0.45);
  font-size: calc(var(--u) * 17);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ls-score-value {
  min-width: 1ch;
  text-align: center;
}
.ls-score-sep {
  color: var(--bs-primary);
  position: relative;
  top: -0.06em;
}
.ls-score.is-empty {
  color: rgba(255, 255, 255, 0.35);
}
.ls-score.is-empty .ls-score-sep {
  color: rgba(214, 255, 2, 0.45);
}
.ls-state-live .ls-score {
  border-color: rgba(220, 53, 69, 0.55);
  box-shadow: 0 calc(var(--u) * 1) calc(var(--u) * 4) rgba(0, 0, 0, 0.45), 0 0 calc(var(--u) * 3) rgba(220, 53, 69, 0.22);
}
.ls-state-finished .ls-score {
  border-color: rgba(214, 255, 2, 0.45);
}

/* naplánovaný zápas - namiesto skóre veľký čas začiatku */
.ls-kickoff-label {
  font-size: calc(var(--u) * 2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
}
.ls-kickoff {
  font-size: calc(var(--u) * 14);
  font-weight: 700;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--bs-primary);
}
.ls-kickoff-date {
  font-size: calc(var(--u) * 2.6);
  font-weight: 700;
  text-transform: uppercase;
}
.ls-vs {
  font-size: calc(var(--u) * 9);
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

/* skóre po častiach */
.ls-parts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--u) * 0.8);
  max-width: calc(var(--u) * 42);
  font-size: calc(var(--u) * 2.2);
  line-height: 1.1;
}
.ls-part {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.2em 0.6em;
  border-radius: 0.35em;
  background: var(--bs-secondary-bg);
  border: 1px solid var(--bs-tertiary-bg);
  font-variant-numeric: tabular-nums;
}
.ls-part-number {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}
.ls-part-number::after {
  content: '.';
}
.ls-part-note {
  color: var(--bs-primary);
  font-weight: 700;
  text-transform: uppercase;
}

/* priebeh zápasu - posledné udalosti */
.ls-timeline {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 0.35);
  max-width: calc(var(--u) * 120);
  width: 100%;
  margin: 0 auto;
  font-size: calc(var(--u) * 1.55);
  line-height: 1.15;
}
.ls-timeline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(var(--u) * 7) minmax(0, 1fr);
  align-items: center;
  gap: calc(var(--u) * 1.4);
  padding: calc(var(--u) * 0.2) 0;
  border-bottom: 1px solid var(--ls-line);
  color: rgba(255, 255, 255, 0.75);
}
.ls-timeline-row.is-latest {
  color: #FFF;
  font-weight: 700;
}
.ls-timeline-home {
  text-align: right;
}
.ls-timeline-home,
.ls-timeline-away {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-timeline-time {
  justify-self: center;
  padding: 0.05em 0.5em;
  border-radius: 0.3em;
  background: var(--bs-primary);
  color: #16112D;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ls-timeline-time:empty {
  display: none;
}

.ls-foot {
  display: flex;
  justify-content: space-between;
  gap: calc(var(--u) * 2);
  font-size: calc(var(--u) * 1.15);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}
.ls-foot-url {
  color: rgba(255, 255, 255, 0.7);
}

/* úzka / na výšku postavená obrazovka (mobil, tablet) - pod sebou, s posúvaním */
@media (max-aspect-ratio: 1/1) {
  body.live-screen {
    --u: 1.6vw;
    overflow: auto;
  }
  .ls {
    height: auto;
    min-height: 100%;
    padding-top: 64px;
  }
  .ls-board {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }
  .ls-toolbar {
    top: 8px;
    bottom: auto;
    gap: 6px;
    padding: 6px;
  }
  .ls-toolbar .btn {
    --bs-btn-font-size: 13px;
  }
  .ls-center {
    min-width: 0;
  }
  .ls-head-side .ls-clock {
    display: none;
  }
  .ls-toolbar-hint {
    display: none;
  }
}
