/* ==========================================================================
   MOTOR-TELA-CHEIA.CSS — JOGO ASSISTIDO EM TELA CHEIA (Motor de Movimento
   2.0, 07/10/2026; refeito em 10/10/2026 a pedido do Anderson)
   Assunto EXCLUSIVO deste arquivo: o layout da tela do modo Assistir quando
   a tela cheia está ligada (UI.renderWatchMatchShell, ui-watchmatch.js):
   - o CAMPO ocupa a janela inteira, com tamanho fixo (nada o empurra);
   - na margem verde do campo: placar e times em cima, reservas embaixo;
   - chat da comentarista no topo esquerdo e do narrador no topo direito;
   - estatísticas e botões (Continuar, intervalo) no centro, só quando existem.
   O tamanho do campo (proporção 680x460) é acertado em app-campo-zonas.js.
   ========================================================================== */
.wm-tela-cheia {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; box-sizing: border-box; padding: 0;
  background: radial-gradient(ellipse at 50% 0%, #17351f 0%, #0b1a10 55%, #060d08 100%);
  overflow: hidden;
}

/* Campo de tamanho FIXO: a caixa .wm-campo nunca depende do conteúdo (contain: size) e o campo
   (.wm-campo-in) fica centralizado nela, na maior proporção 680x460 que couber. */
.wm-campo { position: relative; flex: 1; min-width: 0; min-height: 0; contain: size layout; display: flex; align-items: center; justify-content: center; }
.wm-campo-in { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 680 / 460; }
.wm-campo-in .watch-field-svg { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; }
/* desfile de entrada/saída (app-campo-entrada.js): esconde as bolinhas do jogo enquanto roda */
.campo-entrada-on .watch-dot, .campo-entrada-on .mfm-dir, .campo-entrada-on #mfm-fita, .campo-entrada-on #w-ball, .campo-entrada-on #mfm-sombra,
.campo-vazio .watch-dot, .campo-vazio .mfm-dir, .campo-vazio #mfm-fita, .campo-vazio #w-ball, .campo-vazio #mfm-sombra { visibility: hidden; }   /* campo-vazio: depois do fim do jogo, só o gramado */

/* Faixas na margem verde do campo (a margem do SVG tem 40 de 460 em cima e embaixo). */
.wm-zona { position: absolute; box-sizing: border-box; display: flex; align-items: center; overflow: hidden; color: #fff; z-index: 3; pointer-events: none; }
.wm-z-placar { left: 40%; top: .6%; width: 20%; height: 8%; justify-content: center; gap: .9em; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.2); border-radius: .6em; font-size: 1.15em; }
.wm-pl-time { display: flex; align-items: center; min-width: 0; }
.wm-pl-time svg, .wm-pl-time img { height: 3em; width: auto; }
.wm-pl-gols { font-size: 2em; font-weight: 800; line-height: 1; display: flex; align-items: center; gap: .3em; }
.wm-pl-x { opacity: .6; font-size: .6em; }
.wm-z-tempo { left: 61%; top: .6%; width: 16%; height: 8%; justify-content: center; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.2); border-radius: .6em; font-size: 1.15em; }
.wm-pl-relogio { font-size: 1.05em; font-weight: 800; color: #ffd24d; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; }
.wm-z-momentum { position: absolute; left: 40%; width: 20%; top: 9%; z-index: 3; pointer-events: none; }
.wm-z-momentum .momentum-bar { margin: 0; height: 5px; border-radius: 3px; opacity: .9; }
.wm-z-res { top: 91.4%; height: 8%; flex-wrap: wrap; align-content: center; gap: .12em .3em; padding: 0 .5em; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.15); border-radius: .6em; font-size: 1em; }
.wm-z-res:empty { display: none; }
.wm-z-res-home { left: 4%; width: 44%; }
.wm-z-res-away { right: 4%; width: 44%; }
.wm-res-tit { font-size: .85em; font-weight: 800; opacity: .7; text-transform: uppercase; letter-spacing: .06em; margin-right: .3em; }
.wm-res-chip { background: rgba(255,255,255,.14); border-radius: 1em; padding: .02em .45em; font-size: .78em; white-space: nowrap; line-height: 1.35; }
.wm-res-chip i { font-style: normal; font-weight: 800; opacity: .65; margin-right: .35em; font-size: .85em; }

/* Falas flutuantes, sem caixa: comentarista (rosa, topo esquerdo) e narrador (azul, topo direito).
   Cada fala traz o rosto de quem falou; a mais antiga some sozinha (app-campo-zonas.js, wmIniciarFalas). */
.wm-chat { position: absolute; top: 10px; z-index: 6; width: clamp(240px, calc(27 * var(--vw)), 400px); pointer-events: none; }
.wm-chat-ela { left: 12px; }
.wm-chat-ele { right: 12px; }
.wm-chat .wm-chat-lista { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none; border: 0; border-radius: 0; height: auto; overflow: hidden; padding: 0; gap: 8px; display: flex; flex-direction: column; }
.wm-chat .commentary-line { display: flex; align-items: center; gap: 9px; font-size: clamp(12px, calc(1.25 * var(--vw)), 16px); line-height: 1.3; font-weight: 700; color: #8cc8ff;
  text-shadow: 0 1px 2px #000, 1px 0 2px #000, -1px 0 2px #000; animation: wmFalaEntra .35s ease; transition: opacity .35s, transform .35s, visibility 0s; }
.wm-chat .commentary-line .min { display: none; }
.wm-chat .commentary-line.goal { color: #fff; }
.wm-chat .commentary-line.narrator-comment { color: #ff93bd; font-style: italic; }
.wm-chat .commentary-avatar { display: block; width: clamp(30px, calc(3 * var(--vw)), 42px); height: clamp(30px, calc(3 * var(--vw)), 42px); flex: 0 0 auto; box-shadow: none; }
.wm-chat .commentary-line:not(.narrator-comment) .commentary-avatar { border-color: #5fb0ff; }
.wm-chat .commentary-line.sai { opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .35s, transform .35s, visibility 0s .35s; animation: none; }
.wm-chat .mfm-rever { display: none; }
@keyframes wmFalaEntra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.wm-pill-canto { position: absolute; left: 8px; bottom: 6px; z-index: 6; transform: scale(.85); transform-origin: left bottom; opacity: .8; pointer-events: none; }

/* Estatísticas e botões: no centro da tela, só aparecem quando têm conteúdo. */
.wm-centro-painel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: calc(80 * var(--vh)); width: min(560px, calc(92 * var(--vw))); pointer-events: none; }
.wm-centro-painel > * { pointer-events: auto; }
.wm-centro-painel #watch-stats-wrap { width: 100%; max-height: calc(52 * var(--vh)); overflow-y: auto; border-radius: 12px; }
.wm-centro-painel #watch-stats-wrap:empty { display: none; }
.wm-centro-painel .match-controls { margin: 0; padding: 8px 12px; background: rgba(7,14,10,.82); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; }
.wm-centro-painel .match-controls:empty { display: none; }

/* botão da grade (só admin) */
.wm-grade-btn {
  position: absolute; left: 8px; top: 10%; z-index: 4; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px; padding: 4px 9px; font-size: 11px; font-weight: 700;
}
.wm-grade-btn:hover { background: rgba(0,0,0,.75); }

/* os cortes grandes do narrador/comentarista cobriam o campo: no jogo em tela cheia a fala fica nos chats */
.wm-tela-cheia ~ .commentary-reaction-img { display: none !important; }

/* Tela baixa (celular deitado): falas menores. */
@media (max-height: 560px) {
  .wm-chat { width: clamp(180px, calc(25 * var(--vw)), 280px); top: 4px; }
  .wm-chat-ela { left: 6px; } .wm-chat-ele { right: 6px; }
}

.wm-troca-pilha { position:absolute; left:50%; top:10%; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center; gap:.5em; z-index:6; pointer-events:none; }
.wm-troca-pilha.casa { left:40%; } .wm-troca-pilha.fora { left:60%; }
.wm-troca { position:relative; width:12em; box-sizing:border-box; display:flex; flex-direction:column; gap:.1em; align-items:center; padding:.4em .9em; background:rgba(0,0,0,.6); border:1px solid rgba(255,255,255,.25); border-radius:.6em; color:#fff; font-size:1em; z-index:6; transition:opacity .6s; pointer-events:none; }
.wm-troca > * { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wm-troca .sai { color:#ff7b7b; } .wm-troca .entra { color:#7bff9a; } .wm-troca.some { opacity:0; }
.campo-entrada-on #mfm-extras, .campo-vazio #mfm-extras { visibility: hidden; }   /* juiz, bandeirinhas e bola de enfeite somem com o campo vazio */

/* Cards do placar e do tempo (11/10/2026): escudos menores, placar mais largo, relógio sem cortar. */
.wm-z-placar { left: 37.5%; width: 25%; gap: .7em; padding: 0 .6em; box-sizing: border-box; }
.wm-z-placar .wm-pl-time svg, .wm-z-placar .wm-pl-time img { height: 2.5em; max-height: 88%; width: auto; }
.wm-z-placar .wm-pl-gols { font-size: 1.8em; gap: .25em; }
.wm-z-tempo { left: 63%; width: 12.5%; padding: 0 .4em; box-sizing: border-box; }
.wm-pl-relogio { font-size: .95em; letter-spacing: .01em; }
.wm-z-momentum { left: 37.5%; width: 25%; }

/* Termômetro de pressão (app-pressao-jogo.js): fundo neutro, cantos redondos, transição suave. */
.wm-z-momentum .momentum-bar { background: rgba(255,255,255,.22); border-radius: 4px; overflow: hidden; display: flex; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.wm-z-momentum .momentum-bar-fill { transition: width .9s ease, background-color .4s ease; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.75); }

/* Termômetro mais pra cima: fica dentro da base do card do placar, afastado da linha do campo. */
.wm-z-momentum { top: 7.2%; z-index: 4; left: 38.5%; width: 23%; }
.wm-z-placar .wm-pl-time svg, .wm-z-placar .wm-pl-time img { height: 2.2em; }
.wm-z-placar { padding-bottom: .5em; }
.wm-z-momentum { top: 6.2%; }
.wm-z-placar { padding-bottom: 1.1em; }
.wm-z-placar .wm-pl-time svg, .wm-z-placar .wm-pl-time img { height: 1.9em; }
.wm-z-placar .wm-pl-gols { font-size: 1.6em; }

/* Placar, tempo e termômetro mais altos: toda a faixa termina antes da linha do campo (que fica em ~8,7%). */
.wm-z-placar, .wm-z-tempo { top: .4%; height: 6.3%; }
.wm-z-placar { padding-bottom: .9em; }
.wm-z-placar .wm-pl-time svg, .wm-z-placar .wm-pl-time img { height: 1.7em; }
.wm-z-placar .wm-pl-gols { font-size: 1.5em; }
.wm-z-momentum { top: 5.2%; }
.wm-pl-relogio { font-size: .9em; }
.wm-z-placar .wm-pl-time > * { height: 1.9em !important; width: 1.9em !important; min-height: 0; }
.wm-z-placar .wm-pl-time svg, .wm-z-placar .wm-pl-time img { height: 100% !important; width: 100% !important; }
.wm-z-placar { padding-bottom: .55em; }
.wm-z-momentum { top: 5.4%; }
.wm-z-placar { padding-top: .35em; }
