/* מצב טלוויזיה: ממלא את המסך, בלי גלילה, קריא מכמה מטרים. הגדלים ביחידות של רוחב המסך. */
html, body.tv { height: 100%; overflow: hidden; }
body.tv { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; font-size: 1vw; cursor: default; }
body.tv.idle, body.tv.idle * { cursor: none !important; }
.tv main, .tv .tv-grid > * { animation: none; }

.tv-top { display: flex; align-items: center; gap: 1.6vw; padding: 1.2vw 2.4vw; border-bottom: 1px solid var(--edge); background: rgba(4, 8, 13, .7); }
.tv .logo { width: 3.2vw; height: 3.2vw; }
.tv .brand { display: flex; align-items: center; gap: .9vw; }
.tv .brand-txt b { font-size: 2.3vw; }
.tv .brand-txt small { font-size: .95vw; }
.tv .live { font-size: .95vw; padding: .4vw .9vw; }
.tv-clock { margin-inline-start: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.tv-clock b { font: 700 2.6vw var(--mono); letter-spacing: .02em; }
.tv-clock span { font-size: 1vw; color: var(--muted); }

.tv-grid { display: grid; grid-template-columns: 33fr 35fr 32fr; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "level radar rot" "kpis kpis rot"; gap: 1.4vw 2vw; padding: 1.4vw 2.4vw; min-height: 0; }
.tv-level { grid-area: level; } .tv-radar { grid-area: radar; } .tv-kpis { grid-area: kpis; } .tv-rot { grid-area: rot; }
.tv-grid > section { min-height: 0; min-width: 0; }

.tv-level { display: flex; flex-direction: column; }
.tv-level > * { flex-shrink: 0; }
.tv .overline { font-size: 1.05vw; }
.tv h1 { margin: .6vw 0 .3vw; gap: 1.2vw; }
.tv .lv-num { font-size: 8.5vw; }
.tv .lv-label { font-size: 4.6vw; }
.tv .scale { max-width: 26vw; gap: .35vw; margin: .7vw 0 1.4vw; }
.tv .scale span { height: .45vw; }
.tv .scale em { display: none; }
.tv .headline { font-size: 1.85vw; margin: .4vw 0 1vw; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tv .bottom-line { font-size: 1.25vw; padding: .9vw 1.2vw; }
.tv .bottom-line b { font-size: .9vw; }
.tv .bottom-line span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tv .reasons { margin-top: .9vw; gap: .5vw; }
.tv .reasons li { font-size: .95vw; padding: .3vw .8vw; }
.tv .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9vw; }
.tv .kpi { padding: .9vw 1.1vw .7vw; border-radius: .9vw; }
.tv .kpi-label { font-size: .85vw; }
.tv .kpi-val { margin: .3vw 0 0; }
.tv .kpi-val b { font-size: 2.3vw; }
.tv .kpi-val small, .tv .kpi-note { font-size: .8vw; min-height: 0; }
.tv .kpi svg { height: 1.8vw; margin-top: .4vw; }
.tv .kpi .meter { margin-top: .6vw; height: .3vw; }

.tv-radar { display: flex; align-items: center; justify-content: center; overflow: visible; }
.tv-radar .radar { height: 100%; width: auto; max-width: 100%; }

.tv-rot { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--edge); border-radius: 1vw; padding: 1.2vw 1.4vw; overflow: hidden; }
.rot-h { display: flex; align-items: center; justify-content: space-between; gap: 1vw; }
.rot-h b { font-size: 1.35vw; font-weight: 800; }
.rot-dots { display: flex; gap: .4vw; }
.rot-dots i { width: .55vw; height: .55vw; border-radius: 50%; background: rgba(255, 255, 255, .15); transition: background .3s; }
.rot-dots i.on { background: var(--brand); box-shadow: 0 0 .6vw var(--brand); }
.rot-bar { height: 2px; background: rgba(255, 255, 255, .06); margin: .8vw 0 1vw; border-radius: 2px; overflow: hidden; }
.rot-bar i { display: block; height: 100%; width: 0; background: var(--brand); }
.rot-bar i.run { width: 100%; transition: width linear; }
.rot { position: absolute; inset: 4.6vw 1.4vw 1.2vw; opacity: 0; transform: translateY(.8vw); transition: opacity .7s var(--ease), transform .7s var(--ease); pointer-events: none; display: flex; flex-direction: column; min-height: 0; }
.rot.active { opacity: 1; transform: none; }
.tv .iran-top { gap: 1.2vw; }
.tv .gauge { width: 11vw; }
.tv .iran-bl { font-size: 1.15vw; min-width: 0; }
.tv .iran-bl .trend { font-size: .85vw; }
.tv .signals { grid-template-columns: 1fr; gap: .45vw; margin-top: 1vw; padding-top: 1vw; }
.tv .sig { font-size: .95vw; gap: .6vw; }
.tv .sig i { width: .6vw; height: .6vw; }
.tv .sig-legend { font-size: .75vw; }
.tv .empty { font-size: 1.15vw; }
.tv .map-wrap { flex: 1; min-height: 0; }
.tv .map { max-height: 100%; height: 100%; width: auto; }
.tv .map-day { font-size: .85vw; }
.tv .arenas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7vw; }
.tv .arena { padding: .7vw .9vw; border-radius: .7vw; }
.tv .arena-h b { font-size: .95vw; }
.tv .arena-lv { font-size: .75vw; }
.tv .arena-bar { margin: .45vw 0 .4vw; }
.tv .arena p { font-size: .8vw; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv .arena .tr { display: none; }
.tv .month-top { gap: 1.6vw; margin-bottom: 1.4vw; }
.tv .month-top div { font-size: .9vw; }
.tv .month-top b { font-size: 2.6vw; }
.tv .bars { height: auto; flex: 1; gap: .25vw; margin-bottom: 1.6vw; }
.tv .bars em { font-size: .7vw; bottom: -1.3vw; }

.tv-pulse { height: 3.6vw; }
.tv .pulse-lbl { font-size: 1vw; padding-inline: 2.4vw 4vw; gap: .5vw; }
.tv .pulse-lbl b { font-size: 1.4vw; }

.ticker { display: flex; align-items: stretch; height: 3.4vw; background: #070d14; border-top: 1px solid var(--edge); }
.tk-tag { display: grid; place-items: center; padding: 0 1.6vw; font-size: 1.1vw; font-weight: 900; color: #04120c; background: linear-gradient(135deg, var(--brand), #2bd4c8); }
.tk-view { flex: 1; overflow: hidden; position: relative; }
.tk-track { position: absolute; inset-block: 0; right: 0; display: flex; align-items: center; white-space: nowrap; animation: tick var(--tk-dur, 120s) linear infinite; }
.tk-track span { font-size: 1.2vw; padding-inline: 1.6vw; color: #dbe6f0; }
.tk-track span::after { content: "◆"; color: var(--brand); font-size: .7vw; margin-inline-start: 3.2vw; vertical-align: middle; }
.tk-track .tk-warn { color: #ffd27a; font-weight: 700; }
/* כמו בטיקר של חדשות בטלוויזיה בארץ: הטקסט נכנס משמאל ונע ימינה */
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(50%); } }

.tv-fs { position: fixed; bottom: 8vw; left: 2vw; z-index: 50; font: inherit; font-size: 1vw; font-weight: 700; color: var(--text); background: rgba(12, 22, 34, .9); border: 1px solid var(--edge-2); border-radius: .8vw; padding: .7vw 1.2vw; cursor: pointer; transition: opacity .4s; }
body.idle .tv-fs { opacity: 0; }

/* התרעה פעילה משתלטת על המסך */
.tv .alert-banner { position: fixed; inset: 0; z-index: 100; top: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 1.4vw; padding: 4vw; }
.tv .ab-title { font-size: 4.4vw; justify-content: center; }
.tv .ab-title .when { font-size: 1.6vw; display: block; width: 100%; }
.tv .ab-zones { font-size: 2.2vw; max-width: 80vw; }
.tv .ab-do { font-size: 1.8vw; padding: .8vw 1.6vw; border-radius: 1vw; }

/* מסך עומד (טלפון / טאבלט לאורך) */
@media (max-aspect-ratio: 1/1) {
  body.tv { font-size: 2vw; }
  .tv-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "level level" "radar rot" "kpis kpis"; }
  .tv .lv-num { font-size: 14vw; } .tv .lv-label { font-size: 8vw; } .tv .headline { font-size: 3.4vw; }
  .tv .bottom-line, .tv .reasons { display: none; }
  .tv-rot .rot { inset: 8vw 2vw 2vw; }
}
