/* ============================================
   ESKIL — Startskärm (kiosk)
   ============================================ */

.ss-root {
  position: fixed; inset: 0;
  background: var(--scout-blue-900);
  color: var(--white);
  display: grid;
  /* Narrow: top bar + main + bottom strip (sidebar hidden) */
  grid-template-columns: 1fr;
  grid-template-rows: 72px 1fr 140px;
  grid-template-areas:
    "top"
    "main"
    "foot";
  font-family: var(--font-display);
  overflow: hidden;
}
.ss-top  { grid-area: top; }
.ss-main { grid-area: main; }
.ss-foot { grid-area: foot; }
.ss-sidebar { display: none; }       /* hidden by default, revealed at wide widths */

/* Wide: add a left sidebar with the next ~10 patrols; drop the bottom strip. */
@media (min-width: 1100px) {
  .ss-root {
    grid-template-columns: 380px 1fr;
    grid-template-rows: 72px 1fr;
    grid-template-areas:
      "top top"
      "sidebar main";
  }
  .ss-sidebar { grid-area: sidebar; display: flex; flex-direction: column; }
  .ss-foot    { display: none; }
}

/* --- Top bar ------------------------------------------------------------- */
.ss-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--scout-blue-800);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ss-top-left { min-width: 0; }
.ss-eyebrow {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rover-yellow);
}
.ss-subline { font-size: 14px; color: #a7bccf; margin-top: 2px; }
.ss-clock {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 700; font-size: 34px; color: var(--white);
  font-variant-numeric: tabular-nums;
}
.ss-top-right { display: flex; gap: 12px; align-items: center; }
.ss-btn {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  width: 40px; height: 40px;
  border: none; border-radius: var(--r-md);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background 0.15s;
}
.ss-btn:hover { background: rgba(255,255,255,0.16); }

/* --- Sidebar (wide screens only) ---------------------------------------- */
.ss-sidebar {
  background: var(--scout-blue-800);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 22px 20px;
  overflow-y: auto;
  gap: 10px;
}
.ss-side-label {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rover-yellow);
  margin-bottom: 14px;
}
.ss-side-list { display: flex; flex-direction: column; gap: 10px; }
.ss-side-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; align-items: baseline; gap: 14px;
  transition: background 0.2s;
}
.ss-side-time {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 700; font-size: 18px;
  color: var(--rover-yellow);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.ss-side-body { min-width: 0; flex: 1; }
.ss-side-patrol { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ss-side-no {
  background: rgba(255,255,255,0.12);
  padding: 1px 8px; border-radius: 999px;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 700; font-size: 12px;
}
.ss-side-name {
  font-weight: 700; font-size: 15px; color: var(--white);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ss-side-sub {
  font-size: 12px; color: #a7bccf;
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ss-side-countdown {
  font-size: 13px; color: var(--rover-yellow);
  font-weight: 600; margin-top: 6px;
}
.ss-side-empty { color: #a7bccf; font-size: 15px; padding: 14px 0; }

/* Prominent "next up" at the top of the list */
.ss-side-item.ss-side-next {
  background: var(--avent-orange);
  border-color: var(--avent-orange);
  padding: 18px 20px;
  gap: 18px;
  box-shadow: 0 6px 20px rgba(233, 95, 19, 0.35);
}
.ss-side-item.ss-side-next .ss-side-time {
  color: var(--white);
  font-size: 26px;
}
.ss-side-item.ss-side-next .ss-side-no {
  background: rgba(255,255,255,0.25);
  color: var(--white);
  font-size: 14px;
  padding: 2px 10px;
}
.ss-side-item.ss-side-next .ss-side-name {
  font-size: 20px;
  color: var(--white);
}
.ss-side-item.ss-side-next .ss-side-sub {
  color: rgba(255,255,255,0.82);
  font-size: 13px;
}
.ss-side-item.ss-side-next .ss-side-countdown {
  color: var(--white);
  font-size: 14px;
  background: rgba(0,0,0,0.18);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
}

/* --- Main card ----------------------------------------------------------- */
.ss-main {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 48px;
  min-height: 0;
}
.ss-loading, .ss-foot-empty {
  color: #a7bccf;
  font-size: 22px;
  text-align: center;
}
.ss-idle {
  text-align: center;
  color: var(--white);
}
.ss-idle-label {
  font-size: 18px; color: var(--rover-yellow);
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.ss-idle-next { font-size: 44px; font-weight: 200; margin-top: 14px; }
.ss-idle-time { font-size: 20px; color: #a7bccf; margin-top: 10px; font-family: 'SF Mono', monospace; }

.ss-card {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1600px;
  width: 100%;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.ss-card-head { min-width: 0; }
.ss-card-body {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  align-items: start;
}
.ss-card-info { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.ss-card-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 600;
  color: #a7bccf;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ss-number {
  background: var(--rover-yellow); color: var(--scout-blue);
  padding: 4px 14px; border-radius: 999px;
  font-weight: 800; font-family: 'SF Mono', monospace;
}
.ss-avd { font-weight: 700; color: var(--white); }
.ss-kar { color: #a7bccf; }

.ss-name {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(64px, 7vw, 128px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--white);
  overflow-wrap: break-word;
  word-break: break-word;
}

.ss-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.ss-meta-pill {
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  color: #d2dde8;
}

.ss-time-block {
  background: rgba(0,0,0,0.2);
  border-radius: 20px;
  padding: 20px 28px;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px;
}
.ss-time-label {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #a7bccf;
}
.ss-time-value {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 48px;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.ss-count-block {
  background: var(--avent-orange);
  border-radius: 20px;
  padding: 24px 32px;
  color: var(--white);
  text-align: center;
  transition: background 0.4s ease, transform 0.4s ease;
}
.ss-count-label {
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0.9;
}
.ss-count-value {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 72px;
  line-height: 1.05;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* GO state — whole card pulses green with a prominent glow */
.ss-card.ss-go {
  background: var(--spaer-green);
  border-color: #9bd78b;
  box-shadow: 0 0 80px 10px rgba(65, 166, 42, 0.55);
  animation: ss-go-pulse 1.1s ease-in-out infinite;
}
.ss-card.ss-go .ss-count-block {
  background: var(--white);
  color: var(--spaer-green);
  transform: scale(1.04);
}
.ss-card.ss-go .ss-count-label { opacity: 1; }
.ss-card.ss-go .ss-time-block { background: rgba(0,0,0,0.25); }
@keyframes ss-go-pulse {
  0%, 100% { box-shadow: 0 0 80px 10px rgba(65, 166, 42, 0.55); }
  50%      { box-shadow: 0 0 120px 20px rgba(65, 166, 42, 0.85); }
}

/* --- QR panel ------------------------------------------------------------ */
.ss-card-right {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.ss-qr {
  background: #ffffff;
  padding: 16px;
  border-radius: 20px;
  width: 440px; height: 440px;
  display: flex; align-items: center; justify-content: center;
}
.ss-qr img { width: 100%; height: 100%; display: block; }
.ss-qr-caption {
  font-size: 18px; font-weight: 600;
  color: #d2dde8;
  letter-spacing: 0.04em;
}

/* --- Footer strip -------------------------------------------------------- */
.ss-foot {
  background: var(--scout-blue-800);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 16px 28px;
  display: flex; align-items: center; gap: 24px;
  overflow-x: auto;
}
.ss-foot-label {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rover-yellow);
  flex-shrink: 0;
}
.ss-foot-list { display: flex; gap: 28px; flex: 1; min-width: 0; }
.ss-foot-item {
  display: inline-flex; align-items: baseline; gap: 12px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  white-space: nowrap;
  color: var(--white);
  font-size: 16px;
}
.ss-foot-time {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 700;
  color: var(--rover-yellow);
  font-size: 17px;
}
.ss-foot-no {
  background: rgba(255,255,255,0.12);
  padding: 2px 8px; border-radius: 999px;
  font-family: 'SF Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 13px;
}
.ss-foot-name { font-weight: 700; }
.ss-foot-kar { color: #a7bccf; font-size: 14px; }

/* Responsive — keep it readable on large displays but still functional on
   a 1024-wide projector. */
@media (max-width: 1100px) {
  .ss-card-body { grid-template-columns: 1fr; }
  .ss-card-right { align-items: center; }
  .ss-qr { width: 320px; height: 320px; }
  .ss-name { font-size: clamp(52px, 9vw, 96px); }
}

/* Late override: at wide widths the bottom strip is redundant (sidebar takes
   over). This rule must live AFTER the base `.ss-foot { display: flex }`
   above so it wins the cascade. */
@media (min-width: 1100px) {
  .ss-foot { display: none !important; }
}
