/* Shared behaviour for the five additional layouts; each theme owns its composition. */
body[data-template-active=true]>.rail,body[data-template-active=true]>.app-shell{display:none!important}
:where(#templateRoot)[hidden]{display:none!important}
:where(#templateRoot){min-width:0}
:where(#templateRoot) *{box-sizing:border-box}
:where(#templateRoot) button,:where(#templateRoot) input,:where(#templateRoot) select,:where(#templateRoot) textarea{font:inherit;color:inherit}
:where(#templateRoot) button{cursor:pointer}
:where(#templateRoot) button:disabled{cursor:default}
:where(#templateRoot) h1,:where(#templateRoot) h2,:where(#templateRoot) h3,:where(#templateRoot) p{margin:0}
:where(#templateRoot) .icon{display:block;flex:none;width:23px;height:23px}
:where(#templateRoot) .tpl-avatar{display:inline-flex;align-items:center;justify-content:center;flex:none;width:52px;height:52px;border-radius:12px;background:var(--station-color,#168caa);color:white;font-weight:750;font-size:23px;letter-spacing:-.8px;line-height:1;overflow:hidden}
:where(#templateRoot) .tpl-tag{display:inline-flex;align-items:center;font-size:13px;line-height:1.3;padding:4px 8px;border-radius:8px;background:var(--hover);white-space:nowrap}
:where(#templateRoot) .tpl-icon-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:36px;flex:none;border-radius:8px}
:where(#templateRoot) .tpl-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 15px;border-radius:12px;font-weight:650}
:where(#templateRoot) .tpl-row-actions{display:flex;align-items:center;gap:8px;flex:none}
:where(#templateRoot) .tpl-row-actions .is-favorite{color:var(--coral)}
:where(#templateRoot) .tpl-tools{display:flex;align-items:center;gap:12px;flex:none}
:where(#templateRoot) .tpl-tools select{padding:4px;max-width:60px;background:transparent;border:0;border-radius:7px;font-size:12px}
:where(#templateRoot) .tpl-search{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
:where(#templateRoot) .tpl-search input{width:100%;min-width:0;background:none;border:0;outline:none}
:where(#templateRoot) .tpl-search:focus-within{outline:2px solid var(--accent);outline-offset:3px}
:where(#templateRoot) .tpl-tools button{display:flex;align-items:center;justify-content:center;width:36px;height:38px;border-radius:10px}
:where(#templateRoot) :focus-visible{outline:3px solid var(--accent);outline-offset:3px}
:where(#templateRoot) summary{cursor:pointer;list-style:none}
:where(#templateRoot) summary::-webkit-details-marker{display:none}
body>.theme-menu{position:fixed;right:auto;z-index:180;width:330px;max-width:calc(100vw - 24px);max-height:min(740px,calc(100dvh - 100px));overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
body>.theme-menu .theme-check{flex:none}
body>.theme-menu .theme-swatch{width:36px;height:36px}
body>.theme-menu button{padding:10px}
.swatch-cobalt{background:linear-gradient(135deg,#fff 40%,#184bff 41%)}
.swatch-neon{background:linear-gradient(135deg,#131117 50%,#beff2b 51%)}
.swatch-atlas{background:linear-gradient(135deg,#315d7d,#b9dfec,#f5ab77)}
.swatch-heritage{background:linear-gradient(135deg,#fff6e7 45%,#a4460b 46%,#506727)}
.swatch-regie{background:linear-gradient(135deg,#1b3548 40%,#f7f3ec 41%,#c2d9ec)}
@media(prefers-reduced-motion:reduce){:where(#templateRoot) *,:where(#templateRoot) *:before,:where(#templateRoot) *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

:where(#templateRoot) [data-template-detail]{scroll-margin-top:20px}

body[data-theme=cobalt] .player-station .brand-symbol>.icon{width:45px;height:45px;color:#fff;stroke-width:2.5}body[data-theme=neon] .player-station .brand-symbol>.icon{width:36px;height:36px;color:#baff35;stroke-width:2}
@media(max-width:760px){body[data-theme=cobalt] .player-station .brand-symbol>.icon,body[data-theme=neon] .player-station .brand-symbol>.icon{width:26px;height:26px}}
/* Real controls share a stable native top-layer menu across every layout. */
dialog.theme-menu:not([open]),dialog.choice-menu:not([open]){display:none!important}
dialog.theme-menu,dialog.choice-menu{position:fixed;margin:0;padding:14px;border:1px solid var(--border);color:var(--ink);background:var(--strong);border-radius:22px;box-shadow:0 18px 70px rgba(10,20,45,.25);overflow:auto;overscroll-behavior:contain}
dialog.theme-menu::backdrop,dialog.choice-menu::backdrop{background:rgba(6,15,30,.12);backdrop-filter:blur(2px)}
.choice-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 8px;padding-left:8px}
.choice-heading h2{font:700 19px/1.3 'Inter Variable','Noto Sans Tifinagh',sans-serif;margin:0}
.choice-options{display:flex;flex-direction:column;gap:5px}
.choice-option{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:46px;padding:11px 13px;border-radius:12px;text-align:left;font-size:16px}
.choice-option:hover,.choice-option:focus-visible{background:var(--hover)}
.choice-option[aria-pressed=true]{background:var(--accent);color:var(--accent-text);font-weight:650}
.choice-option>.icon{width:20px;height:20px;opacity:0}
.choice-option[aria-pressed=true]>.icon{opacity:1}
.locale-button{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:0;line-height:1;border-radius:12px}
.locale-button .locale-code{font:600 9px/1.1 'Inter Variable',sans-serif;letter-spacing:.2px}
.locale-button>.icon,.locale-button>[data-icon]>.icon{width:21px!important;height:21px!important}
button[data-action=favorites].favorites-active{color:var(--coral)}
button[data-action=favorites].favorites-active .icon{fill:currentColor}
.favorites-panel .panel-heading h2>button,.cobalt-aside-heading h2>button{display:inline-flex;align-items:center;gap:10px;font:inherit;text-align:left}
body[data-theme=atlas] .atlas-sidebar-section h2>button{display:flex;align-items:center;gap:9px;width:100%;text-align:left;font:inherit}
body[data-theme=atlas] .atlas-sidebar-section h2>button>.icon:last-child{margin-left:auto}
body[data-theme=dune] .filters{pointer-events:none}
body[data-theme=dune] .filters>*{pointer-events:auto}
@media(min-width:761px){
 body[data-theme=dune] .filters .language-chips{min-width:0;overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap}
 body[data-theme=dune] .filters .language-chips>button{flex:none}
 body:not([data-template-active=true]) .header-actions .locale-button{width:42px;height:42px}
}
@media(max-width:760px){
 .locale-button .locale-code{font-size:8px}
 .locale-button>.icon,.locale-button>[data-icon]>.icon{width:18px!important;height:18px!important}
}

body[data-theme] .tpl-tools button[data-action=favorites].favorites-active{color:var(--coral);background:var(--hover)}.header-actions #viewFavorites.favorites-active{color:var(--coral)}.header-actions #viewFavorites.favorites-active .icon{fill:currentColor}

/* The two catalogues keep the same navigation in every presentation. */
.station-picture{position:relative;overflow:hidden;isolation:isolate}
body[data-theme] .station-picture>.station-photo{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:cover;border-radius:inherit}
body[data-theme] .station-picture>.avatar-initials{position:absolute;right:2px;bottom:2px;max-width:calc(100% - 4px);padding:3px 4px;border-radius:4px;background:rgba(5,23,32,.78);color:#fff;font-size:9px;font-weight:750;letter-spacing:0;line-height:1.05;text-shadow:none;white-space:nowrap}
.photo-credits{margin:24px 0;border-top:1px solid var(--line);padding-top:16px;font-size:12px;line-height:1.5}
.photo-credits summary{cursor:pointer;font-weight:700}
.photo-credits p{color:var(--muted)}
.photo-credits ul{max-height:38vh;overflow:auto;padding:0;list-style:none}
.photo-credits li{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 10px;padding:9px 0;border-top:1px solid var(--line)}
.photo-credits li strong{flex-basis:100%}
.photo-credits li span{flex:1 1 160px}
.photo-credits a{text-decoration:underline}
.catalogue-sections{display:flex;align-items:center;gap:12px 20px;flex-wrap:wrap;min-width:0;max-width:100%;margin:12px 0;padding:12px 16px;color:var(--ink);background:var(--glass);border:1px solid var(--border);border-radius:18px;position:relative}
.catalogue-sections>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;max-width:100%}
.catalogue-sections button[data-section-choice]{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:0;min-height:41px;max-width:100%;padding:10px 16px;border:1px solid var(--line);border-radius:12px;background:transparent;color:var(--ink);font-weight:650;line-height:1.2;text-align:center;overflow-wrap:anywhere;transition:background .15s,color .15s}
.catalogue-sections button[data-section-choice]:hover{background:var(--hover)}
.catalogue-sections button[data-section-choice][aria-pressed=true]{background:var(--accent);color:var(--accent-text);border-color:transparent}
.catalogue-sections button[data-section-choice] small{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:24px;min-height:22px;padding:2px 6px;border-radius:8px;background:color-mix(in srgb,currentColor 12%,transparent);font-size:11px;font-weight:650;line-height:1.2;font-variant-numeric:tabular-nums}
.catalogue-section-note{flex:1 1 280px;min-width:0;max-width:900px;margin:0;color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
body[data-template-active=true] .catalogue-sections{margin:12px 24px;border-radius:14px}
body[data-theme=atlas] .catalogue-sections{margin:10px 0 18px;padding:12px}
body[data-theme=neon] .catalogue-sections,body[data-theme=regie] .catalogue-sections{background:transparent;box-shadow:none}
body[data-theme=heritage] .catalogue-sections{background:rgba(255,252,246,.58);border-radius:8px}
@media(max-width:760px){
  .catalogue-sections,body[data-template-active=true] .catalogue-sections{margin:10px 0;padding:10px;gap:9px;border-radius:15px}
  body[data-template-active=true]:not([data-theme=atlas]) .catalogue-sections{margin-left:12px;margin-right:12px}
  .catalogue-sections>div{width:100%;gap:7px}
  .catalogue-sections button[data-section-choice]{flex:1 1 120px;padding:10px 9px;gap:6px;font-size:13px}
  .catalogue-sections button[data-section-choice] small{min-width:21px;min-height:20px;font-size:10px}
  .catalogue-section-note{flex-basis:100%;font-size:11px;line-height:1.45}
  body[data-theme=atlas] .catalogue-sections{margin:9px 0 15px}
}

/* Integrated listening controls replace all broadcaster website actions. */
#templateRoot .primary-button{min-width:0;max-width:100%;white-space:normal;font-size:16px;padding:10px 14px}
button[data-play]:disabled,.primary-button:disabled,.play-main:disabled{opacity:.48;cursor:not-allowed}
body[data-theme=heritage] .heritage-complementary{grid-column:1/-1;font-size:17px;margin:16px 0 4px;padding-top:12px;border-top:1px solid var(--line);color:var(--muted)}
.complementary-label{font-size:.7em;color:var(--muted);font-weight:500}
