@charset "UTF-8";
/* NášBezdrát.NET – živé kamery (stream.nasbezdrat.net), verze 1.1.1 */

:root {
  --bg: #f6f0e2;            /* krémové pozadí */
  --surface: #fffaf0;
  --ink: #1f2a22;
  --ink-soft: #505a4b;
  --line: #d8ccb2;
  --green: #1d4a35;         /* aktivní ovládací prvky */
  --green-strong: #143726;
  --green-tint: #e4ebdc;
  --brick: #a5452c;         /* cihlový akcent */
  --brick-dark: #8a3721;
  --radius: 10px;
  /* Šířka obsahu se řídí výškou okna, aby se celé video vešlo bez posouvání.
     Výšku pro výpočet (--fit-h) pak drží skript, aby se video nezvětšovalo
     a nezmenšovalo při malých změnách výšky okna (pruh s upozorněním
     v prohlížeči auta, adresní řádek mobilu). */
  --fit-h: 100vh;
  --maxw: clamp(36rem, calc((var(--fit-h) - 11.5rem) * 16 / 9), 160rem);
  color-scheme: light;
}

@supports (height: 100dvh) {
  :root { --fit-h: 100dvh; }
}

/* neviditelná měrka velikosti okna pro skript */
.fit-probe {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  visibility: hidden;
  pointer-events: none;
}

@supports (height: 100dvh) {
  .fit-probe { height: 100dvh; }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
}

main { flex: 1 0 auto; padding-bottom: 1rem; }

.wrap {
  width: min(100% - 1.5rem, var(--maxw));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

a { color: var(--green); text-underline-offset: 0.15em; }
a:hover { color: var(--brick-dark); }

:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; color: #fff; }

/* ---------- Záhlaví ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem 1rem;
  padding-block: 0.3rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo__mark { color: var(--brick); flex: none; }
.logo__text {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.logo__a { font-weight: 600; }
.logo__b { color: var(--green); }
.logo__c { color: var(--brick); }

.site-header__tag {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Přepínače ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  margin: 0.5rem 0;
}

.segmented {
  min-width: 0;
  margin: 0; padding: 0; border: 0;
}

.segmented__options {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  background: var(--surface);
}

.seg { position: relative; display: flex; cursor: pointer; }
.seg input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.seg span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 1.75rem;
  padding: 0.05rem 0.8rem;
  border-radius: 999px;
  color: var(--green-strong);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.seg:hover span { background: var(--green-tint); }
.seg input:checked + span {
  background: var(--green);
  color: #fff;
}
.seg input:checked + span::before {   /* zatržítko – vybraná možnost není odlišena jen barvou */
  content: "";
  width: 0.36rem; height: 0.66rem;
  border: solid currentColor;
  border-width: 0 2.2px 2.2px 0;
  flex: none;
  transform: translateY(-1px) rotate(45deg);
}
.seg input:focus-visible + span {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}

/* ---------- Přehrávač ---------- */

.player {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #10140f;
  box-shadow: 0 1px 2px rgba(31, 42, 34, 0.12), 0 8px 22px rgba(31, 42, 34, 0.14);
}

.player__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem 0.7rem;
  min-height: 1.75rem;
  padding: 0.2rem 0.7rem;
  background: var(--green-strong);
}

.player__camera {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.35rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge__dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: #cfc7b3;
  flex: none;
}

.player[data-state="playing"] .badge { background: var(--brick); letter-spacing: 0.08em; }
.player[data-state="playing"] .badge__dot { background: #fff; animation: pulse 1.6s ease-in-out infinite; }
.player[data-state="connecting"] .badge__dot,
.player[data-state="retrying"] .badge__dot,
.player[data-state="waiting"] .badge__dot { background: #f1c56b; animation: pulse 1s ease-in-out infinite; }
.player[data-state="error"] .badge__dot,
.player[data-state="offline"] .badge__dot,
.player[data-state="unsupported"] .badge__dot { background: #ff8f73; }

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

.player__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
@supports not (aspect-ratio: 16 / 9) {
  .player__stage { height: 0; padding-top: 56.25%; }
}

.player video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}

.player__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
}
.player__overlay > * { pointer-events: auto; }

.player[data-state="error"] .player__overlay,
.player[data-state="offline"] .player__overlay,
.player[data-state="unsupported"] .player__overlay,
.player[data-state="retrying"] .player__overlay,
.player[data-state="blocked"] .player__overlay {
  background: rgba(10, 14, 10, 0.62);
}

.player__message {
  max-width: 34rem;
  margin: 0;
  color: #fff;
  font-size: 0.98rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.spinner {
  width: 2.75rem; height: 2.75rem;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.big-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem; height: 4.5rem;
  padding: 0 0 0 0.25rem;
  border: 3px solid #fff;
  border-radius: 50%;
  background: rgba(29, 74, 53, 0.92);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}
.big-play:hover { background: var(--green); transform: scale(1.06); }

.player__bar {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.4rem;
  background: var(--green-strong);
  color: #fff;
}
.player__bar-spacer { flex: 1 1 auto; }
.player__bar-note {
  margin-left: 0.25rem;
  color: #dbe5d6;
  font-size: 0.82rem;
  white-space: nowrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2rem; height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.icon-btn .ico { width: 1.3rem; height: 1.3rem; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.icon-btn:disabled { opacity: 0.45; cursor: default; }
.icon-btn:disabled:hover { background: transparent; }

.bar-btn {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 1.7rem;
  margin-left: 0.2rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.bar-btn:hover { background: rgba(255, 255, 255, 0.16); }
.bar-btn--live::before {
  content: "";
  width: 0.5rem; height: 0.5rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: #ff9c80;
}

.player__bar :focus-visible,
.player__overlay :focus-visible {
  outline: 3px solid #ffd9a8;
  outline-offset: 2px;
}

/* ikony dvoustavových tlačítek */
.ico--pause, .ico--sound, .ico--exit { display: none; }
[data-on="true"] > .ico--pause,
[data-on="true"] > .ico--sound,
[data-on="true"] > .ico--exit { display: block; }
[data-on="true"] > .ico--play,
[data-on="true"] > .ico--muted,
[data-on="true"] > .ico--enter { display: none; }

.volume {
  width: 5rem;
  height: 1.7rem;
  margin: 0 0.25rem;
  background: transparent;
  accent-color: #f3e9d2;
  cursor: pointer;
}

/* ---------- Celá obrazovka: obraz přes celý displej, ovládání přes něj ---------- */

.player.is-fullscreen {
  width: 100%; height: 100%;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}
.player.is-fullscreen .player__stage {
  position: absolute;
  inset: 0;
  height: auto;
  padding-top: 0;
  aspect-ratio: auto;
}
.player.is-fullscreen .player__top,
.player.is-fullscreen .player__bar {
  position: absolute;
  left: 0; right: 0;
  z-index: 3;
  transition: opacity 0.25s;
}
.player.is-fullscreen .player__top {
  top: 0;
  justify-content: flex-start;
  gap: 0.8rem;
  padding: calc(0.7rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px)) 2.2rem calc(1rem + env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  pointer-events: none;
}
/* název na opačné straně, než má kamera vlastní datum a popisek */
.player.is-fullscreen[data-overlay="right"] .player__top { justify-content: flex-end; }
.player.is-fullscreen .player__camera {
  font-size: clamp(1.05rem, 0.8rem + 1vw, 1.5rem);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.player.is-fullscreen .badge { font-size: 0.9rem; padding: 0.15rem 0.7rem; }
.player.is-fullscreen[data-state]:not([data-state="playing"]) .badge { background: rgba(20, 24, 19, 0.82); }
.player.is-fullscreen .player__bar {
  bottom: 0;
  gap: 0.35rem;
  padding: 2.2rem calc(0.8rem + env(safe-area-inset-right, 0px)) calc(0.6rem + env(safe-area-inset-bottom, 0px)) calc(0.8rem + env(safe-area-inset-left, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}
.player.is-fullscreen .icon-btn { width: 2.6rem; height: 2.6rem; }
.player.is-fullscreen .icon-btn .ico { width: 1.6rem; height: 1.6rem; }
.player.is-fullscreen .bar-btn { min-height: 2.1rem; font-size: 0.95rem; background: rgba(0, 0, 0, 0.35); }
.player.is-fullscreen .bar-btn:hover { background: rgba(255, 255, 255, 0.22); }
.player.is-fullscreen .player__bar-note { font-size: 0.95rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }

.player.is-fullscreen.is-idle .player__top,
.player.is-fullscreen.is-idle .player__bar {
  opacity: 0;
  pointer-events: none;
}
.player.is-fullscreen.is-idle,
.player.is-fullscreen.is-idle video { cursor: none; }

/* ---------- Pod přehrávačem ---------- */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.3rem;
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
}
.facts__item { display: flex; align-items: baseline; gap: 0.35rem; min-width: 0; }
.facts dt { color: var(--ink-soft); }
.facts dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.25rem 1rem;
  border: 1.5px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
  color: var(--green-strong);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--green-tint); }
.btn--light { border-color: #fff; background: #fff; color: var(--green-strong); }
.btn--light:hover { background: var(--green-tint); }

.tip {
  margin: 0.5rem 0 0;
  padding: 0.35rem 0.7rem;
  border-left: 3px solid var(--brick);
  border-radius: 0 6px 6px 0;
  background: var(--surface);
  font-size: 0.9rem;
}
.link-btn {
  padding: 0.1rem 0;
  border: 0;
  background: none;
  color: var(--green);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.link-btn:hover { color: var(--brick-dark); }

.note {
  margin: 0.5rem 0 0;
  padding-left: 0.6rem;
  border-left: 3px solid var(--brick);
  color: var(--ink-soft);
  font-size: 0.86rem;
}
.note--keys {
  margin-top: 0.3rem;
  border-left-color: transparent;
}
kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 0.3em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.85em;
  font-weight: 700;
  text-align: center;
}

.noscript {
  margin-top: 0.8rem;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--brick);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 600;
}

/* ---------- Patička ---------- */

.site-footer {
  flex: none;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.1rem 1.5rem;
  padding-block: 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
}
.site-footer p { margin: 0; }

/* ---------- Dotykové displeje: o něco větší cíle, hlasitost řídí zařízení ---------- */

@media (pointer: coarse) {
  .seg span { min-height: 2.2rem; }
  .icon-btn { width: 2.5rem; height: 2.5rem; }
  .icon-btn .ico { width: 1.45rem; height: 1.45rem; }
  .bar-btn { min-height: 2.1rem; }
  .volume { display: none; }
  .note--keys { display: none; }
}

/* ---------- Úzké displeje ---------- */

@media (max-width: 40rem) {
  .wrap { width: min(100% - 1.2rem, var(--maxw)); }
  .controls { gap: 0.35rem 0.5rem; margin: 0.4rem 0; }
  .segmented { flex: 1 1 auto; }
  .segmented__options { display: flex; }
  .seg { flex: 1 1 auto; min-width: 0; }
  .seg span { width: 100%; padding-inline: 0.55rem; }
  .player:not(.is-fullscreen) { margin-inline: -0.6rem; border-radius: 0; }
  .player__bar-note { display: none; }
  .bar-btn { padding-inline: 0.6rem; }
  .big-play { width: 3.75rem; height: 3.75rem; }
  .note--keys { display: none; }
}

@media (max-width: 26rem) {
  .site-header__tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .badge__dot { animation: none !important; }
  .spinner { animation-duration: 2.5s; }
}

@media (forced-colors: active) {
  .seg input:checked + span { outline: 3px solid Highlight; outline-offset: -3px; }
  .badge, .btn, .icon-btn, .bar-btn, .big-play { border: 1px solid ButtonText; }
}
