/* ===== Web rádio (Admin > Web rádio) — barra ao vivo na identidade do portal ===== */
:root { --radio-h: 72px; }

body .radio-smart-bar.radio-smart-v2 {
  z-index: 1044;
  background: linear-gradient(100deg, var(--portal-header-fundo, #00112a) 0%, color-mix(in srgb, var(--accent, #16456b) 78%, var(--portal-header-fundo, #00112a)) 60%, var(--accent, #16456b) 100%);
  transition: transform .3s ease, opacity .3s ease;
}
body .radio-smart-bar.radio-smart-v2.radio-smart-rodape { border-top: 3px solid var(--brand-yellow, #ffcb09); }
body .radio-smart-bar.radio-smart-v2.radio-smart-top { border-bottom: 3px solid var(--brand-yellow, #ffcb09); }
.radio-smart-v2 .radio-smart-live { background: var(--brand-orange, #01920d); letter-spacing: .06em; font-weight: 700; }
.radio-smart-v2 .radio-smart-play-main { color: var(--portal-header-fundo, #00112a); }
.radio-smart-v2 .radio-smart-play-main:focus-visible,
.radio-smart-v2 .radio-smart-vol:focus-visible { outline: 3px solid var(--brand-yellow, #ffcb09); outline-offset: 2px; }
.radio-smart-v2.is-playing .radio-smart-eqbars i { background: var(--brand-yellow, #ffcb09); }
.radio-smart-v2 .radio-smart-program { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.radio-smart-v2 .radio-smart-cover { object-fit: cover; }
.radio-smart-v2.is-erro .radio-smart-now { color: #ffd6d6; }
.radio-smart-spinner { display: inline-block; animation: radioGiroCarregando .8s linear infinite; }
@keyframes radioGiroCarregando { to { transform: rotate(360deg); } }
.radio-smart-v2 .radio-smart-janela.is-ativo { background: var(--brand-yellow, #ffcb09); color: #00112a; border-color: transparent; }

/* Espaço reservado para a barra não cobrir o conteúdo */
body.tem-radio-rodape:not(.radio-recolhido) { padding-bottom: var(--radio-h); }
body.tem-radio-rodape:not(.radio-recolhido) .cookie-aviso { bottom: calc(var(--radio-h) + 16px); }
@media (min-width: 992px) {
  body.tem-radio-topo:not(.radio-recolhido) { padding-top: var(--radio-h); }
  body.portal-white.portal-defrente.tem-radio-topo:not(.radio-recolhido) .portal-topo.is-pilula .portal-header-bar { top: calc(var(--radio-h) + 12px); }
  body.tem-radio-topo:not(.radio-recolhido) .push-convite { top: calc(var(--radio-h) + 16px); }
}

/* Recolhida: a barra desce (ou sobe) e fica só o botão "Rádio" */
body.radio-recolhido .radio-smart-bar.radio-smart-rodape { transform: translateY(110%); opacity: 0; pointer-events: none; }
body.radio-recolhido .radio-smart-bar.radio-smart-top { transform: translateY(-110%); opacity: 0; pointer-events: none; }
.radio-reabrir {
  position: fixed; z-index: 1044; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .95rem; border: 0; border-radius: 999px;
  background: var(--portal-header-fundo, #00112a); color: #fff;
  font: 600 .85rem/1 'Poppins', 'Inter', Arial, sans-serif;
  box-shadow: 0 8px 24px rgba(0, 17, 42, .28); border-bottom: 3px solid var(--brand-yellow, #ffcb09);
  cursor: pointer;
}
.radio-reabrir[hidden] { display: none; }
.radio-reabrir i { color: var(--brand-yellow, #ffcb09); font-size: 1rem; }
.radio-reabrir.is-playing i { animation: radioReabrirPulso 1.4s ease-in-out infinite; }
@keyframes radioReabrirPulso { 50% { opacity: .35; } }

/* Celular e tablet: sempre embaixo, acima da barra de navegação do app */
@media (max-width: 991px) {
  body .radio-smart-bar.radio-smart-v2.radio-smart-top { top: auto; bottom: 0; border-bottom: 0; border-top: 3px solid var(--brand-yellow, #ffcb09); box-shadow: 0 -6px 24px rgba(15, 23, 42, .18); }
  body.radio-recolhido .radio-smart-bar.radio-smart-top { transform: translateY(110%); }
  body.tem-radio:not(.radio-recolhido) { padding-top: 0; padding-bottom: var(--radio-h); }
  body.tem-radio:not(.radio-recolhido) .cookie-aviso { bottom: calc(var(--radio-h) + 12px); }
  body.tem-radio:has(.app-barra) .radio-smart-bar { bottom: calc(66px + env(safe-area-inset-bottom)); }
  body.portal-white.portal-defrente.tem-radio:not(.radio-recolhido):has(.app-barra) { padding-bottom: calc(66px + var(--radio-h) + env(safe-area-inset-bottom)); }
  body.tem-radio:not(.radio-recolhido):has(.app-barra) .cookie-aviso { bottom: calc(76px + var(--radio-h) + env(safe-area-inset-bottom)); }
  body.tem-radio:has(.app-barra) .radio-reabrir { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 767px) {
  :root { --radio-h: 66px; }
  .radio-smart-v2 .radio-smart-vol-popover.is-open ~ .radio-smart-janela { display: none; }
}
@media (max-width: 400px) {
  .radio-smart-v2 .radio-smart-cover-wrap { display: none; }
}

/* Admin desligou o player no celular */
@media (max-width: 767px) {
  body.radio-sem-celular .radio-smart-bar,
  body.radio-sem-celular .radio-reabrir { display: none !important; }
  body.portal-white.portal-defrente.tem-radio.radio-sem-celular { padding-bottom: 0; }
  body.portal-white.portal-defrente.tem-radio.radio-sem-celular:has(.app-barra) { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  body.tem-radio.radio-sem-celular .cookie-aviso { bottom: 16px; }
  body.tem-radio.radio-sem-celular:has(.app-barra) .cookie-aviso { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  body .radio-smart-bar.radio-smart-v2 { transition: none; }
  .radio-reabrir.is-playing i { animation: none; }
}

/* ===== Janela avulsa do player (radio.php) ===== */
body.radio-janela-page {
  margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--portal-header-fundo, #00112a) 0%, var(--accent, #16456b) 100%);
  color: #fff; font-family: 'Poppins', 'Inter', Arial, sans-serif; padding: 24px; box-sizing: border-box;
}
.radio-janela { width: 100%; max-width: 340px; text-align: center; }
.radio-janela-logo { max-height: 56px; max-width: 220px; object-fit: contain; margin-bottom: 22px; }
.radio-janela-capa { width: 190px; height: 190px; margin: 0 auto 22px; border-radius: 50%; padding: 5px; background: var(--brand-yellow, #ffcb09); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.radio-janela-capa img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; display: block; }
.radio-janela.is-playing .radio-janela-capa img { animation: radioJanelaGiro 14s linear infinite; }
@keyframes radioJanelaGiro { to { transform: rotate(360deg); } }
.radio-janela .radio-smart-live { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem; border-radius: 999px; background: var(--brand-orange, #01920d); font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.radio-janela .radio-smart-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.radio-janela-nome { font-size: 1.15rem; font-weight: 700; margin: .7rem 0 .2rem; }
.radio-janela .radio-smart-program { font-size: .92rem; color: rgba(255, 255, 255, .8); min-height: 1.4em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.radio-janela .radio-smart-now { display: block; font-size: .75rem; color: rgba(255, 255, 255, .6); margin-top: .3rem; min-height: 1.1em; }
.radio-janela .radio-smart-play-main { width: 72px; height: 72px; margin: 20px auto 18px; border: 0; border-radius: 50%; background: #fff; color: var(--portal-header-fundo, #00112a); display: flex; align-items: center; justify-content: center; font-size: 2rem; cursor: pointer; box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.radio-janela .radio-smart-play-main .bi-play-fill { margin-left: 4px; }
.radio-janela .radio-smart-play-main:focus-visible { outline: 3px solid var(--brand-yellow, #ffcb09); outline-offset: 3px; }
.radio-janela-volume { display: flex; align-items: center; gap: .6rem; }
.radio-janela-volume i { color: var(--brand-yellow, #ffcb09); }
.radio-janela-volume input { flex: 1; accent-color: var(--brand-yellow, #ffcb09); }
