/* Player de rádio fixo + página /radio (módulo Rádio). Cores vêm do tema (--primary) ou da cor da rádio (--rd-cor). */
#pg-radio { --rd-a: var(--rd-cor, var(--primary, #2d2b52)); }
.pg-radio, .pg-rd-sheet { font-family: inherit; }
.pg-radio[hidden], .pg-rd-sheet[hidden] { display: none !important; }

.pg-radio {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 99980; height: 76px;
    background: linear-gradient(90deg, var(--rd-a), color-mix(in srgb, var(--rd-a) 70%, #0b1020));
    color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 max(24px, env(safe-area-inset-right));
    box-shadow: 0 -8px 30px rgba(15, 23, 42, .25); padding-bottom: env(safe-area-inset-bottom, 0);
}
.pg-rd-play {
    width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--rd-a); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.pg-rd-play svg { width: 22px; height: 22px; }
.pg-rd-play:focus-visible, .pg-rd-btn:focus-visible, .pg-rd-chip:focus-visible, .pg-rd-item:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.pg-rd-cap { width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden; cursor: pointer; }
.pg-rd-cap img { width: 100%; height: 100%; object-fit: cover; }
.pg-rd-cap svg { width: 24px; height: 24px; }
.pg-rd-info { min-width: 0; cursor: pointer; }
.pg-rd-nome { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-rd-sub { display: block; font-size: 12.5px; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-rd-live { background: #e11d48; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 2px 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.pg-rd-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.pg-rd-live[hidden] { display: none; }
.pg-rd-eq { display: flex; gap: 3px; align-items: flex-end; height: 20px; flex: 0 0 auto; }
.pg-rd-eq i { display: block; width: 3px; border-radius: 2px; background: #7be0a8; height: 6px; }
.pg-rd-tocando .pg-rd-eq i { animation: pg-rd-eq 1s ease-in-out infinite; }
.pg-rd-tocando .pg-rd-eq i:nth-child(2) { animation-delay: .15s; } .pg-rd-tocando .pg-rd-eq i:nth-child(3) { animation-delay: .3s; }
.pg-rd-tocando .pg-rd-eq i:nth-child(4) { animation-delay: .45s; } .pg-rd-tocando .pg-rd-eq i:nth-child(5) { animation-delay: .6s; }
@keyframes pg-rd-eq { 0%, 100% { height: 5px; } 50% { height: 20px; } }
.pg-rd-conectando .pg-rd-play { animation: pg-rd-pulso 1.1s ease-in-out infinite; }
@keyframes pg-rd-pulso { 50% { transform: scale(.92); } }
.pg-rd-esp { flex: 1; }
.pg-rd-vol { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pg-rd-vol svg { width: 20px; height: 20px; }
.pg-rd-vol input, .pg-rd-linha input[type="range"] { width: 92px; accent-color: #fff; }
.pg-rd-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.pg-rd-btn svg { width: 19px; height: 19px; }
.pg-rd-btn.pg-rd-on { background: #fff; color: var(--rd-a); }
body.pg-radio-visivel { padding-bottom: 84px; }
body.pg-radio-visivel .wa-widget-container { bottom: 96px !important; }
body.pg-radio-visivel .cookie-banner { bottom: 92px; }

/* Celular: mini player acima do menu de baixo */
@media (max-width: 768px) {
    .pg-radio { left: 10px; right: 10px; bottom: max(92px, calc(env(safe-area-inset-bottom, 0px) + 83px)); height: 62px; border-radius: 18px; padding: 0 12px; gap: 10px; box-shadow: 0 10px 26px rgba(15, 23, 42, .35); }
    .pg-rd-play { width: 40px; height: 40px; } .pg-rd-play svg { width: 19px; height: 19px; }
    .pg-rd-cap, .pg-rd-vol, .pg-rd-live, .pg-radio [data-act="share"], .pg-radio [data-act="timer"] { display: none; }
    .pg-rd-eq { margin-left: auto; }
    body.pg-radio-visivel { padding-bottom: 160px; }
    body.pg-radio-visivel .wa-widget-container { bottom: 170px !important; }
    body.pg-radio-visivel .cookie-banner { bottom: 160px; }
}

/* Gaveta */
.pg-rd-sheet { position: fixed; inset: 0; z-index: 99985; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; justify-content: flex-end; }
.pg-rd-sheet-box {
    position: relative; background: var(--ui-surface, #fff); color: var(--ui-text, #1e293b); width: 400px; max-width: 100%; max-height: 82vh; overflow: auto;
    border-radius: 22px 22px 0 0; padding: 18px 18px 22px; margin: 0 24px 84px; border-radius: 22px; box-shadow: 0 20px 50px rgba(15, 23, 42, .35);
}
@media (max-width: 768px) { .pg-rd-sheet-box { width: 100%; margin: 0; border-radius: 24px 24px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); max-height: 88vh; } }
.pg-rd-fechar { position: absolute; right: 12px; top: 10px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ui-text-2, #64748b); }
.pg-rd-hero { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.pg-rd-arte { width: 72px; height: 72px; border-radius: 18px; background: var(--primary, #2d2b52); color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.pg-rd-arte img { width: 100%; height: 100%; object-fit: cover; } .pg-rd-arte svg { width: 34px; height: 34px; }
.pg-rd-hero-txt { min-width: 0; flex: 1; } .pg-rd-hero-txt b { display: block; font-size: 18px; } .pg-rd-hero-txt small { color: var(--ui-text-2, #64748b); font-size: 13px; }
.pg-rd-play-g { background: var(--primary, #2d2b52); color: #fff; width: 52px; height: 52px; }
.pg-rd-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; color: var(--ui-text-2, #64748b); }
.pg-rd-linha label { display: flex; align-items: center; gap: 10px; width: 100%; }
.pg-rd-linha input[type="range"] { flex: 1; width: auto; accent-color: var(--primary, #2d2b52); }
.pg-rd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pg-rd-chip { min-height: 38px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--ui-border, #e2e8f0); background: transparent; color: var(--ui-text, #1e293b); cursor: pointer; font-size: 13px; }
.pg-rd-chip.on { background: var(--primary, #2d2b52); border-color: var(--primary, #2d2b52); color: #fff; }
.pg-rd-nota { font-size: 12.5px; color: var(--ui-text-2, #64748b); margin: 6px 0 0; }
.pg-rd-soc { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pg-rd-soc a, .pg-rd-soc button { min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--ui-border, #e2e8f0); background: transparent; color: var(--ui-text, #1e293b); font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.pg-rd-lista { margin-top: 18px; display: grid; gap: 8px; } .pg-rd-lista > b { font-size: 13px; color: var(--ui-text-2, #64748b); }
.pg-rd-item { display: flex; align-items: center; gap: 12px; text-align: left; border: 1.5px solid var(--ui-border, #e2e8f0); background: transparent; color: inherit; border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.pg-rd-item b { display: block; font-size: 15px; } .pg-rd-item small { color: var(--ui-text-2, #64748b); font-size: 12.5px; }
.pg-rd-mini { width: 42px; height: 42px; border-radius: 12px; background: var(--primary, #2d2b52); color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.pg-rd-mini img { width: 100%; height: 100%; object-fit: cover; } .pg-rd-mini svg { width: 20px; height: 20px; }
.pg-rd-todas { display: block; text-align: center; margin-top: 16px; font-weight: 700; color: var(--primary, #2d2b52); text-decoration: none; }
body.pg-radio-sheet-aberta { overflow: hidden; }
body.pg-navegando { cursor: progress; }
body.pg-navegando #pg-conteudo { opacity: .6; transition: opacity .15s; }

/* Página /radio */
.pg-rd-pagina { padding: 28px 0 40px; }
.pg-rd-pagina h1 { font-size: 1.75rem; font-weight: 800; margin: 0 0 6px; }
.pg-rd-pagina .pg-rd-intro { color: var(--ui-text-2, #64748b); margin: 0 0 22px; max-width: 640px; }
.pg-rd-grade { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pg-rd-card { background: var(--ui-surface, #fff); border: 1px solid var(--ui-border, #e2e8f0); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.pg-rd-card.pg-rd-card-ativa { border-color: var(--primary, #2d2b52); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #2d2b52) 20%, transparent); }
.pg-rd-card-topo { display: flex; align-items: center; gap: 14px; }
.pg-rd-card .pg-rd-arte { width: 68px; height: 68px; }
.pg-rd-card h2 { font-size: 1.1rem; font-weight: 800; margin: 0; } .pg-rd-card p { margin: 0; color: var(--ui-text-2, #64748b); font-size: .9rem; }
.pg-rd-ouvir { min-height: 46px; border: 0; border-radius: 14px; background: var(--primary, #2d2b52); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pg-rd-ouvir svg { width: 18px; height: 18px; }
.pg-rd-ouvir.tocando { background: #e11d48; }
.pg-rd-card .pg-rd-soc { margin-top: 0; }
.pg-rd-vazio { background: var(--ui-surface-2, #f1f5f9); border-radius: 18px; padding: 28px; text-align: center; color: var(--ui-text-2, #64748b); }
@media (prefers-reduced-motion: reduce) { .pg-rd-tocando .pg-rd-eq i, .pg-rd-conectando .pg-rd-play { animation: none; } .pg-rd-tocando .pg-rd-eq i { height: 14px; } }

/* Computador: controles centralizados e juntos (menos distância entre play, nome, volume e botões) */
@media (min-width: 769px) {
    .pg-radio { justify-content: center; gap: 14px; }
    .pg-rd-esp { display: none; }
    .pg-rd-info { flex: 0 1 300px; }
    .pg-rd-vol { margin-left: 6px; }
    .pg-rd-sheet { justify-content: center; }
    .pg-rd-sheet-box { margin: 0 0 88px; }
}

.pg-rd-agora { display: grid; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: var(--ui-surface-2, #f1f5f9); }
.pg-rd-agora small { display: block; font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--ui-text-2, #64748b); }
.pg-rd-agora b { display: block; font-size: 15px; } .pg-rd-agora span { font-size: 12.5px; color: var(--ui-text-2, #64748b); }
.pg-rd-card .pg-rd-agora-card { margin: 0; font-size: .85rem; font-weight: 600; color: var(--primary, #2d2b52); }
.pg-rd-grade-prog summary { cursor: pointer; font-size: .9rem; font-weight: 700; color: var(--ui-text-2, #64748b); min-height: 32px; display: flex; align-items: center; }
.pg-rd-grade-prog ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: .85rem; }
.pg-rd-grade-prog li span { color: var(--ui-text-2, #64748b); }
