/* =========================================================================
   Seeg Vision — Player (gestão à vista em rotação)
   ========================================================================= */
html, body { height: 100%; overflow: hidden; background: #000; }

.stage {
  position: fixed; inset: 0;
  background: var(--seeg-cinza);
  cursor: default;
}
.stage.hide-cursor { cursor: none; }

/* ---- Camadas de iframe (double-buffer) ---- */
.layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; margin: 0; padding: 0;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
  z-index: 1;
}
.layer.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* ---- Estado vazio ---- */
.empty {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--seeg-azul) 0%, var(--seeg-azul-d) 100%);
}
.empty-logo { height: 64px; margin-bottom: 8px; }
.empty h1 { margin: 0; font-size: 30px; font-weight: 800; }
.empty p  { margin: 0; opacity: .85; }
.empty .btn { margin-top: 12px; }

/* ---- HUD (cabeçalho + controles) ---- */
.hud {
  position: absolute; left: 0; right: 0; z-index: 10;
  color: #fff;
  display: flex; align-items: center;
  padding: 14px 26px;
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.hud .ctrl, .hud a, .hud button { pointer-events: auto; }

.hud-top {
  top: 0; justify-content: space-between;
  background: linear-gradient(180deg, rgba(31,53,104,.92) 0%, rgba(31,53,104,0) 100%);
}
.hud-bottom {
  bottom: 6px; justify-content: space-between; gap: 18px;
  background: linear-gradient(0deg, rgba(31,53,104,.95) 0%, rgba(31,53,104,0) 100%);
  padding-top: 34px;
}

/* esconde HUD quando ocioso */
.stage.idle .hud-top    { opacity: 0; transform: translateY(-100%); }
.stage.idle .hud-bottom { opacity: 0; transform: translateY(100%); }

.hud-brand { display: flex; align-items: center; gap: 12px; }
.hud-logo  { height: 38px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.hud-titles { display: flex; flex-direction: column; line-height: 1.15; }
.hud-system { font-weight: 800; font-size: 18px; letter-spacing: -.2px; }
.hud-channel { font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.hud-clock { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- Controles ---- */
.controls { display: flex; align-items: center; gap: 8px; }
.ctrl {
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.16); color: #fff;
  font-size: 18px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  transition: background .15s ease, transform .1s ease;
}
.ctrl:hover { background: var(--seeg-laranja); }
.ctrl:active { transform: scale(.93); }
.ctrl-main { width: 52px; height: 52px; font-size: 22px; background: var(--seeg-laranja); }
.ctrl-main:hover { background: var(--seeg-laranja-d); }

/* ---- Meta do painel ---- */
.panel-meta { flex: 1; text-align: center; min-width: 0; }
.panel-name {
  font-size: 20px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel-dates { font-size: 12px; opacity: .85; margin-top: 2px; }
.panel-dates b { font-weight: 700; }

/* ---- Índice + dots ---- */
.panel-index {
  display: flex; flex-direction: column; align-items: flex-end;
  font-weight: 700; font-variant-numeric: tabular-nums; min-width: 90px;
}
.panel-index .sep { opacity: .5; margin: 0 2px; }
.dots { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35); cursor: pointer; transition: background .2s, transform .2s;
}
.dot:hover { transform: scale(1.3); }
.dot.on { background: var(--seeg-laranja); }

/* ---- Progresso ---- */
.progress {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 11;
  height: 5px; background: rgba(0,0,0,.25);
}
.progress-fill {
  height: 100%; width: 0%;
  background: var(--seeg-laranja);
  box-shadow: 0 0 8px rgba(226,161,47,.7);
}
.stage.paused .progress-fill { background: #9aa6c4; box-shadow: none; }

/* ---- Toast ---- */
.toast {
  position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 12; background: rgba(213,40,40,.95); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-l);
}

.hidden { display: none !important; }

/* ---- Responsivo: tablet / celular horizontal ---- */
@media (max-width: 900px) {
  .hud { padding: 10px 14px; }
  .hud-system { font-size: 15px; }
  .hud-logo { height: 30px; }
  .hud-clock { font-size: 17px; }
  .panel-name { font-size: 15px; }
  .panel-dates { font-size: 10px; }
  .ctrl { width: 38px; height: 38px; font-size: 15px; }
  .ctrl-main { width: 44px; height: 44px; }
  .panel-index { min-width: 60px; font-size: 13px; }
  .dots { display: none; }
}

/* ---- TV grande (4k / telões): aumenta tudo ---- */
@media (min-width: 2200px) {
  .hud-system { font-size: 28px; }
  .hud-logo { height: 56px; }
  .hud-clock { font-size: 34px; }
  .panel-name { font-size: 30px; }
  .panel-dates { font-size: 18px; }
  .ctrl { width: 64px; height: 64px; font-size: 26px; }
  .ctrl-main { width: 76px; height: 76px; font-size: 32px; }
  .progress { height: 8px; }
}
