/* Uitzending Gemist – widget (eigen site en WordPress-plugin). Alles onder .ug / .ug-player, zodat het thema er niet mee botst. */
.ug, .ug-player, .ug-toast {
    --ug-accent: #008ecf;
    --ug-accent-dark: color-mix(in srgb, var(--ug-accent) 82%, #000);
    --ug-deep: color-mix(in srgb, var(--ug-accent) 30%, #06202f);
    --ug-tint: color-mix(in srgb, var(--ug-accent) 8%, #fff);
    --ug-ink: #16313f; --ug-muted: #5b7383; --ug-line: #dde6ec; --ug-live: #e5484d;
    box-sizing: border-box;
}
.ug *, .ug *::before, .ug *::after, .ug-player *, .ug-player *::before, .ug-player *::after { box-sizing: border-box; }
.ug { color: var(--ug-ink); line-height: 1.45; font-size: 1rem; }
.ug-player, .ug-toast { font-size: 1rem; }
:where(.ug, .ug-player) button { font-family: inherit; font-size: 1rem; line-height: 1.3; cursor: pointer; margin: 0; text-transform: none; letter-spacing: normal; }
:where(.ug, .ug-player) img { max-width: none; }
.ug :focus-visible, .ug-player :focus-visible { outline: 3px solid color-mix(in srgb, var(--ug-accent) 60%, transparent); outline-offset: 2px; }
:where(.ug) :is(h1, h2, h3) { margin: 0; font-family: inherit; text-transform: none; letter-spacing: -.01em; }
:where(.ug) ul { list-style: none; margin: 0; padding: 0; }
.ug-loading { padding: 1.5rem; color: var(--ug-muted); }

/* Hero: live + nieuwste uitzending */
.ug-hero { background: linear-gradient(160deg, var(--ug-accent) 0%, var(--ug-accent-dark) 100%); color: #fff; }
.ug-live-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.ug-live-strip + .ug-featured { margin-top: 1.5rem; }
.ug-btn-live { display: inline-flex; align-items: center; gap: .55rem; background: #fff; color: var(--ug-deep); border: 0; border-radius: 2rem; padding: .5rem 1.1rem; font-weight: 800; line-height: 1.2; }
.ug-btn-live:hover { background: var(--ug-tint); }
.ug-live-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--ug-live); }
.ug-btn-live.is-playing .ug-live-dot { animation: ug-pulse 1.6s ease-out infinite; }
@keyframes ug-pulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.55); } 100% { box-shadow: 0 0 0 10px rgba(229,72,77,0); } }
.ug .ug-now { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ug .ug-now:hover { color: #fff; text-decoration: underline; }
.ug-now-label { font-size: .78rem; opacity: .8; font-weight: 700; }
.ug-now-track { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70vw; }
.ug-featured { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 1.5rem; align-items: center; }
.ug-featured-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 1rem; box-shadow: 0 10px 30px rgba(5,40,60,.3); display: block; }
.ug-featured-label { font-weight: 700; opacity: .85; margin-bottom: .2rem; }
.ug .ug-featured-title { color: #fff; font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.1; }
.ug-featured-meta { margin-top: .4rem; font-size: 1.05rem; opacity: .9; }
.ug-featured-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.ug-btn-play-lg { background: #fff; color: var(--ug-deep); border: 0; border-radius: .7rem; padding: .6rem 1.4rem; font-size: 1.05rem; font-weight: 800; }
.ug-btn-play-lg:hover { background: var(--ug-tint); }
.ug-btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: .7rem; padding: .55rem 1rem; font-weight: 700; }
.ug-btn-ghost:hover { background: rgba(255,255,255,.12); }

/* Lijst */
.ug-panel { background: #fff; border: 1px solid var(--ug-line); border-radius: 1rem; overflow: hidden; }
.ug-chips-wrap { border-bottom: 1px solid var(--ug-line); }
.ug-chips { display: flex; gap: .45rem; padding: .9rem 1.25rem; overflow-x: auto; scrollbar-width: thin; }
.ug-chip { flex: 0 0 auto; border: 1px solid #cfdbe3; background: #fff; color: var(--ug-deep); border-radius: 2rem; padding: .3rem .85rem; font-weight: 700; font-size: .9rem; white-space: nowrap; line-height: 1.3; }
.ug-chip:hover { border-color: var(--ug-accent); background: var(--ug-tint); }
.ug-chip[aria-pressed="true"] { background: var(--ug-accent); border-color: var(--ug-accent); color: #fff; }
.ug .ug-day { font-size: 1rem; font-weight: 800; color: var(--ug-deep); padding: 1.1rem 1.25rem .4rem; line-height: 1.3; }
.ug .ug-eps { padding-bottom: .4rem; }
.ug .ug-ep { display: grid; grid-template-columns: 76px 1fr auto auto; gap: .9rem; align-items: center; padding: .55rem 1.25rem; margin: 0; }
.ug-ep + .ug-ep { border-top: 1px solid #eef3f6; }
.ug-ep.is-current { background: var(--ug-tint); }
.ug-ep.is-shared { box-shadow: inset 4px 0 0 var(--ug-accent); }
.ug-ep-img { width: 76px; height: 50px; object-fit: cover; border-radius: .5rem; display: block; }
.ug-img-empty { background: repeating-linear-gradient(45deg, #e6eef3, #e6eef3 6px, #f2f6f9 6px, #f2f6f9 12px); border-radius: .5rem; }
.ug-featured-img.ug-img-empty { aspect-ratio: 3 / 2; }
.ug-ep-body { min-width: 0; }
.ug .ug-ep-name { all: unset; cursor: pointer; font-weight: 800; font-size: 1.02rem; line-height: 1.3; color: var(--ug-ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ug div.ug-ep-name { cursor: default; }
.ug button.ug-ep-name:hover { color: var(--ug-accent-dark); text-decoration: underline; }
.ug button.ug-ep-name:focus-visible { outline: 3px solid color-mix(in srgb, var(--ug-accent) 60%, transparent); border-radius: 3px; }
.ug-ep-meta { color: var(--ug-muted); font-size: .9rem; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: .2rem .7rem; }
.ug-ep-progress { color: var(--ug-accent-dark); font-weight: 700; }
.ug-ep-progress.is-done { color: #1f9d6b; }
.ug-ep-more { border: 1px solid #cfdbe3; background: #fff; color: var(--ug-deep); font-weight: 700; font-size: .85rem; padding: .3rem .7rem; border-radius: .5rem; line-height: 1.3; }
.ug-ep-more:hover { border-color: var(--ug-accent); background: var(--ug-tint); }
.ug-ep-more::after { content: " ▾"; font-size: .75rem; }
.ug-ep-more[aria-expanded="true"]::after { content: " ▴"; }
.ug-ep-play { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: var(--ug-accent); color: #fff; font-size: .95rem; display: grid; place-items: center; padding: 0 0 0 2px; line-height: 1; }
.ug-ep-play:hover { background: var(--ug-accent-dark); }
.ug-ep.is-current .ug-ep-play { background: var(--ug-deep); }
.ug-ep-panel { grid-column: 1 / -1; background: #f6f9fb; border: 1px solid var(--ug-line); border-radius: .7rem; padding: .5rem .75rem .75rem; margin-top: .2rem; }
.ug .ug-hour { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .4rem 0; margin: 0; }
.ug-hour + .ug-hour { border-top: 1px solid #e6eef3; }
.ug-hour-time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 6.5rem; }
.ug .ug-hbtn { border: 0; background: none; color: var(--ug-accent-dark); font-weight: 700; font-size: .9rem; padding: .2rem .45rem; border-radius: .4rem; text-decoration: none; }
.ug .ug-hbtn:hover { background: var(--ug-tint); color: var(--ug-deep); }
.ug-panel-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.ug .ug-btn-dl-all { background: var(--ug-accent); color: #fff; font-size: .9rem; padding: .35rem .9rem; border-radius: .6rem; font-weight: 700; text-decoration: none; }
.ug .ug-btn-dl-all:hover { background: var(--ug-accent-dark); color: #fff; }
.ug-btn-share, .ug-btn-more { border: 1px solid #cfdbe3; background: #fff; color: var(--ug-deep); font-size: .9rem; padding: .35rem .9rem; border-radius: .6rem; font-weight: 700; }
.ug-btn-share:hover, .ug-btn-more:hover { border-color: var(--ug-accent); background: var(--ug-tint); }
.ug-list-foot { padding: .9rem 1.25rem 1.2rem; border-top: 1px solid var(--ug-line); display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
.ug .ug-list-info { margin: 0; font-size: .85rem; color: var(--ug-muted); }
.ug .ug-empty { padding: 2.5rem 1.25rem; text-align: center; color: var(--ug-muted); margin: 0; }
.ug [hidden], .ug-player[hidden], .ug-toast[hidden] { display: none !important; }

/* Variant: volledige pagina (eigen site) – blauwe band met de lijst er half overheen */
.ug--page .ug-container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.ug--page .ug-hero { padding: 1.25rem 0 4.5rem; }
.ug--page .ug-list-wrap { margin-top: -3rem; margin-bottom: 2.5rem; }
.ug--page .ug-panel { box-shadow: 0 6px 24px rgba(11,58,85,.08); }
.ug--page > .ug-list-wrap:first-child { margin-top: 1.5rem; }

/* Variant: ingebed (WordPress) – hero als afgeronde kaart in de kolom */
.ug--embed { margin: 1rem 0 1.5rem; }
.ug--embed .ug-hero { border-radius: 1rem; padding: 1.25rem 1.4rem; margin-bottom: 1rem; }
.ug--embed .ug-featured { grid-template-columns: minmax(0, 220px) 1fr; }
.ug.ug--embed .ug-featured-title { font-size: clamp(1.4rem, 3vw, 2rem); }

@media (max-width: 575.98px) {
    .ug .ug-featured, .ug--embed .ug-featured { grid-template-columns: 112px 1fr; gap: .9rem; align-items: start; }
    .ug-featured-img { border-radius: .7rem; }
    .ug .ug-featured-title, .ug.ug--embed .ug-featured-title { font-size: 1.45rem; }
    .ug-featured-meta { font-size: .95rem; }
    .ug-btn-play-lg { padding: .45rem 1rem; font-size: 1rem; }
    .ug .ug-ep { grid-template-columns: 60px 1fr auto auto; padding-inline: 1rem; gap: .6rem; }
    .ug-ep-img, .ug-ep-img.ug-img-empty { width: 60px; height: 40px; }
    .ug-ep-more { padding: .3rem .5rem; }
    .ug-chips, .ug .ug-day { padding-inline: 1rem; }
    .ug-hour-time { min-width: 100%; }
    .ug--embed .ug-hero { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .ug-btn-live.is-playing .ug-live-dot { animation: none; } }

/* Vaste speler onderin (één per pagina) */
body.ug-has-player { padding-bottom: 7.5rem; }
.ug-player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990; background: var(--ug-deep); color: #fff; box-shadow: 0 -6px 24px rgba(5,30,45,.25); font-family: inherit; line-height: 1.4; }
.ug-player-inner { max-width: 960px; margin: 0 auto; padding: .6rem 1rem .5rem; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "img info ctrl" "seek seek seek"; gap: .35rem .9rem; align-items: center; }
.ug-player-img { grid-area: img; width: 52px; height: 52px; object-fit: cover; border-radius: .5rem; background: #fff; display: block; }
.ug-player-info { grid-area: info; min-width: 0; }
.ug-player-title { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ug-player-sub { font-size: .85rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ug-player-controls { grid-area: ctrl; display: flex; align-items: center; gap: .35rem; }
.ug-player .ug-pbtn { border: 0; background: transparent; color: #fff; border-radius: .6rem; min-width: 2.4rem; height: 2.4rem; font-size: 1.1rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 1px; padding: 0 .3rem; line-height: 1; }
.ug-pbtn small { font-size: .62rem; font-weight: 800; }
.ug-player .ug-pbtn:hover { background: rgba(255,255,255,.12); }
.ug-player .ug-pbtn-main { background: #fff; color: var(--ug-deep); width: 2.8rem; height: 2.8rem; border-radius: 50%; font-size: 1rem; }
.ug-player .ug-pbtn-main:hover { background: var(--ug-tint); }
.ug-player-seek { grid-area: seek; display: flex; align-items: center; gap: .6rem; }
.ug-player-seek input { flex: 1; accent-color: color-mix(in srgb, var(--ug-accent) 60%, #fff); margin: 0; }
.ug-ptime { font-size: .78rem; opacity: .85; font-variant-numeric: tabular-nums; min-width: 2.8rem; }
.ug-player .ug-pbtn-speed { font-size: .8rem; min-width: 2.6rem; height: 1.8rem; border: 1px solid rgba(255,255,255,.4); }
.ug-player.is-live .ug-player-seek, .ug-player.is-live [data-a=back], .ug-player.is-live [data-a=fwd] { display: none; }
.ug-player.is-live .ug-player-title::after { content: "LIVE"; margin-left: .5rem; font-size: .7rem; background: var(--ug-live); padding: .1rem .4rem; border-radius: .3rem; vertical-align: 2px; }
.ug-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 8.5rem; background: var(--ug-deep); color: #fff; padding: .5rem 1rem; border-radius: .6rem; font-weight: 700; z-index: 99991; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: calc(100vw - 2rem); text-align: center; }

/* Smal blok (bijv. uitklapblok op telefoon): afstemmen op de breedte van de widget zelf */
.ug { container-type: inline-size; container-name: ug; }
@container ug (max-width: 460px) {
    .ug .ug-ep { grid-template-columns: 52px 1fr auto auto; gap: .5rem; padding-inline: .75rem; }
    .ug .ug-ep-img, .ug .ug-ep-img.ug-img-empty { width: 52px; height: 36px; }
    .ug .ug-ep-more { font-size: 0; padding: .25rem .55rem; min-height: 2rem; }
    .ug .ug-ep-more::after, .ug .ug-ep-more[aria-expanded="true"]::after { content: "⋯"; font-size: 1.1rem; line-height: 1; }
    .ug .ug-ep-play { width: 2.3rem; height: 2.3rem; }
    .ug .ug-ep-meta { font-size: .85rem; }
    .ug .ug-chips, .ug .ug-day { padding-inline: .75rem; }
    .ug .ug-list-foot { padding-inline: .75rem; }
    .ug .ug-featured { grid-template-columns: 96px 1fr; gap: .8rem; }
    .ug .ug-featured-title { font-size: 1.3rem; }
    .ug--embed .ug-hero { padding: 1rem; }
}
