/* Opt-in web radio and live block (PAP-282). Linked only when a journal configured a radio or live embed. */
.radio-bar[hidden], .live-embed[hidden], .radio-card-play[hidden], .radio-onair [hidden] { display: none; }
/* Soft navigation moves focus to the new <main> for keyboard and screen-reader users; it is not a control. */
main[tabindex='-1']:focus { outline: none; }

/* AO VIVO badge with a pulsing dot; the pulse stops for readers who asked for less motion. */
.radio-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .5rem; border-radius: 3px; background: #c4001d; color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; white-space: nowrap; }
.radio-pulse { position: relative; width: .48rem; height: .48rem; border-radius: 50%; background: #fff; }
.radio-pulse::after { position: absolute; inset: -.45rem; border: 2px solid #fff; border-radius: 50%; content: ''; animation: radio-pulse 1.6s ease-out infinite; }
@keyframes radio-pulse { 0% { transform: scale(.35); opacity: .7; } 70%, 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .radio-pulse::after { animation: none; opacity: 0; } }

/* Header control */
.radio-listen { display: inline-flex; align-items: center; gap: .55rem; padding: .15rem .7rem .15rem .2rem; border: 1px solid #ffffff66; border-radius: 999px; color: #fff; font-weight: 800; font-size: .74rem; text-decoration: none; }
.radio-listen:hover, .radio-listen:focus-visible { background: #ffffff1f; }
.radio-listen[aria-pressed='true'] { background: #fff; color: var(--journal-primary); }

/* The fixed bar reserves exactly its height below the document; safe-area inset belongs to the bar. The consent
   banner, also fixed at the bottom, sits above the bar so its choices stay reachable. */
body.radio-open { --radio-bar-space: calc(56px + env(safe-area-inset-bottom, 0px)); padding-bottom: var(--radio-bar-space); }
body.radio-open .cookie-banner { bottom: calc(var(--radio-bar-space) + .75rem); }
.radio-bar { position: fixed; inset: auto 0 0; z-index: 60; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--journal-primary); color: #fff; box-shadow: 0 -6px 24px #110c4040; }
.radio-bar-inner { display: flex; align-items: center; gap: 14px; min-height: 56px; max-width: 1240px; margin-inline: auto; padding-inline: clamp(1rem, 2vw, 28px); }
.radio-toggle { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--accent); color: var(--journal-primary); cursor: pointer; }
.radio-toggle:focus-visible, .radio-close:focus-visible, .radio-more:focus-visible, .radio-card-play:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.radio-toggle .icon-pause { display: none; }
.radio-bar[data-state='playing'] .icon-play, .radio-bar[data-state='loading'] .icon-play { display: none; }
.radio-bar[data-state='playing'] .icon-pause, .radio-bar[data-state='loading'] .icon-pause { display: block; }
.radio-eq { flex: none; display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.radio-eq i { width: 4px; background: var(--accent); border-radius: 1px; transform-origin: bottom; transform: skewY(-18deg); animation: radio-eq 1s ease-in-out infinite; animation-play-state: paused; }
.radio-eq i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.radio-eq i:nth-child(2) { height: 70%; animation-delay: -.5s; }
.radio-eq i:nth-child(3) { height: 100%; animation-delay: -.1s; }
.radio-eq i:nth-child(4) { height: 60%; animation-delay: -.7s; }
.radio-bar[data-state='playing'] .radio-eq i { animation-play-state: running; }
@keyframes radio-eq { 0%, 100% { transform: skewY(-18deg) scaleY(.45); } 50% { transform: skewY(-18deg) scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .radio-eq i { animation: none; } }
.radio-meta { min-width: 0; flex: 1; line-height: 1.2; }
.radio-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.radio-bar .radio-badge { gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; background: #e3262e; font: 700 11px 'Barlow', system-ui, sans-serif; letter-spacing: .06em; }
.radio-bar .radio-pulse { width: 7px; height: 7px; }
.radio-name { font-family: var(--serif); font-size: 15px; font-weight: 800; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-title { display: block; margin-top: 3px; font-size: 13px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-title:empty { display: none; }
.radio-more { flex: none; color: var(--accent); font-family: var(--serif); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.radio-more:hover { text-decoration: underline; }
.radio-status { margin: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-status:empty { display: none; }
.radio-bar[data-state='playing'] .radio-status, .radio-bar[data-state='loading'] .radio-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.radio-close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.radio-close:hover { background: #ffffff26; }
@media (max-width: 40rem) {
  .radio-bar-inner { gap: 8px; }
  .radio-more { display: none; }
  .journal-utility-in { flex-wrap: wrap; row-gap: .35rem; }
}

/* /ao-vivo/ and the live block */
.live-page { max-width: var(--wrap, 84rem); margin: 0 auto; padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 3rem; display: grid; gap: 1.5rem; }
.live-page h1 { font-family: var(--serif); color: var(--journal-primary); text-transform: uppercase; margin: 0; }
.live-embed, .radio-card, .radio-grid { border: 1px solid var(--line, #e6e7ed); border-radius: 8px; padding: 1.25rem; background: #fff; }
.live-embed { margin-inline: auto; width: min(100%, var(--wrap, 84rem)); }
.live-embed-head, .radio-card-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.live-embed-head h2, .radio-card-head h2, .radio-grid h2 { margin: 0; font-family: var(--serif); color: var(--journal-primary); font-size: 1.35rem; }
.live-embed-stage { margin-top: 1rem; }
.live-embed-stage iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; background: #000; }
.live-embed-stage .embed-play, .radio-card-play { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.4rem; border: 0; border-radius: 999px; background: var(--journal-primary); color: #fff; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer; }
.live-embed-stage .embed-play::before { content: ''; border-left: .8rem solid currentColor; border-block: .5rem solid transparent; }
.live-embed-stage .embed-play:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.live-embed-note { margin: .6rem 0 0; font-size: .8rem; color: var(--ink-2, #555); }
.radio-card { display: grid; gap: 1rem; justify-items: start; }
.radio-card-play[aria-pressed='true'] { background: var(--accent); color: var(--journal-primary); }
.radio-onair { display: grid; gap: .25rem; }
.radio-onair p { margin: 0; }
.radio-onair-now::before { content: 'No ar agora: '; font-weight: 800; color: #c4001d; }
.radio-onair-next::before { content: 'A seguir: '; font-weight: 800; }
.radio-grid dl { display: grid; grid-template-columns: max-content 1fr; gap: .75rem 1.5rem; margin: 1rem 0 0; }
.radio-grid dt { font-weight: 800; color: var(--journal-primary); }
.radio-grid dd { margin: 0; }
.radio-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.radio-grid-hours { display: inline-block; min-width: 7.5rem; font-variant-numeric: tabular-nums; color: var(--ink-2, #555); }
.radio-grid-note { margin: .25rem 0 0; font-size: .8rem; color: var(--ink-2, #555); }
@media (max-width: 40rem) { .radio-grid dl { grid-template-columns: 1fr; gap: .25rem; } .radio-grid dd { margin-bottom: .6rem; } }
