/* CONTROLE DE MÁQUINAS — avisos da TV (P05C): cartões, bloco, tela e urgente. Animação só por opacity (TV Android leve). */
.av-grade { width: 100%; height: 100%; display: grid; gap: 0.9vh; grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); }
.av-grade.lado { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.av-grade[hidden], .area-avisos .caber[hidden] { display: none; }
.av-entra { animation: av-fade 400ms ease both; }
@keyframes av-fade { from { opacity: 0; } to { opacity: 1; } }

.av { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--superficie-1); color: var(--texto-1);
  border: 1px solid var(--borda); border-top: 0.9vh solid var(--av); border-radius: 0.8vh; font-size: 3vh; line-height: 1.22; text-align: center; }
.av-cab { flex: none; display: flex; align-items: center; justify-content: center; gap: 0.5em; padding: 0.45em 0.8em 0; color: var(--av); }
.av-ic { display: inline-flex; flex: none; } .av-ic svg { width: 1.7em; height: 1.7em; }
.av-tag { font-size: 0.95em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; overflow: hidden; min-width: 0; }
.av-pri { flex: none; font-size: 0.72em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 0.15em 0.6em; border-radius: 99px; background: var(--perigo); color: var(--branco); }
.av-corpo { flex: 1; min-height: 0; display: flex; gap: 0.8em; padding: 0.5em 0.8em 0.7em; }
.av.em-pe .av-corpo { flex-direction: column; }
.av-txt { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.av-in { margin: auto 0; min-width: 0; }
.av h2 { margin: 0 0 0.25em; font-size: 1.75em; font-weight: 700; line-height: 1.12; overflow-wrap: break-word; }
.av p { margin: 0.25em 0; font-size: 1.12em; font-weight: 500; overflow-wrap: break-word; }
.av p b { font-weight: 700; color: var(--branco); }
.av-sub { font-size: 1em; font-weight: 500; color: var(--texto-2); margin: 0.15em 0; overflow-wrap: break-word; }
.av-nota { font-size: 0.85em; color: var(--texto-3); margin-top: 0.5em; }
.av-nota::first-letter { text-transform: uppercase; }
.av-num { font-size: 6.2em; font-weight: 700; line-height: 1; color: var(--av); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.av-num.menor { font-size: 4em; }
.av-quando { font-size: 1.2em; font-weight: 700; color: var(--av); }
.av-quando::first-letter { text-transform: uppercase; }
.av-conta { display: inline-block; margin-top: 0.5em; padding: 0.2em 0.9em; border-radius: 99px; border: 0.1em solid var(--av); font-size: 1.35em; font-weight: 700; }
.av-empresa { font-size: 2.5em !important; color: var(--av); }
.av-maq { display: inline-block; margin-bottom: 0.4em; padding: 0.15em 0.8em; border-radius: 0.3em; background: var(--av); color: var(--superficie-1); font-size: 1.15em; font-weight: 700; overflow-wrap: break-word; }
.av-hora { font-size: 6.5em; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.av-relogio .av-sub::first-letter { text-transform: uppercase; }
.av-link { margin-top: 0.5em; font-size: 0.72em; color: var(--texto-3); word-break: break-all; }
.av-foto { flex: 0 0 42%; min-width: 0; min-height: 0; position: relative; }
.av-foto img, .av-arte img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.av-qrbox { flex: none; align-self: center; background: var(--branco); border-radius: 0.3em; overflow: hidden; color: var(--superficie-1); }
.av-qrbox svg { display: block; width: 100%; height: 100%; }
.av-seguranca { background: var(--aviso-fundo); }
.av-seguranca.alerta { background: var(--perigo-fundo); border-color: var(--perigo); border-top-color: var(--av); }
.av-cartaz { border-top-width: 1px; background: var(--preto); }
.av-arte { flex: 1; min-height: 0; position: relative; }
.av-semimg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vh; color: var(--texto-3); font-size: max(12px, 0.8em); }
.av-semimg svg { width: 3em; height: 3em; }
.av-legenda { flex: none; padding: 0.3em 0.6em; font-size: 0.95em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--superficie-1); }
.av-vazio { margin: auto; color: var(--sub); font-size: max(12px, 2.2vh); text-align: center; }

/* aviso urgente: cobre a área dos blocos por alguns segundos (o cabeçalho e o rodapé continuam) */
.urgente { position: fixed; left: 0; right: 0; top: 9.6vh; bottom: var(--hrod, 5.2vh); z-index: 2; display: flex; flex-direction: column; gap: 1vh; padding: 1vh 1vw; background: var(--perigo-fundo); animation: av-fade 400ms ease both; }
.urgente[hidden] { display: none; }
.urgente-faixa { flex: none; display: flex; align-items: center; justify-content: center; gap: 1.5vw; padding: 1.2vh 1vw; background: var(--cor-parada); color: var(--branco); border-radius: 0.8vh; font-size: 4.2vh; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.urgente-faixa i { width: 2.2vh; height: 2.2vh; border-radius: 50%; background: var(--branco); animation: av-pisca 1.2s ease-in-out infinite; }
@keyframes av-pisca { 50% { opacity: .15; } }
body.leve .urgente-faixa i { animation: none; }
.urgente-corpo { flex: 1; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.urgente .av { border-color: var(--cor-parada); }
.ticker-in b { font-weight: 700; color: var(--branco); }
