/*
Theme Name: Catamaran Radio Approved Design
Theme URI: https://example.invalid/catamaran
Author: CATAMARAN RADIO
Description: Screenshot-faithful approved homepage with functional stream controls and a dedicated 16:9 TV page. Screenshot artwork includes illustrative track names and listener numbers.
Version: 5.0
Text Domain: catamaran-radio
*/
/* CATAMARAN RADIO — exact approved artwork, interactive overlays */
:root{color-scheme:dark;--gold:#e8b447}*{box-sizing:border-box}html,body{margin:0;background:#020202;color:#fff;font-family:Arial,sans-serif}a{color:inherit}button{font:inherit}.stage{position:relative;width:min(100%,1536px);margin:auto;aspect-ratio:3/2;background:#000 url("assets/approved-design.jpg") center top/100% 100% no-repeat;overflow:hidden}.hit{position:absolute;border:0;background:transparent;cursor:pointer;display:block;color:transparent;overflow:hidden;white-space:nowrap}.hit:focus-visible{outline:3px solid #f2c65b;outline-offset:-3px}.hit:hover{background:rgba(245,183,55,.09)}.panel{position:fixed;right:18px;bottom:18px;z-index:20;width:min(390px,calc(100vw - 36px));background:#080808;border:1px solid #b18a39;box-shadow:0 12px 50px #000;border-radius:12px;padding:18px;color:#fff;display:none}.panel.open{display:block}.panel h2{margin:0 28px 10px 0;color:#f0c35c;font-size:20px}.panel p{line-height:1.45}.panel button,.gold{background:linear-gradient(#ffe39a,#b98518);border:0;border-radius:30px;padding:10px 17px;color:#111;font-weight:700;cursor:pointer}.close{position:absolute;right:12px;top:10px;background:transparent!important;color:#fff!important;padding:4px!important;font-size:24px}.player-controls{display:flex;align-items:center;gap:12px;margin-top:12px}.player-controls input{width:125px;accent-color:#d5a338}.state{font-size:13px;color:#ccc}.live-data{border-top:1px solid #47391f;margin-top:12px;padding-top:12px}.live-data strong{color:#f1c458}.tv-video{width:100%;aspect-ratio:16/9;background:#000}.tv-page{max-width:1150px;margin:0 auto;padding:24px}.tv-page header{display:flex;justify-content:space-between;align-items:center}.tv-page h1{color:#e5b747}.tv-page a{color:#f1c458}.tv-note{color:#bbb}.lang-label{position:absolute;right:1%;top:1%;font-size:1px;opacity:0}.mobile-note{display:none}@media(max-width:650px){.stage{width:100%;aspect-ratio:3/2}.panel{bottom:8px;right:8px}.mobile-note{display:block;text-align:center;color:#bba36e;padding:12px;font-size:13px}}

/* TV widget: aligned to the existing approved design, no new background artwork. */
.cat-tv-home-overlay{position:absolute;left:79.15%;top:74.65%;width:19.25%;aspect-ratio:16/9;z-index:5;background:#030303;overflow:hidden;border:1px solid #5b4720}
.cat-tv-player{width:100%;aspect-ratio:16/9;position:relative;background:#000;color:#e8bd56;overflow:hidden}
.cat-tv-player video,.cat-tv-player iframe{width:100%;height:100%;display:block;border:0;object-fit:contain;background:#000}
.cat-tv-unconfigured{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-size:clamp(9px,1.2vw,18px);padding:8px;gap:5px}
.cat-tv-unconfigured small{font-size:clamp(7px,.8vw,12px);color:#d6d0c2}
.cat-tv-error{position:absolute;inset:auto 0 0;background:#190e04;color:#fff;padding:7px;font-size:12px}
.tv-page{max-width:1250px;margin:25px auto;padding:12px;color:#e8bd56}.tv-page header{display:flex;justify-content:space-between;align-items:center}.tv-page a{color:#e8bd56}.tv-page>.cat-tv-player{width:100%;aspect-ratio:16/9}
@media(max-width:650px){.cat-tv-home-overlay{left:79%;top:74.7%;width:19.3%}}
main[data-catamaran]{position:relative;max-width:1536px;margin:0 auto}

/* Stable TV frame before video metadata loads. */
.cat-tv-player{aspect-ratio:16/9;position:relative}.cat-tv-video-slot{position:absolute;inset:0;width:100%;height:100%}.cat-tv-video-slot video,.cat-tv-video-slot iframe{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.cat-tv-error:not([hidden]){z-index:5;bottom:auto;top:50%;transform:translateY(-50%);padding:18px;text-align:center;background:rgba(0,0,0,.85)}

/* Fit complete TV header and 16:9 video in the viewport. */
.tv-page:has(.cat-tv-matching-header){width:min(100%,calc((100dvh - var(--wp-admin--admin-bar--height,0px) - 12px)*1.4797688))!important;max-width:1536px!important;margin:0 auto!important;padding:0!important}.tv-page:has(.cat-tv-matching-header)>.cat-tv-player{width:100%;margin:0}.tv-page .cat-tv-brandmark{width:11%}

/* TV navigation state and full player fullscreen. */
.cat-tv-matching-header .cat-header-hit[aria-label="HOME"]:after{content:"";position:absolute;bottom:0;left:-8%;width:116%;height:18%;background:#030303}
.cat-tv-matching-header .cat-header-hit[aria-current="page"]:after{content:"";position:absolute;bottom:0;left:0;width:100%;height:5px;background:linear-gradient(#ffe397,#ca8e13);clip-path:polygon(10% 0,90% 0,100% 100%,0 100%)}
.cat-tv-player:fullscreen,.cat-tv-player.cat-tv-maximized{width:100vw!important;height:100dvh!important;max-width:none!important;aspect-ratio:auto!important;background:#000}.cat-tv-player.cat-tv-maximized{position:fixed!important;inset:0;z-index:999999}.cat-tv-player:fullscreen .cat-tv-brandmark,.cat-tv-player.cat-tv-maximized .cat-tv-brandmark{width:11%}
.cat-tv-controls{position:absolute;left:0;right:0;bottom:0;z-index:6;display:flex;align-items:center;gap:12px;padding:10px 14px;background:linear-gradient(transparent,rgba(0,0,0,.9));color:#fff;opacity:0;transition:opacity .2s}.cat-tv-player.cat-tv-active .cat-tv-controls,.cat-tv-player:focus-within .cat-tv-controls{opacity:1}.cat-tv-controls button{background:rgba(0,0,0,.45);border:1px solid #8e7136;color:#f8d47b;border-radius:5px;min-width:38px;min-height:34px;cursor:pointer;font-size:18px}.cat-tv-controls input{accent-color:#e8bd56;width:100px;max-width:25%}.cat-tv-controls .cat-tv-fullscreen{margin-left:auto}.cat-tv-home-overlay .cat-tv-controls{gap:4px;padding:4px}.cat-tv-home-overlay .cat-tv-controls button{min-width:24px;min-height:24px;font-size:13px}.cat-tv-home-overlay .cat-tv-controls input{width:45px}

/* Hide controls after inactivity even when a clicked button retains focus. */
.cat-tv-player:not(.cat-tv-active) .cat-tv-controls{opacity:0!important;pointer-events:none}.cat-tv-player.cat-tv-active .cat-tv-controls{opacity:1;pointer-events:auto}
