/* Hosted video player (ARCHITECTURE.md §8i) — the website's VideoPlayer look, as plain CSS for embeds.
   Served statically from {cdn}/embed/ (cached for a month; Publisher::PLAYER_VERSION busts it).
   The customer's colour is --mx-c, the corner radius --mx-r (set by player.js from the embed's settings). */
html, body { margin: 0; height: 100%; background: transparent; overflow: hidden; }
*, *::before, *::after { box-sizing: border-box; }
.mxp {
  --mx-c: #7f41f6;
  --mx-c2: color-mix(in oklab, var(--mx-c) 55%, #ffffff);
  --mx-glow: color-mix(in srgb, var(--mx-c) 55%, transparent);
  --mx-r: 12px;
  --bar-h: 4.5rem;
  position: fixed; inset: 0; isolation: isolate; overflow: hidden; background: #000; color: #fff;
  border-radius: var(--mx-r); outline: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  font: 500 14px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.mxp:fullscreen, .mxp:-webkit-full-screen { border-radius: 0; }
.mxp.mx-hide-cursor { cursor: none; }
.mxp video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.mxp svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.mxp .fill svg, .mxp svg.fill { fill: currentColor; }
.mxp [hidden] { display: none !important; }
.mx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the picture: click plays / pauses, double-click goes full screen */
.mx-surface { position: absolute; inset: 0; z-index: 10; }

/* poster image (shown until the first play; the <video> poster attribute is not used so it can cover / fade) */
.mx-poster { position: absolute; inset: 0; z-index: 5; background: #000 center / contain no-repeat; transition: opacity .35s ease; pointer-events: none; }
.mx-poster.mx-gone { opacity: 0; }

/* captions, lifted above the bar while it shows */
.mx-cc { position: absolute; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; padding: 0 5%; pointer-events: none; bottom: max(4%, 0.75rem); transition: bottom .3s ease-out; }
.mxp.mx-visible .mx-cc { bottom: calc(var(--bar-h) + 0.25rem); }
.mx-cc p { margin: 0; max-width: min(92%, 52rem); white-space: pre-line; border-radius: 8px; background: rgba(0,0,0,.7); padding: .2em .6em; text-align: center; font-weight: 500; line-height: 1.35; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); font-size: clamp(13px, 3.1vw, 36px); }

/* scrim behind the controls */
.mx-scrim { position: absolute; left: 0; right: 0; bottom: 0; z-index: 15; height: 40%; max-height: 14rem; pointer-events: none; opacity: 0; transition: opacity .3s; background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,.3) 50%, transparent); }
.mxp.mx-visible .mx-scrim { opacity: 1; }

/* big play / replay button */
.mx-big { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.mx-big::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,.05) 55%, rgba(0,0,0,.15)); }
.mx-big button { pointer-events: auto; position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer; outline: none; transition: transform .3s; }
.mx-big button:hover { transform: scale(1.05); }
.mx-big button:active { transform: scale(.95); }
.mx-big button:focus-visible { box-shadow: 0 0 0 4px rgba(255,255,255,.8); }
.mx-big .mx-glow { position: absolute; inset: -6px; border-radius: 50%; background: var(--mx-c); opacity: .6; filter: blur(16px); transition: opacity .3s; }
.mx-big button:hover .mx-glow { opacity: .95; }
.mx-big .mx-ping { position: absolute; inset: 0; border-radius: 50%; background: rgba(255,255,255,.3); animation: mx-ping 2.4s cubic-bezier(0,0,.2,1) infinite; }
.mx-big .mx-disk { position: relative; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; border-radius: 50%; background: var(--mx-c); color: #fff; box-shadow: 0 10px 40px -6px var(--mx-glow); outline: 1px solid rgba(255,255,255,.18); outline-offset: -1px; }
.mx-big .mx-disk svg { width: 28px; height: 28px; }
.mx-big .mx-disk .mx-play { transform: translateX(2px); fill: currentColor; }
.mx-big.mx-ended .mx-ping { display: none; }
.mx-dur { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 21; border-radius: 6px; background: rgba(0,0,0,.6); padding: 2px 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; backdrop-filter: blur(4px); pointer-events: none; }
@keyframes mx-ping { 75%, 100% { transform: scale(1.6); opacity: 0; } }

/* "tap to unmute" (muted autoplay) */
.mx-unmute { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 32; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; padding: 7px 14px 7px 10px; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; backdrop-filter: blur(10px); box-shadow: 0 6px 24px -8px rgba(0,0,0,.7); outline: 1px solid rgba(255,255,255,.12); outline-offset: -1px; transition: background .2s, transform .2s; }
.mx-unmute:hover { background: rgba(0,0,0,.75); }
.mx-unmute:focus-visible { box-shadow: 0 0 0 2px #fff; }
.mx-unmute svg { width: 16px; height: 16px; color: var(--mx-c2); }

/* buffering */
.mx-spin { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; transition: opacity .2s; }
.mxp.mx-waiting .mx-spin { opacity: 1; transition-delay: .2s; }
.mx-spin span { position: relative; width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,.35); backdrop-filter: blur(4px); }
.mx-spin span::before, .mx-spin span::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); }
.mx-spin span::after { border-color: transparent; border-top-color: var(--mx-c2); border-right-color: var(--mx-c); animation: mx-rot .8s linear infinite; }
@keyframes mx-rot { to { transform: rotate(360deg); } }

/* what a click or a shortcut just did */
.mx-flash { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.mx-flash.mx-start { justify-content: flex-start; padding-inline-start: 10%; }
.mx-flash.mx-end { justify-content: flex-end; padding-inline-end: 10%; }
.mx-flash div { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 56px; height: 56px; border-radius: 999px; background: rgba(0,0,0,.5); box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); outline: 1px solid rgba(255,255,255,.1); outline-offset: -1px; backdrop-filter: blur(12px); font-weight: 600; font-variant-numeric: tabular-nums; animation: mx-pop .65s ease forwards; }
.mx-flash div.mx-text { height: auto; padding: 10px 16px; }
.mx-flash svg { width: 28px; height: 28px; }
.mx-flash div.mx-text svg { width: 20px; height: 20px; }
@keyframes mx-pop { 0% { opacity: 0; transform: scale(.8); } 25% { opacity: 1; transform: scale(1); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.12); } }

/* control bar */
.mx-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .3s ease-out, transform .3s ease-out; }
.mxp.mx-visible .mx-bar { opacity: 1; transform: none; pointer-events: auto; }
.mxp:not(.mx-started) .mx-bar { visibility: hidden; }
.mx-glass { position: relative; border-radius: 12px; padding: 0 6px 2px; }
.mx-glass::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(0,0,0,.4); box-shadow: 0 12px 40px -12px rgba(0,0,0,.75); outline: 1px solid rgba(255,255,255,.1); outline-offset: -1px; backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); }

.mx-scrub { position: relative; display: flex; height: 20px; align-items: center; padding: 0 4px; cursor: pointer; touch-action: none; }
.mx-rail { position: relative; width: 100%; height: 4px; border-radius: 999px; background: rgba(255,255,255,.2); outline: none; transition: height .2s; --p: 0; --b: 0; }
.mx-scrub:hover .mx-rail, .mx-rail:focus-visible, .mxp.mx-scrubbing .mx-rail { height: 6px; }
.mx-rail:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.mx-rail > div { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: 999px; }
.mx-buf { width: calc(var(--b) * 100%); background: rgba(255,255,255,.3); }
.mx-hov { background: rgba(255,255,255,.25); }
.mx-fill { width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--mx-c), var(--mx-c2)); box-shadow: 0 0 12px var(--mx-glow); }
[dir="rtl"] .mx-fill { background: linear-gradient(270deg, var(--mx-c), var(--mx-c2)); }
.mx-thumb { width: 14px !important; height: 14px; top: 50% !important; bottom: auto !important; inset-inline-start: calc(var(--p) * 100%) !important; transform: translate(-50%, -50%) scale(0); border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--mx-glow), 0 2px 8px rgba(0,0,0,.45); transition: transform .15s; }
[dir="rtl"] .mx-thumb { transform: translate(50%, -50%) scale(0); }
.mx-scrub:hover .mx-thumb, .mx-rail:focus-visible .mx-thumb, .mxp.mx-scrubbing .mx-thumb { transform: translate(-50%, -50%) scale(1); }
[dir="rtl"] .mx-scrub:hover .mx-thumb, [dir="rtl"] .mxp.mx-scrubbing .mx-thumb { transform: translate(50%, -50%) scale(1); }
.mx-tip { position: absolute; bottom: 100%; margin-bottom: 12px; transform: translateX(-50%); white-space: nowrap; border-radius: 6px; background: rgba(0,0,0,.85); padding: 4px 8px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: 0 6px 16px rgba(0,0,0,.4); pointer-events: none; }

.mx-row { display: flex; align-items: center; gap: 2px; }
.mx-btn { position: relative; display: inline-flex; flex-shrink: 0; width: 32px; height: 32px; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.9); padding: 0; cursor: pointer; outline: none; transition: background .2s, color .2s, transform .1s; font-family: inherit; }
.mx-btn:hover, .mx-btn:focus-visible { background: rgba(255,255,255,.15); color: #fff; }
.mx-btn:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.mx-btn:active { transform: scale(.9); }
.mx-btn.mx-off { color: rgba(255,255,255,.6); }
.mx-btn .mx-play { transform: translateX(1px); }
.mx-btn .mx-line { position: absolute; bottom: 4px; left: 50%; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px; background: linear-gradient(90deg, var(--mx-c), var(--mx-c2)); transform: scaleX(0); transition: transform .2s; }
.mx-btn[aria-pressed="true"] .mx-line { transform: scaleX(1); }
.mx-badge { position: absolute; top: -4px; inset-inline-end: -2px; border-radius: 5px; background: var(--mx-c); padding: 0 4px; font-size: 9px; font-weight: 700; line-height: 14px; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); pointer-events: none; }
.mx-btn[data-tip]::after { content: attr(data-tip); position: absolute; bottom: 100%; margin-bottom: 10px; left: 50%; transform: translateX(-50%); display: none; white-space: nowrap; border-radius: 8px; background: rgba(0,0,0,.85); padding: 4px 8px; font-size: 12px; font-weight: 500; color: #fff; opacity: 0; pointer-events: none; transition: opacity .15s; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.mx-btn[data-tip].mx-tip-start::after { left: 0; transform: none; }
.mx-btn[data-tip].mx-tip-end::after { left: auto; right: 0; transform: none; }
.mx-btn[data-tip]:hover::after, .mx-btn[data-tip]:focus-visible::after { opacity: 1; transition-delay: .2s; }
.mx-btn.mx-open::after { display: none !important; }

.mx-vol { display: flex; align-items: center; }
.mx-volwrap { display: flex; width: 0; height: 32px; align-items: center; overflow: hidden; opacity: 0; transition: width .2s ease-out, opacity .2s ease-out; }
.mx-vol:hover .mx-volwrap, .mx-vol:focus-within .mx-volwrap, .mxp.mx-voldrag .mx-volwrap { width: 72px; opacity: 1; }
.mx-volhit { display: flex; width: 72px; height: 100%; flex-shrink: 0; align-items: center; padding: 0 8px; cursor: pointer; touch-action: none; }
.mx-volrail { position: relative; width: 100%; height: 4px; border-radius: 999px; background: rgba(255,255,255,.25); outline: none; --v: 1; }
.mx-volrail:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.mx-volrail::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: calc(var(--v) * 100%); border-radius: 999px; background: #fff; }
.mx-volrail::after { content: ""; position: absolute; top: 50%; inset-inline-start: calc(var(--v) * 100%); width: 12px; height: 12px; margin-top: -6px; margin-inline-start: -6px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
@media (pointer: coarse) { .mx-volwrap { display: none; } .mx-scrub { height: 28px; } }

.mx-time { margin-inline-start: 4px; white-space: nowrap; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); }
.mx-grow { flex: 1; }

.mx-menuwrap { position: relative; }
.mx-menu { position: absolute; bottom: 100%; inset-inline-end: 0; z-index: 10; margin-bottom: 12px; width: 176px; overflow-y: auto; border-radius: 12px; background: rgba(20,13,51,.9); padding: 6px; box-shadow: 0 20px 50px -12px rgba(0,0,0,.85); outline: 1px solid rgba(255,255,255,.1); outline-offset: -1px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); transform-origin: bottom right; animation: mx-menu .16s ease-out; scrollbar-width: thin; }
@keyframes mx-menu { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.mx-menu p { margin: 0; padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.mx-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: 8px; background: transparent; padding: 6px 10px; text-align: start; font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.4; color: rgba(255,255,255,.8); cursor: pointer; outline: none; }
.mx-menu button:hover, .mx-menu button:focus-visible { background: rgba(255,255,255,.1); }
.mx-menu button:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.mx-menu button[aria-checked="true"] { font-weight: 600; color: #fff; }
.mx-menu button svg { width: 16px; height: 16px; color: var(--mx-c2); }
.mx-menu small { font-size: 11px; color: rgba(255,255,255,.55); }

/* messages: couldn't play / unavailable / not allowed here */
.mx-msg { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; background: rgba(0,0,0,.82); backdrop-filter: blur(4px); }
.mx-msg .mx-ic { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.1); outline: 1px solid rgba(255,255,255,.15); outline-offset: -1px; }
.mx-msg .mx-ic svg { width: 22px; height: 22px; color: #fbbf24; }
.mx-msg strong { max-width: 22rem; font-size: 15px; font-weight: 600; }
.mx-msg span { max-width: 22rem; font-size: 13px; color: rgba(255,255,255,.7); }
.mx-msg button { margin-top: 4px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: #fff; color: #140d33; padding: 8px 16px; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; }
.mx-msg button svg { width: 16px; height: 16px; }

/* keyboard focus ring on top of the video */
.mx-ring { position: absolute; inset: 0; z-index: 50; border-radius: inherit; pointer-events: none; opacity: 0; box-shadow: inset 0 0 0 2px var(--mx-c2); transition: opacity .15s; }
.mxp:focus-visible .mx-ring { opacity: 1; }
.mxp.mx-playing:not(.mx-visible) .mx-ring, .mxp:fullscreen .mx-ring { display: none; }

@media (min-width: 384px) {
  .mx-bar { padding: 10px; }
  .mx-glass { border-radius: 16px; padding: 0 8px 4px; }
  .mx-btn { width: 36px; height: 36px; }
  .mx-row { gap: 4px; }
  .mx-time { font-size: 12px; margin-inline-start: 6px; }
  .mx-big button { width: 80px; height: 80px; }
  .mx-big .mx-disk svg { width: 32px; height: 32px; }
  .mx-btn[data-tip]::after { display: block; }
}
@media (min-width: 768px) {
  .mx-bar { padding: 16px; }
  .mx-glass { padding: 0 12px 4px; }
  .mx-scrub { height: 24px; }
  .mx-btn { width: 44px; height: 44px; }
  .mx-btn > svg { width: 24px; height: 24px; }
  .mx-time { font-size: 14px; }
  .mx-volhit, .mx-vol:hover .mx-volwrap, .mx-vol:focus-within .mx-volwrap, .mxp.mx-voldrag .mx-volwrap { width: 96px; }
  .mx-btn .mx-line { width: 20px; margin-left: -10px; bottom: 6px; }
}
@media (max-width: 319px) { .mx-pip { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .mx-big .mx-ping { display: none; }
  .mx-bar, .mx-big button, .mx-flash div { transition: none; animation-duration: .01s; }
}
