/* Barre de lecture de la webradio (module Webradio) : fixée en bas de l'écran, au-dessus du menu du bas s'il est affiché.
   Vue : app/Views/Pwa/_radio.php ; script : pwa-radio.js (pose --radio-bottom, la hauteur du menu du bas, avec la classe above-menu, et --radio-space, la place gardée en bas de page). */
.pwa-radio { --radio-bg: #212529; --radio-text: #fff; --radio-button: #0d6efd; --radio-button-text: #fff; --radio-progress: #0d6efd;
	position: fixed; right: 0; bottom: var(--radio-bottom, 0px); left: 0; z-index: 40; background: var(--radio-bg); color: var(--radio-text); box-shadow: 0 -2px 12px rgba(0, 0, 0, .18); }
.pwa-radio:not(.is-preview) { padding-bottom: env(safe-area-inset-bottom); }
.pwa-radio.above-menu { padding-bottom: 0; }
.pwa-radio.is-preview { position: relative; right: auto; bottom: auto; left: auto; z-index: auto; border-radius: .5rem; overflow: hidden; }
html.has-radio body { padding-bottom: calc(env(safe-area-inset-bottom) + var(--radio-space, 0px)); }

.pwa-radio-progress { height: 3px; background: rgba(127, 127, 127, .3); }
.pwa-radio-progress span { display: block; height: 100%; background: var(--radio-progress); transform: scaleX(0); transform-origin: left center; transition: transform .5s linear; }
.pwa-radio-progress.is-hidden { visibility: hidden; }
/* Podcast : barre cliquable pour lire à partir de n'importe quel endroit (la zone de clic déborde de la barre) */
.pwa-radio-progress.is-seekable { position: relative; height: 5px; cursor: pointer; touch-action: none; }
.pwa-radio-progress.is-seekable::before { content: ''; position: absolute; top: -12px; right: 0; bottom: -6px; left: 0; }
.pwa-radio-progress.is-seekable:focus-visible { outline: 2px solid var(--radio-text); outline-offset: 2px; }
.pwa-radio-progress.is-seeking span { transition: none; }

.pwa-radio-inner { display: flex; align-items: center; gap: .75rem; max-width: var(--container, var(--theme-container-width, 1140px)); margin: 0 auto; padding: .5rem var(--gutter, 1rem); }

.pwa-radio-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: var(--radio-button); color: var(--radio-button-text); font-size: 1rem; cursor: pointer; }
.pwa-radio-toggle:focus-visible, .pwa-radio-buy:focus-visible { outline: 2px solid var(--radio-text); outline-offset: 2px; }
.pwa-radio-toggle i, .pwa-radio-buy i { font-weight: var(--theme-icon-weight, 400); }
.pwa-radio-toggle .fa-play { margin-left: .12rem; }
.pwa-radio-toggle.is-loading { animation: pwa-radio-pulse 1s ease-in-out infinite; }
@keyframes pwa-radio-pulse { 50% { opacity: .45; } }

.pwa-radio-cover { flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: .4rem; object-fit: cover; background: rgba(127, 127, 127, .25); }
.pwa-radio-cover[hidden] { display: none; }

.pwa-radio-info { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; line-height: 1.25; }
.pwa-radio-title { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.pwa-radio-artist { overflow: hidden; font-size: .85rem; opacity: .8; text-overflow: ellipsis; white-space: nowrap; }
.pwa-radio-artist:empty { display: none; }

.pwa-radio-live { flex: 0 0 auto; padding: .15rem .5rem; border: 1px solid currentColor; border-radius: 1rem; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pwa-radio-live[hidden] { display: none; }
.pwa-radio-time { flex: 0 0 auto; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .85; }
.pwa-radio-time[hidden] { display: none; }
.pwa-radio-back { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .4rem; padding: .3rem .7rem; border: 1px solid currentColor; border-radius: 1rem; background: transparent; color: inherit; font-size: .75rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.pwa-radio-back[hidden] { display: none; }
.pwa-radio-back:hover { background: rgba(127, 127, 127, .2); }
.pwa-radio-back:focus-visible { outline: 2px solid var(--radio-text); outline-offset: 2px; }
.pwa-radio-back i { font-weight: var(--theme-icon-weight, 400); }
@media (max-width: 480px) { .pwa-radio-back { width: 2.25rem; height: 2.25rem; padding: 0; justify-content: center; } .pwa-radio-back span { display: none; } }
.pwa-radio-buy { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; color: inherit; text-decoration: none; opacity: .85; }
.pwa-radio-buy[hidden] { display: none; }
.pwa-radio-buy:hover { opacity: 1; background: rgba(127, 127, 127, .2); }

/* Cœur des favoris (module Webradio > Paramètres) : contour, plein une fois le titre enregistré */
.pwa-radio-fav { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1rem; cursor: pointer; opacity: .85; }
.pwa-radio-fav[hidden] { display: none; }
.pwa-radio-fav:hover { opacity: 1; background: rgba(127, 127, 127, .2); }
.pwa-radio-fav:focus-visible { outline: 2px solid var(--radio-text); outline-offset: 2px; }
.pwa-radio-fav i { font-weight: 400; }
.pwa-radio-fav.is-on { opacity: 1; }
.pwa-radio-fav.is-on { color: var(--radio-button); }
.pwa-radio-fav.is-on i { font-weight: 900; }
.pwa-radio-fav.is-busy { pointer-events: none; opacity: .5; }

@media (prefers-reduced-motion: reduce) { .pwa-radio-progress span { transition: none; } .pwa-radio-toggle.is-loading { animation: none; opacity: .6; } }
