:root {
	--fma-watch-bg: #ffffff;
	--fma-watch-card: #ffffff;
	--fma-watch-text: #07111f;
	--fma-watch-muted: #586779;
	--fma-watch-border: #d7e0ea;
	--fma-watch-blue: #0756b8;
	color-scheme: light;
}

html:is(.dark-mode,.dark,.dark-theme,.theme-dark,.wp-dark-mode-active,[data-theme="dark"],[data-mode="dark"]),
body:is(.dark-mode,.dark,.dark-theme,.theme-dark,.wp-dark-mode-active),
body[data-theme="dark"],body[data-mode="dark"] {
	--fma-watch-bg: #07111f;
	--fma-watch-card: #0c1d31;
	--fma-watch-text: #f4f7fb;
	--fma-watch-muted: #b7c6d8;
	--fma-watch-border: #294765;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	html:not(.light-mode):not([data-theme="light"]):not([data-mode="light"]) {
		--fma-watch-bg: #07111f;
		--fma-watch-card: #0c1d31;
		--fma-watch-text: #f4f7fb;
		--fma-watch-muted: #b7c6d8;
		--fma-watch-border: #294765;
		color-scheme: dark;
	}
}

html:is(.light-mode,.light,.light-theme,.theme-light,[data-theme="light"],[data-mode="light"]),body:is(.light-mode,.light,.light-theme,.theme-light,[data-theme="light"],[data-mode="light"]){--fma-watch-bg:#fff;--fma-watch-card:#fff;--fma-watch-text:#07111f;--fma-watch-muted:#586779;--fma-watch-border:#d7e0ea;color-scheme:light}

body.fma-video-watch-body {
	margin: 0 !important;
	min-height: 100vh;
	background: var(--fma-watch-bg) !important;
	color: var(--fma-watch-text) !important;
	font: 16px/1.5 Arial, Helvetica, sans-serif;
}
body.fma-video-watch-body #wpadminbar,
body.fma-video-watch-body .cky-btn-revisit-wrapper,
body.fma-video-watch-body .cky-consent-container { display: none !important; }
.fma-video-watch-body *, .fma-video-watch-body *::before, .fma-video-watch-body *::after { box-sizing: border-box; }
.fma-video-watch-topbar {
	min-height: 72px;
	padding: 9px clamp(16px,4vw,64px);
	background: #05080e;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	border-bottom: 3px solid var(--fma-watch-blue);
}
.fma-video-watch-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff !important; text-decoration: none !important; }
.fma-video-watch-brand img,.fma-video-watch-brand-mark { width: 48px; height: 48px; object-fit: cover; border-radius: 3px; background: #071d4c; }
.fma-video-watch-brand-mark { display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 900; }
.fma-video-watch-brand-copy { display: flex; flex-direction: column; line-height: 1.12; }
.fma-video-watch-brand-copy strong { font-size: clamp(15px,1.5vw,22px); letter-spacing: .01em; }
.fma-video-watch-brand-copy small { margin-top: 4px; color:#e4bd25; font-size: 10px; font-weight:800; letter-spacing: .16em; }
.fma-video-watch-brand:hover { color: #b9d8ff !important; }
.fma-video-watch-page { width: min(100% - 32px,1120px); margin: 0 auto; padding: clamp(18px,4vw,42px) 0 56px; }
.fma-video-watch-article { margin: 0; }
.fma-video-watch-player { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; background: #05080e; }
.fma-video-watch-player.is-vertical { width: min(100%,540px); aspect-ratio: 9/16; margin-inline: auto; }
.fma-video-watch-player iframe,.fma-video-watch-player video,.fma-video-watch-no-player { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.fma-video-watch-article h1 { margin: 0 0 14px; color: var(--fma-watch-text); font-size: clamp(24px,4vw,38px); line-height: 1.15; font-weight: 900; }
.fma-video-watch-description { max-width: 900px; margin: 14px 0 0; color: var(--fma-watch-muted); font-size: clamp(15px,2vw,18px); }
.fma-video-reactions { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; color: var(--fma-watch-text); }
.fma-video-reaction-results { display: flex; flex-wrap: wrap; gap: 6px; }
.fma-video-reaction-result,.fma-video-reaction-toggle,.fma-video-reaction-option { border: 1px solid var(--fma-watch-border); border-radius: 999px; background: var(--fma-watch-card); color: var(--fma-watch-text); cursor: pointer; }
.fma-video-reaction-result { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; font-size: 16px; }
.fma-video-reaction-result small { font-size: 12px; color: var(--fma-watch-muted); }
.fma-video-reaction-result.is-selected,.fma-video-reaction-option.is-selected { border-color: var(--fma-watch-blue); box-shadow: 0 0 0 1px var(--fma-watch-blue); }
.fma-video-reaction-toggle { padding: 6px 11px; font-size: 14px; }
.fma-video-reaction-picker { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; display: grid; grid-template-columns: repeat(7, 38px); gap: 4px; max-width: min(320px,90vw); padding: 8px; border: 1px solid var(--fma-watch-border); border-radius: 12px; background: var(--fma-watch-card); box-shadow: 0 8px 28px #0003; }
.fma-video-reaction-picker[hidden] { display: none; }
.fma-video-reaction-option { width: 38px; height: 38px; font-size: 20px; }
.fma-video-reaction-login { color: var(--fma-watch-blue); font-size: 13px; }
.fma-video-watch-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; margin:14px 0; }
.fma-video-watch-actions .fma-video-reactions { margin:0; }
.fma-video-watch-actions .fma-video-action-buttons { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.fma-video-watch-actions .fma-video-like,.fma-video-watch-actions .fma-video-share,.fma-video-watch-actions .fma-video-reaction-toggle,.fma-video-watch-actions .fma-save-video { display:inline-flex; align-items:center; gap:5px; padding:7px 11px; border:1px solid var(--fma-watch-border); border-radius:999px; background:var(--fma-watch-card); color:var(--fma-watch-text); font-size:14px; text-decoration:none; cursor:pointer; }
.fma-video-watch-actions .fma-video-like.is-liked { border-color:var(--fma-watch-blue); color:var(--fma-watch-blue); }
.fma-video-watch-actions .fma-video-like:disabled { opacity:.55; cursor:default; }
@media(max-width:680px) {
	.fma-video-watch-topbar { min-height: 62px; padding: 7px 12px; gap: 8px; }
	.fma-video-watch-brand { gap: 8px; }
	.fma-video-watch-brand img,.fma-video-watch-brand-mark { width: 40px; height: 40px; }
	.fma-video-watch-brand-copy strong { font-size: 14px; }
	.fma-video-watch-brand-copy small { font-size: 7px; letter-spacing: .1em; }
	.fma-video-watch-list-link { font-size: 13px; }
	.fma-video-watch-page { width: calc(100% - 22px); padding-top: 16px; }
	.fma-video-watch-player { border-radius: 8px; }
	.fma-video-watch-article h1 { margin-bottom: 12px; }
}

/* Individual watch pages share the floating player's actions and comment panel. */
.fma-video-watch-page { width:min(calc(100% - 32px),1500px); }
.fma-video-watch-layout { position:relative; display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:40vh; }
.fma-video-watch-media { display:flex; flex:0 1 auto; align-items:center; justify-content:center; min-width:0; }
.fma-video-watch-player.is-horizontal { width:min(68vw,960px,calc((100vh - 190px)*1.7778)); flex:none; }
.fma-video-watch-player.is-vertical { width:min(540px,42vh,calc((100vh - 190px)*.5625)); flex:none; margin:0; }
.fma-video-watch-layout .fma-lightbox-action-rail { display:flex; flex:0 0 52px; align-self:stretch; flex-direction:column; align-items:center; justify-content:flex-end; gap:19px; padding:8px 0 30px; color:var(--fma-watch-text); }
.fma-video-watch-layout .fma-lightbox-action-rail button { display:flex; min-width:44px; min-height:46px; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:0; border:0; background:transparent; color:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.fma-video-watch-layout .fma-lightbox-action-rail button:disabled { opacity:.65; cursor:progress; }
.fma-video-watch-layout .fma-lightbox-action-rail button:hover { background:rgba(100,120,140,.12); border-radius:10px; }
.fma-video-watch-layout .fma-lightbox-action-rail svg { display:block; width:30px; height:30px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.fma-video-watch-layout .fma-lightbox-action-rail button.is-liked svg { fill:#ff2d55; stroke:#ff2d55; }
.fma-video-watch-layout .fma-lightbox-action-rail button.is-saved svg { fill:var(--fma-watch-text); }
.fma-video-watch-layout .fma-lightbox-action-rail small { min-height:12px; color:var(--fma-watch-text); font-size:12px; font-weight:800; line-height:1; text-shadow:none; }
.fma-video-watch-layout .fma-lightbox-view-count { display:flex; min-width:44px; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--fma-watch-text); }
.fma-video-watch-layout .fma-lightbox-view-count svg { width:27px; height:27px; }
.fma-video-watch-layout .fma-video-home-link,.fma-video-home-link { display:block; flex:0 0 44px; width:44px; height:44px; overflow:hidden; border:1px solid rgba(255,255,255,.35); border-radius:8px; background:#071d4c; box-shadow:0 1px 5px #0008; }
.fma-video-home-link img { display:block; width:100%; height:100%; object-fit:cover; }
.fma-video-home-link:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.fma-video-watch-layout .fma-lightbox-comments { position:absolute; z-index:5; left:calc(50% + min(21vh,270px) + 66px); right:auto; bottom:30px; display:flex; width:clamp(270px,26vw,360px); height:min(66vh,480px); min-width:0; max-height:calc(100% - 30px); flex-direction:column; overflow:hidden; margin:0; border:1px solid rgba(255,255,255,.12); border-radius:14px; background:#081523; color:#fff; }
.fma-video-watch-layout .fma-lightbox-comments[hidden] { display:none !important; }
.fma-video-watch-layout .fma-lightbox-comments header { display:flex; min-height:48px; align-items:center; justify-content:space-between; padding:10px 13px; border-bottom:1px solid rgba(255,255,255,.16); }
.fma-video-watch-layout .fma-lightbox-comments header strong { font-size:15px; }
.fma-video-watch-layout .fma-lightbox-comments-list { flex:1; min-height:100px; overflow:auto; overscroll-behavior:contain; padding:8px 13px; }
.fma-video-watch-layout .fma-lightbox-comment-form { padding:8px 11px 10px; border-top:1px solid rgba(255,255,255,.16); }
.fma-video-watch-layout .fma-lightbox-comment-form textarea { width:100%; height:42px; max-height:72px; min-height:42px; resize:none; padding:7px 9px; border:1px solid #37516e; border-radius:18px; background:#0c1d31; color:#fff; font:inherit; font-size:13px; }
.fma-video-watch-layout .fma-lightbox-comment-form-meta { display:flex; align-items:center; justify-content:space-between; margin-top:5px; color:rgba(255,255,255,.6); font-size:11px; }
.fma-video-watch-layout .fma-lightbox-comment-form-meta button { display:grid; width:31px; height:31px; place-items:center; padding:0; border:0; border-radius:50%; background:#0756b8; color:#fff; cursor:pointer; }
.fma-video-watch-layout .fma-lightbox-comment-form-meta button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.fma-video-watch-layout .fma-lightbox-comment-status,.fma-video-watch-layout .fma-lightbox-comment-login { margin:6px 0 0; color:#c8dcf5; font-size:12px; }
.fma-video-watch-layout .fma-lightbox-comments-close { width:32px; height:32px; border:0; border-radius:50%; background:transparent; color:#fff; font-size:22px; cursor:pointer; }
.fma-video-watch-layout .fma-video-comment { padding:10px 0; border-bottom:1px solid rgba(255,255,255,.1); }
.fma-video-watch-layout .fma-video-comment time { margin-left:8px; color:rgba(255,255,255,.55); font-size:11px; }
.fma-video-watch-layout .fma-video-comment p { margin:5px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; color:rgba(255,255,255,.9); font-size:13px; }
.fma-video-watch-layout .fma-comments-empty { color:rgba(255,255,255,.68); font-size:13px; }
.fma-video-watch-description { margin-top:18px; }
@media(max-width:850px) {
	.fma-video-watch-layout { min-height:0; flex-direction:row; justify-content:center; gap:6px; }
	.fma-video-watch-media { max-width:calc(100% - 48px); }
	.fma-video-watch-player.is-horizontal { width:min(calc(100vw - 82px),160vh); }
	.fma-video-watch-player.is-vertical { width:min(calc(100vw - 82px),44vh,480px); }
	.fma-video-watch-layout .fma-lightbox-action-rail { flex-basis:40px; align-self:stretch; flex-direction:column; justify-content:flex-end; gap:12px; padding:4px 0 14px; }
	.fma-video-watch-layout .fma-lightbox-comments { left:8px; right:8px; bottom:8px; width:auto; height:min(32vh,240px); max-height:40vh; }
}


/* Individual video reactions and comments share the available page width. */
@media(min-width:851px){
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) 52px clamp(270px,26vw,360px);grid-template-rows:minmax(0,1fr);align-items:center;gap:10px;min-height:40vh}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])) .fma-video-watch-media{grid-column:1;grid-row:1;width:100%;max-width:100%;min-width:0;justify-self:center}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])) .fma-video-watch-player{max-width:100%}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])) .fma-lightbox-action-rail{grid-column:2;grid-row:1;align-self:stretch}
 .fma-video-watch-layout .fma-lightbox-comments{position:relative;left:auto;right:auto;bottom:auto;grid-column:3;grid-row:1;align-self:end;width:auto;height:min(66vh,480px);max-height:calc(100% - 30px);margin:0 0 30px}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])) .fma-video-watch-player.is-horizontal{width:min(68vw,calc(100vw - 460px),960px)!important;}
}
@media(max-width:850px){
 .fma-video-watch-layout{display:grid;grid-template-columns:minmax(0,1fr) 48px;grid-template-rows:minmax(0,1fr);gap:4px;min-height:0;height:min(74vh,700px);transition:height .24s ease}
 .fma-video-watch-media{grid-column:1;grid-row:1;width:100%;max-width:100%;min-width:0;justify-self:center;transition:transform .24s ease}
 .fma-video-watch-layout .fma-lightbox-action-rail{grid-column:2;grid-row:1;flex-direction:column;justify-content:center;align-self:stretch;gap:12px;padding:4px 0}
 .fma-video-watch-player.is-vertical{width:min(calc(100vw - 80px),36vh,420px);max-width:100%;margin:0}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])):has(.fma-video-watch-player.is-vertical){grid-template-rows:minmax(0,1fr) minmax(160px,30vh);height:min(74vh,700px)}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])):has(.fma-video-watch-player.is-vertical) .fma-video-watch-player.is-vertical{width:min(calc(100vw - 80px),25vh,420px)}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])):has(.fma-video-watch-player.is-vertical) .fma-video-watch-media{transform:translateY(-7px) scale(.96)}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])):has(.fma-video-watch-player.is-vertical) .fma-lightbox-comments{grid-column:1/-1;grid-row:2;position:relative;left:auto;right:auto;bottom:auto;width:100%;height:auto;max-height:30vh;margin:0;align-self:stretch}
 .fma-video-watch-layout:has(.fma-video-watch-player.is-horizontal){grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;height:auto;min-height:0;gap:5px}
 .fma-video-watch-layout:has(.fma-video-watch-player.is-horizontal) .fma-video-watch-media{grid-column:1;grid-row:1;width:100%;transform:none}
 .fma-video-watch-layout .fma-video-watch-player.is-horizontal{width:min(calc(100vw - 24px),960px);max-width:100%;margin:0 auto}
 .fma-video-watch-layout:has(.fma-video-watch-player.is-horizontal) .fma-lightbox-action-rail{grid-column:1;grid-row:2;flex-direction:row;flex-wrap:wrap;justify-content:center;align-self:center;gap:12px;padding:7px 0}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])):has(.fma-video-watch-player.is-horizontal){grid-template-rows:auto auto minmax(160px,30vh)}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])):has(.fma-video-watch-player.is-horizontal) .fma-lightbox-comments{grid-column:1;grid-row:3;position:relative;left:auto;right:auto;bottom:auto;width:100%;height:auto;max-height:30vh;margin:0;align-self:stretch}
}

/* Keep individual-page players centered when the right-side comments open. */
@media(min-width:851px){
 .fma-video-watch-layout{--fma-watch-open-width:min(44vw,620px,max(130px,calc(100vw - 720px)));--fma-watch-open-half:min(22vw,310px,max(65px,calc(50vw - 360px)));}
 .fma-video-watch-layout:has(.fma-video-watch-player.is-vertical){--fma-watch-open-width:min(38vh,420px,max(130px,calc(100vw - 720px)));--fma-watch-open-half:min(19vh,210px,max(65px,calc(50vw - 360px)));}
 .fma-video-watch-layout{position:relative;display:block;width:100%;height:min(76vh,24.75vw);min-height:40vh}
 .fma-video-watch-layout:has(.fma-video-watch-player.is-vertical){height:68vh}
 .fma-video-watch-layout .fma-video-watch-media{position:absolute;top:50%;left:calc(50% - 31px);width:var(--fma-watch-open-width);max-width:var(--fma-watch-open-width);transform:translate(-50%,-50%)}
 .fma-video-watch-layout .fma-video-watch-player.is-horizontal{width:var(--fma-watch-open-width)!important}
 .fma-video-watch-layout .fma-video-watch-player.is-vertical{width:var(--fma-watch-open-width)!important}
 .fma-video-watch-layout .fma-video-watch-player{width:100%!important;max-width:100%!important}
 .fma-video-watch-layout .fma-lightbox-action-rail{position:absolute;top:50%;left:calc(50% + var(--fma-watch-open-half,150px) - 21px);height:100%;transform:translateY(-50%);}
 .fma-video-watch-layout .fma-lightbox-comments{position:absolute;top:50%;left:calc(50% + var(--fma-watch-open-half,150px) + 41px);right:auto;bottom:auto;width:clamp(220px,24vw,320px);height:min(66vh,480px);max-height:calc(100% - 20px);margin:0;transform:translateY(-50%)}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])){display:block!important}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])) .fma-video-watch-media{position:absolute!important;top:50%!important;left:calc(50% - 31px)!important;width:var(--fma-watch-open-width)!important;max-width:var(--fma-watch-open-width)!important;justify-self:auto!important;transform:translate(-50%,-50%)!important}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])) .fma-video-watch-player{width:100%!important;max-width:100%!important}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])) .fma-lightbox-action-rail{position:absolute!important;top:50%!important;left:calc(50% + var(--fma-watch-open-half,150px) - 21px)!important;height:100%!important;transform:translateY(-50%)!important}
 .fma-video-watch-layout:has(.fma-lightbox-comments:not([hidden])) .fma-lightbox-comments{position:absolute!important;top:50%!important;left:calc(50% + var(--fma-watch-open-half,150px) + 41px)!important;right:auto!important;bottom:auto!important;width:clamp(220px,24vw,320px)!important;height:min(66vh,480px)!important;max-height:calc(100% - 20px)!important;margin:0!important;transform:translateY(-50%)!important}
}
