/*
 * Lightweight stylesheet for the public radio iframe.
 * Keep this file limited to selectors rendered by templates/embed.html.twig,
 * templates/radio/_widget_embed.html.twig and templates/radio/embed_error.html.twig.
 */

:root {
    color-scheme: light;
    --bg: #f7f7f8;
    --surface: #ffffff;
    --surface-2: #f1f1f1;
    --text: #0d0d0d;
    --muted: #5f6368;
    --line: #dedede;
    --brand: #0d0d0d;
    --danger: #c63d45;
    --shadow-soft: 0 12px 32px rgb(13 13 13 / 4%);
    --focus: color-mix(in srgb, var(--brand) 78%, #ffffff 22%);
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #050608;
    --surface: #0c0e12;
    --surface-2: #12151b;
    --text: #ececec;
    --muted: #b4b4b4;
    --line: #424242;
    --brand: #ffffff;
    --danger: #ff7e88;
    --shadow-soft: 0 12px 32px rgb(0 0 0 / 18%);
    --focus: #ffffff;
}

body[data-site-variant="world"] {
    --brand: #3157d5;
    --focus: #3157d5;
}

html[data-theme="dark"] body[data-site-variant="world"] {
    --brand: #8d9bff;
    --focus: #aab6ff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: clip;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
    height: auto;
}

.country-flag-img {
    display: inline-block;
    width: 24px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 3px;
    background: transparent;
    box-shadow: none;
    object-fit: cover;
    vertical-align: -0.2em;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

p {
    overflow-wrap: anywhere;
}

[hidden],
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:where(a, button, [tabindex]):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

:disabled {
    cursor: not-allowed !important;
    opacity: 0.56;
}

/* A real image covers the truthful text or musical-note fallback below it. */
.media-fallback-stack {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.media-fallback-stack > img[data-image-fallback] {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.media-fallback-stack > img[data-image-fallback][hidden] {
    display: none;
}

/* Public iframe shell. */
body.radio-widget-embed {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: transparent;
}

.radio-widget-embed .page {
    display: block;
    min-height: 0;
    background: transparent;
}

.radio-widget-embed :is(.sidebar, .drawer-backdrop, .topbar, .site-footer, .skip-link, .site-toast) {
    display: none;
}

.radio-widget-embed .main,
.radio-widget-embed .content {
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.radio-widget-embed .content {
    max-width: none;
    padding: 0;
}

/* Truthful compact error rendered when the station API is unavailable. */
.embedded-radio-widget {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 92px;
    min-width: 0;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.embedded-radio-widget--unavailable {
    grid-template-columns: 54px minmax(0, 1fr);
}

.embedded-radio-widget__logo {
    display: grid;
    width: 54px;
    height: 54px;
    overflow: hidden;
    place-items: center;
    border-radius: 15px;
    background: #0b0b0c;
    color: #fff;
    font-size: 13px;
    font-weight: 820;
}

.embedded-radio-widget__logo > span,
.embedded-radio-widget__logo > img {
    grid-area: 1 / 1;
}

.embedded-radio-widget__logo > img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: var(--surface);
    object-fit: contain;
}

.embedded-radio-widget__copy {
    min-width: 0;
}

.embedded-radio-widget__copy strong,
.embedded-radio-widget__copy span,
.embedded-radio-widget__copy a {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.embedded-radio-widget__copy strong {
    font-size: 15px;
    line-height: 1.25;
}

.embedded-radio-widget__copy span:not(.sr-only) {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.embedded-radio-widget__play {
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
}

.embedded-radio-widget__error {
    position: absolute;
    right: 62px;
    bottom: 6px;
    left: 78px;
    margin: 0;
    overflow: hidden;
    color: var(--danger);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Shared connection state inserted by assets/app.js. */
.player-connection-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 17px;
    height: 12px;
}

.player-connection-dots > i {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    animation: player-connection-pulse 0.9s ease-in-out infinite;
}

.player-connection-dots > i:nth-child(2) {
    animation-delay: 0.14s;
}

.player-connection-dots > i:nth-child(3) {
    animation-delay: 0.28s;
}

:where([data-player-toggle]) .player-connection-dots {
    gap: 4px;
    min-width: 28px;
    height: 18px;
}

:where([data-player-toggle]) .player-connection-dots > i {
    width: 5px;
    height: 5px;
}

@keyframes player-connection-pulse {
    0%, 70%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    35% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

/* Multi-format radio widget. */
.wd-logo img,
.wd-art img,
.wd-list-art img,
.wd-powered-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-demo {
    --w-bg: #0C0E12;
    --w-text: #F7F7F5;
    --w-secondary: #AEB2BA;
    --w-accent: #E66B43;
    --w-radius: 20px;
    --w-border: 1px;
    --w-border-color: #343942;
    --w-inner: 0px;
    --w-inner-color: #fff;
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    border: var(--w-border) solid var(--w-border-color);
    border-radius: var(--w-radius);
    background: var(--w-bg);
    color: var(--w-text);
    box-shadow: 0 18px 48px rgb(0 0 0 / 22%);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.widget-demo.no-shadow {
    box-shadow: none;
}

.widget-demo-inner {
    overflow: hidden;
    border: var(--w-inner) solid var(--w-inner-color);
    border-radius: calc(var(--w-radius) - 1px);
}

.widget-demo a {
    color: inherit;
}

.wd-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--w-text) 12%, transparent);
}

.wd-logo {
    display: grid;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    overflow: hidden;
    place-items: center;
    border-radius: 16px;
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 850;
}

.wd-head-copy {
    flex: 1;
    min-width: 0;
}

.wd-head-copy b,
.wd-head-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-head-copy b {
    font-size: 17px;
}

.wd-head-copy span {
    margin-top: 3px;
    color: var(--w-secondary);
    font-size: 12px;
}

.wd-play {
    display: grid;
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--w-accent);
    color: #fff;
    font-size: 15px;
}

.wd-play .radio-play-icon {
    display: block;
    width: 20px;
    height: 20px;
    margin-left: 2px;
}

.wd-now {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
}

.wd-now.no-artwork {
    grid-template-columns: minmax(0, 1fr);
}

.wd-art {
    display: grid;
    width: 58px;
    height: 58px;
    overflow: hidden;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--w-accent), #783728);
    color: #fff;
    font-weight: 800;
}

.wd-now > div,
.wd-list-copy,
.wd-schedule-copy {
    min-width: 0;
}

.wd-now b,
.wd-now span,
.wd-list-copy b,
.wd-list-copy span,
.wd-schedule-copy b,
.wd-schedule-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-now b {
    font-size: 14px;
}

.wd-now span {
    margin-top: 4px;
    color: var(--w-secondary);
    font-size: 12px;
}

.wd-list {
    padding: 0 16px 14px;
}

.wd-list-row {
    display: grid;
    grid-template-columns: 34px 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    border-top: 1px solid color-mix(in srgb, var(--w-text) 10%, transparent);
}

.wd-list-art {
    display: grid;
    width: 38px;
    height: 38px;
    overflow: hidden;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--w-accent) 70%, #fff), color-mix(in srgb, var(--w-accent) 55%, #000));
}

.wd-list-copy b {
    font-size: 12px;
}

.wd-list-copy span {
    margin-top: 2px;
    color: var(--w-secondary);
    font-size: 10px;
}

.wd-playlist .wd-list-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
}

.wd-playlist.no-artwork .wd-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.wd-history-time {
    color: var(--w-secondary);
    font-size: 10px;
    white-space: nowrap;
}

.wd-days {
    display: flex;
    gap: 6px;
    padding: 12px 14px;
    overflow: auto;
    border-bottom: 1px solid color-mix(in srgb, var(--w-text) 10%, transparent);
}

.wd-day {
    display: grid;
    min-width: 46px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: color-mix(in srgb, var(--w-text) 6%, transparent);
    color: var(--w-secondary);
    cursor: pointer;
    font-size: 10px;
}

.wd-day.active {
    background: var(--w-accent);
    color: #fff;
}

.wd-schedule {
    padding: 0 14px 14px;
}

.wd-schedule-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid color-mix(in srgb, var(--w-text) 10%, transparent);
}

.wd-schedule-time {
    color: var(--w-accent);
    font-size: 11px;
    font-weight: 750;
}

.wd-schedule-copy b {
    font-size: 12px;
}

.wd-schedule-copy span {
    margin-top: 3px;
    color: var(--w-secondary);
    font-size: 10px;
}

.widget-embed-state {
    padding: 18px 16px;
    color: var(--w-secondary);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.wd-powered {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-top: 1px solid color-mix(in srgb, var(--w-text) 10%, transparent);
    color: var(--w-secondary);
    font-size: 10px;
}

.wd-powered-label {
    opacity: 0.66;
    white-space: nowrap;
}

.wd-powered-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.wd-powered-brand strong {
    font-size: 10px;
    font-weight: 760;
    line-height: 1;
}

.wd-powered-flag {
    flex: 0 0 auto;
    width: 22px;
    height: 16px;
    overflow: hidden;
    border-radius: 5px;
    background: transparent;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%);
}

.wd-powered.is-normal .wd-powered-brand {
    background: color-mix(in srgb, var(--w-text) 7%, transparent);
    color: var(--w-text);
}

.wd-powered.is-black .wd-powered-brand {
    border: 1px solid rgb(0 0 0 / 14%);
    background: #fff;
    color: #111;
}

.wd-powered.is-white {
    color: #fff;
}

.wd-powered.is-white .wd-powered-brand {
    border: 1px solid rgb(255 255 255 / 24%);
    background: #111;
    color: #fff;
}

@media (max-width: 680px) {
    .wd-playlist .wd-list-row {
        min-height: 66px;
    }

    .wd-playlist .wd-list-copy b {
        font-size: 16px;
    }

    .wd-playlist .wd-list-copy span {
        margin-top: 4px;
        font-size: 13px;
    }

    .wd-day {
        min-width: 58px;
        height: 44px;
        font-size: 15px;
    }
}

@media (max-width: 430px) {
    .embedded-radio-widget {
        grid-template-columns: 48px minmax(0, 1fr) 42px;
        gap: 9px;
        padding: 9px;
        border-radius: 15px;
    }

    .embedded-radio-widget--unavailable {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .embedded-radio-widget__logo {
        width: 48px;
        height: 48px;
        border-radius: 13px;
    }

    .embedded-radio-widget__play {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
    }

    .wd-head {
        padding: 12px;
    }

    .wd-logo {
        width: 46px;
        height: 46px;
    }

    .wd-play {
        width: 40px;
        min-width: 40px;
        height: 40px;
    }

    .wd-now {
        grid-template-columns: 46px minmax(0, 1fr);
        padding: 12px;
    }

    .wd-art {
        width: 46px;
        height: 46px;
    }

    .wd-playlist .wd-list-row {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .wd-playlist.no-artwork .wd-list-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .player-connection-dots > i {
        animation: none;
    }

    .player-connection-dots > i:nth-child(2) {
        opacity: 0.65;
    }

    .player-connection-dots > i:nth-child(3) {
        opacity: 0.4;
    }
}

@media (pointer: coarse) {
    .embedded-radio-widget__play {
        min-height: 44px;
        touch-action: manipulation;
    }
}

@media (forced-colors: active) {
    .embedded-radio-widget,
    .widget-demo {
        border: 1px solid CanvasText;
    }

    .embedded-radio-widget__play,
    .wd-play,
    .wd-day {
        border: 1px solid ButtonText;
    }
}
