/* Player da TV Otimizado para Smart TVs (50", 65", 75", 1080p e 4K) */
body.tv-mode {
  background-color: #000000;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  user-select: none;
}

body.tv-mode.cursor-hidden {
  cursor: none;
}

.tv-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Barra Superior de Transmissão */
.tv-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 110px;
  z-index: 50;
  padding: 1.5rem 3rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  box-sizing: border-box;
}

.tv-brand-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.tv-store-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  padding: 0.6rem 1.8rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tv-store-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.tv-live-pill {
  background: #ef4444;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.9);
}

.tv-clock-box {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  color: #ffffff;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.9);
}

.tv-clock-time {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tv-clock-date {
  font-size: 1.5rem;
  font-weight: 600;
  color: #cbd5e1;
}

/* Área de Slides */
.tv-display-area {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
}

.tv-slide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-slide.active {
  opacity: 1;
  z-index: 10;
}

.tv-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tv-slide video,.tv-slide iframe{width:100%;height:100%;object-fit:contain;border:0}
.tv-slide[data-fit="cover"] img,.tv-slide[data-fit="cover"] video{object-fit:cover!important}
.tv-clean .tv-top-bar,.tv-clean .tv-ticker-bar,.tv-clean .tv-slide-progress-bar{display:none}
/* The player sets pixel dimensions and corners so older TV browsers honor settings. */
.tv-overlay-clock {
  position: absolute;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,.6), 0 0 12px rgba(0,0,0,.3);
}
.tv-overlay-clock[hidden], .tv-clock-box[hidden] { display: none!important; }
.tv-overlay-clock strong {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tv-overlay-clock span {
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.35;
  white-space: nowrap;
}
.tv-overlay-clock span[hidden] { display: none; }

.tv-no-ticker .tv-ticker-bar{display:none}
.tv-no-ticker .tv-slide-progress-bar{bottom:0}
.tv-live-pill{box-shadow:none;background:#395984;font-size:.75rem;letter-spacing:.1em}
.tv-mode .modal-overlay{background:rgba(4,8,16,.9);backdrop-filter:blur(14px);z-index:2000}
.tv-mode .confirm-content{max-width:560px;border-radius:24px;background:#141b2a;border:1px solid #3d4b68;box-shadow:0 30px 100px #000}
.tv-mode .confirm-content .modal-header{border-color:#33415d;padding:24px 28px}
.tv-mode .eyebrow{font-size:11px;letter-spacing:.16em;color:#a1b3d7}
.tv-mode .confirm-content h2{font-size:28px;margin-bottom:15px;letter-spacing:-.03em}
.tv-mode .confirm-content p{font-size:17px;color:#aebcd5;line-height:1.7}
.tv-mode .confirm-symbol{display:inline-flex;padding:18px;background:#342432;border:1px solid #6a3c4d;border-radius:17px;color:#ff9aaa;margin-bottom:24px}
.tv-mode .confirm-symbol .icon{width:30px;height:30px}
.tv-mode .confirm-content .modal-footer{background:#101725;border-color:#33415d;display:flex;gap:15px;padding:22px 28px}
.tv-mode .confirm-content .modal-footer .btn{flex:1;font-size:16px;min-height:50px}
.tv-mode .confirm-thumbnail[hidden]{display:none}
.tv-mode .modal-open{overflow:hidden}
@media(prefers-reduced-motion:reduce){.tv-slide,.tv-ticker-track{animation:none!important;transition:none!important}}


@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.tv-slide-progress-bar {
  position: fixed;
  bottom: 75px;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, #3b82f6, #a855f7);
  z-index: 45;
  width: 0%;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.9);
}

/* Letreiro Digital Inferior (Ticker) */
.tv-ticker-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 75px;
  background: rgba(10, 13, 20, 0.96);
  border-top: 2px solid rgba(255, 255, 255, 0.15);
  z-index: 50;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.tv-ticker-badge {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  height: 100%;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  z-index: 2;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}

.tv-ticker-content {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}

.tv-ticker-track {
  display: inline-block;
  white-space: nowrap;
  font-size: 1.7rem;
  font-weight: 600;
  color: #ffffff;
  padding-left: 100%;
  animation: marquee 25s linear infinite;
}

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Tela de Pareamento / Standby (Perfeita e Centralizada) */
.tv-standby-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1e293b 0%, #0a0d14 100%);
  text-align: center;
  z-index: 40;
  box-sizing: border-box;
  padding: 2rem;
}

.standby-card {
  background: rgba(22, 28, 45, 0.95);
  border: 2px solid #3b82f6;
  border-radius: 24px;
  padding: 3rem 4rem;
  max-width: 850px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.25);
  box-sizing: border-box;
}

.standby-qr-box {
  background: transparent;
  padding: 0;
}

/* Overlay de Alerta Flash / Aviso */
.tv-flash-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(220, 38, 38, 0.92); /* Vermelho translúcido para alerta */
  z-index: 9999; /* Fica acima de tudo */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-in-out;
}

.tv-flash-alert.active {
  opacity: 1;
}

.tv-flash-card {
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 4rem 6rem;
  border-radius: 32px;
  border: 4px solid #fbbf24;
  box-shadow: 0 0 80px rgba(251, 191, 36, 0.5);
  animation: pulseFlash 2s infinite;
}

@keyframes pulseFlash {
  0% { box-shadow: 0 0 60px rgba(251, 191, 36, 0.4); }
  50% { box-shadow: 0 0 120px rgba(251, 191, 36, 0.8); }
  100% { box-shadow: 0 0 60px rgba(251, 191, 36, 0.4); }
}

/* Broadcast composition belongs after the legacy player styles. */
.tv-top-bar{height:92px;padding:18px 32px;background:#0e131e;border-bottom:1px solid #273249}
.tv-store-badge{background:#182235;border:1px solid #344560;padding:9px 16px;gap:14px;border-radius:12px}
.tv-store-name{font-size:1.35rem;font-weight:600}
.tv-top-bar .tv-live-pill{box-shadow:none;background:#2a426b;font-size:.65rem;padding:6px 9px;letter-spacing:.1em}
.tv-clock-time{font-size:2rem;font-weight:600}
.tv-clock-date{font-size:1rem;font-weight:400;color:#a4b2cd}
.tv-clock-box{gap:20px;text-shadow:none}
.tv-display-area{top:92px;height:calc(100vh - 152px)}
.tv-slide{position:absolute;width:100%;height:100%}
.tv-slide-progress-bar{bottom:60px;height:3px;background:#6387ff;box-shadow:none}
.tv-ticker-bar{height:60px;border-top:1px solid #29354d;background:#0e131e}
.tv-ticker-badge{font-size:.85rem;background:#1d2a43;padding:0 28px;font-weight:600}
.tv-ticker-track{font-size:1.2rem;font-weight:400}
.tv-no-ticker .tv-display-area{height:calc(100vh - 92px)}
.tv-clean .tv-display-area{top:0;height:100vh}
@supports(height:100dvh){body.tv-mode,.tv-container{height:100dvh}.tv-clean .tv-display-area{height:100dvh!important}}
.tv-flash-alert{background:rgba(6,10,20,.94);backdrop-filter:blur(18px)}
.tv-flash-card{background:#141e32;border:1px solid #667fae;box-shadow:0 30px 100px #0008;animation:none;border-radius:24px;max-width:90vw;padding:48px 64px;overflow-wrap:anywhere}
.tv-flash-card:before{content:'COMUNICADO / TV INDOOR STUDIO';display:block;font-size:13px;letter-spacing:.2em;color:#8eaaf0;margin-bottom:28px}
.tv-flash-title{color:#c6d6ff!important;font-size:clamp(32px,3.5vw,60px)!important;font-weight:600;letter-spacing:-.03em}
.tv-flash-message{font-size:clamp(24px,2.5vw,44px)!important}
.tv-ticker-bar{height:88px!important;padding:0 38px!important;border-top:2px solid #d8bd79!important;background:#111b28!important}.tv-ticker-badge{font-size:20px!important;letter-spacing:2px!important;padding:16px 22px!important;color:#111923!important;background:#f2cf83!important;border:0!important;border-radius:9px!important;max-width:320px;white-space:nowrap}.tv-ticker-track{font-size:34px!important;line-height:1.2!important;font-weight:700!important;color:#fff!important}.tv-display-area{bottom:88px!important;height:calc(100vh - 180px)!important}.tv-clean .tv-display-area{bottom:0!important;height:100vh!important}.tv-no-ticker:not(.tv-clean) .tv-display-area{bottom:0!important;height:calc(100vh - 92px)!important}.tv-ticker-extra .tv-ticker-bar{height:106px!important}.tv-ticker-extra .tv-ticker-track{font-size:43px!important}.tv-ticker-extra:not(.tv-no-ticker):not(.tv-clean) .tv-display-area{bottom:106px!important;height:calc(100vh - 198px)!important}.tv-flash-alert{background:radial-gradient(ellipse at 15% 20%,#48351c,#0e1623 75%)!important;--notice-color:#ffd58a;z-index:1200!important}.tv-flash-alert[data-theme=urgent]{background:radial-gradient(ellipse at 15% 20%,#542329,#170f17 75%)!important;--notice-color:#ff9da2}.tv-flash-alert[data-theme=welcome]{background:radial-gradient(ellipse at 15% 20%,#233d60,#101a2b 75%)!important;--notice-color:#add8ff}.tv-flash-card{width:88vw!important;max-width:1660px!important;padding:6vh 6vw!important;border:1px solid var(--notice-color)!important;border-left:12px solid var(--notice-color)!important;box-shadow:0 32px 100px #0007!important;text-align:left!important;border-radius:24px!important;background:rgba(15,20,29,.5)!important}.tv-flash-card:before{display:none!important}.tv-flash-kicker{display:block;color:var(--notice-color);font-size:clamp(20px,2vw,38px);font-weight:800;letter-spacing:5px;margin-bottom:32px}.tv-flash-card .tv-flash-title{color:var(--notice-color)!important;font-size:clamp(38px,5vw,96px)!important;line-height:1.05!important;letter-spacing:-2px!important;margin:0 0 28px!important;overflow-wrap:anywhere}.tv-flash-card .tv-flash-message{font-size:clamp(32px,4vw,78px)!important;line-height:1.2!important;white-space:pre-line;color:#fff!important;font-weight:600!important;overflow-wrap:anywhere;margin:0!important}.tv-flash-alert.notice-dense .tv-flash-message{font-size:clamp(28px,3.2vw,62px)!important}.tv-queue-panel{position:fixed;right:0;top:92px;bottom:88px;width:28vw;background:linear-gradient(140deg,#e9f1e9,#cdded1);border-left:1px solid #91ac99;z-index:20;color:#17372c;padding:3vh 2.2vw;overflow:hidden;font-family:Arial,Helvetica,sans-serif}.tv-with-queue .tv-display-area{width:72vw!important;right:28vw!important}.tv-queue-heading>span{font-size:clamp(12px,1.15vw,22px);font-weight:800;letter-spacing:3px;display:block;color:#517461}.tv-queue-heading>strong{display:block;font-size:clamp(20px,2vw,38px);line-height:1.13;margin:12px 0 3vh;max-width:100%}.tv-queue-label{font-size:clamp(11px,1vw,20px);letter-spacing:2px;font-weight:700;color:#517461}.tv-queue-number{font-size:clamp(65px,7.1vw,140px);font-weight:800;line-height:1.1;letter-spacing:-6px;margin-top:8px}.tv-queue-destination{font-size:clamp(20px,2vw,40px);font-weight:700;margin:6px 0 2.8vh;border-bottom:2px solid #9bb7a4;padding-bottom:2.8vh;overflow-wrap:anywhere}.tv-queue-recent>span{font-size:clamp(11px,1vw,20px);font-weight:700;letter-spacing:2px;color:#517461}.tv-queue-recent>div{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid #abc2b2;padding:1.3vh 0}.tv-queue-recent strong{font-size:clamp(25px,2.3vw,45px);font-weight:800}.tv-queue-recent small{font-size:clamp(15px,1.25vw,25px);text-align:right;max-width:60%;overflow-wrap:anywhere}.tv-queue-panel>p{font-size:clamp(14px,1.1vw,22px);line-height:1.4;color:#517461;margin-top:2.5vh}.tv-no-ticker .tv-queue-panel,.tv-clean .tv-queue-panel{bottom:0}.tv-ticker-extra:not(.tv-no-ticker):not(.tv-clean) .tv-queue-panel{bottom:106px}.tv-clean .tv-queue-panel{top:0}.tv-ticket-call{position:fixed;inset:0;background:radial-gradient(ellipse at top left,#325e4c,#0b271d 80%);color:#edf7ec;z-index:1100;display:flex;align-items:center;justify-content:center;text-align:center}.tv-ticket-call[hidden],.tv-queue-panel[hidden]{display:none!important}.tv-ticket-call>div{width:86vw;padding:5vh 0;border:1px solid #7ca48a;border-radius:28px;box-shadow:0 40px 120px #0004;background:#183c2c99}.tv-ticket-call span{font-size:clamp(20px,2vw,40px);font-weight:700;letter-spacing:6px;color:#b7d6bb}.tv-ticket-call p{font-size:clamp(20px,2vw,40px);letter-spacing:7px;margin:3vh 0 0;color:#b7d6bb}.tv-ticket-call strong{display:block;font-size:clamp(100px,16vw,320px);font-weight:800;line-height:1.05;letter-spacing:-9px}.tv-ticket-call h2{font-size:clamp(30px,4vw,80px);margin:1vh 0 2.5vh;font-weight:700}.tv-ticket-call small{font-size:clamp(18px,2vw,40px);color:#b7d6bb}.tv-slide.campaign-host{aspect-ratio:auto!important}
.tv-flash-alert{transition:none!important}.tv-flash-kicker{font-size:2vw}.tv-flash-card .tv-flash-title{font-size:5vw}.tv-flash-card .tv-flash-message{font-size:4vw}.tv-queue-heading>span{font-size:1.15vw}.tv-queue-heading>strong{font-size:2vw}.tv-queue-label{font-size:1vw}.tv-queue-number{font-size:7.1vw}.tv-queue-destination{font-size:2vw}.tv-queue-recent>span{font-size:1vw}.tv-queue-recent strong{font-size:2.3vw}.tv-queue-recent small{font-size:1.25vw}.tv-queue-panel>p{font-size:1.1vw}.tv-ticket-call span,.tv-ticket-call p,.tv-ticket-call small{font-size:2vw}.tv-ticket-call strong{font-size:16vw}.tv-ticket-call h2{font-size:4vw}
.tv-ticket-call{left:0;top:0;width:100vw;height:100vh}.tv-flash-card .tv-flash-title{font-size:5vw!important}.tv-flash-card .tv-flash-message{font-size:4vw!important}.tv-flash-alert.notice-dense .tv-flash-message{font-size:3.2vw!important}
.tv-flash-alert.notice-long-title .tv-flash-title{font-size:4vw!important}
.tv-disconnect-feedback{position:fixed;z-index:150;bottom:30px;left:50%;transform:translateX(-50%);max-width:80vw;padding:20px 28px;border-radius:14px;background:#342820;border:1px solid #99755b;color:#ffe8d0;font:500 20px Arial,sans-serif;text-align:center}
.tv-pair-card{display:flex;flex-direction:column;align-items:center;gap:14px;max-width:660px;text-align:center}.tv-pair-qr{display:grid;place-items:center;background:white;border-radius:16px;padding:12px;min-width:220px;min-height:220px;color:#142033}.tv-pair-qr svg{width:clamp(160px,24vh,280px);height:auto}.tv-pair-label{color:#93abc9;letter-spacing:.14em;text-transform:uppercase;font-size:14px}.tv-pair-code{font-size:clamp(32px,6vh,68px);letter-spacing:.18em;color:#c9ddff;padding:10px 24px;border:1px solid #486389;border-radius:12px;background:#18263c}.tv-pair-card p{color:#bdcce1;font-size:clamp(13px,2vh,20px);line-height:1.6;margin:0}.tv-pair-card small{color:#8ca2c0;font-size:13px}.tv-pair-refresh{color:#c5d8f5;background:#172539;border:1px solid #3c5274;border-radius:10px;padding:10px 18px;font:inherit;font-size:14px;cursor:pointer}.tv-pair-feedback{min-height:1.5em}
.tv-standby-screen{padding:16px}.standby-card{width:100%;max-width:960px;max-height:calc(100vh - 32px);overflow-y:auto;padding:clamp(20px,4vh,44px) clamp(20px,4vw,48px);gap:clamp(12px,3vh,24px);border:1px solid #405574;box-shadow:0 24px 90px #0008}.standby-card>div:first-child{margin-bottom:0!important}.standby-card>div:first-child img{width:48px;height:48px;margin-bottom:12px!important}#standbyTitle{font-size:clamp(24px,3vw,40px)!important;line-height:1.15}#standbyDesc{font-size:clamp(14px,1.5vw,20px)!important;margin-top:8px!important}.tv-pair-feedback:empty{display:none}.tv-pair-code{white-space:nowrap}.tv-pair-qr{min-width:0;min-height:0}.tv-pair-qr svg{width:clamp(160px,26vh,250px)}
@media(min-width:700px){.tv-pair-card{display:grid;grid-template-columns:auto 1fr;gap:12px 32px;max-width:800px;text-align:left;align-items:start}.tv-pair-qr{grid-column:1;grid-row:1 / 7;align-self:center}.tv-pair-card>:not(.tv-pair-qr){grid-column:2}.tv-pair-code,.tv-pair-refresh{justify-self:start}.tv-pair-card p{line-height:1.5}.tv-pair-code{font-size:clamp(32px,6vh,64px)}}
@media(max-width:699px){.standby-card{max-width:540px;gap:16px}.tv-pair-card{gap:10px}.tv-pair-qr svg{width:160px}.tv-pair-code{font-size:36px;padding:8px 18px}.tv-pair-card p{font-size:14px}.tv-pair-card small{font-size:12px}}
