/* =====================================================================
   Media2Punch — video player (uploaded videos)
   ===================================================================== */
.m2v { --m2v-c: var(--c, #e3121b); position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 14px; overflow: hidden; color: #fff; outline: none; isolation: isolate;
       user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; font-family: Inter, system-ui, sans-serif; box-shadow: 0 18px 50px -20px rgba(0,0,0,.8); }
.m2v:focus-visible { box-shadow: 0 0 0 3px var(--m2v-c); }
.m2v video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; cursor: pointer; pointer-events: auto; }
.m2v.is-full, .m2v:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.m2v.is-playing.is-idle, .m2v.is-playing.is-idle video { cursor: none; }

/* shading so the controls are readable */
.m2v__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.55) 0, transparent 22%, transparent 62%, rgba(0,0,0,.82) 100%); transition: opacity .35s; }
.m2v.is-idle.is-playing .m2v__shade { opacity: 0; }
.m2v:not(.is-started) .m2v__shade { background: radial-gradient(ellipse at center, rgba(0,0,0,.05), rgba(0,0,0,.55)); }

.m2v__title { position: absolute; top: 16px; left: 20px; right: 20px; font: 700 1.02rem/1.3 Inter, sans-serif; text-shadow: 0 2px 10px rgba(0,0,0,.6); pointer-events: none; transition: opacity .35s, transform .35s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m2v.is-idle.is-playing .m2v__title { opacity: 0; transform: translateY(-8px); }

/* big play button */
.m2v__big { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; z-index: 2;
            background: var(--m2v-c); box-shadow: 0 12px 34px -6px var(--m2v-c); display: grid; place-items: center; transition: transform .3s cubic-bezier(.2,.9,.3,1.3), opacity .3s; }
.m2v__big svg { width: 36px; height: 36px; margin-left: 4px; }
.m2v__big:hover { transform: scale(1.08); }
.m2v__ring { position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--m2v-c); opacity: .6; animation: m2v-ring 2s ease-out infinite; pointer-events: none; }
.m2v.is-started .m2v__big { opacity: 0; transform: scale(.6); pointer-events: none; }
.m2v.is-started.is-paused:not(.is-seeking) .m2v__big { opacity: 1; transform: none; pointer-events: auto; }
.m2v.is-started .m2v__ring { display: none; }
@keyframes m2v-ring { from { transform: scale(.9); opacity: .7; } to { transform: scale(1.45); opacity: 0; } }

/* centre flash on click / key */
.m2v__flash { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; opacity: 0; pointer-events: none; z-index: 2; }
.m2v__flash svg { width: 30px; height: 30px; }
.m2v__flash.go { animation: m2v-flash .55s ease-out; }
@keyframes m2v-flash { 0% { opacity: .95; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.4); } }

/* skip 10 seconds hints */
.m2v__seekhint { position: absolute; top: 0; bottom: 0; width: 34%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; opacity: 0; pointer-events: none; z-index: 2; }
.m2v__seekhint--l { left: 0; background: radial-gradient(ellipse at 0 50%, rgba(255,255,255,.16), transparent 70%); }
.m2v__seekhint--r { right: 0; background: radial-gradient(ellipse at 100% 50%, rgba(255,255,255,.16), transparent 70%); }
.m2v__seekhint svg { width: 30px; height: 30px; }
.m2v__seekhint b { font-size: .78rem; font-weight: 600; }
.m2v__seekhint.go { animation: m2v-hint .7s ease-out; }
@keyframes m2v-hint { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }

/* loading spinner */
.m2v__spin { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 2; }
.m2v__spin i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--m2v-c); animation: m2v-spin .8s linear infinite; }
.m2v.is-loading.is-started .m2v__spin { opacity: 1; transition-delay: .25s; }
@keyframes m2v-spin { to { transform: rotate(360deg); } }
.m2v.is-error::after { content: "This video could not be played. Please reload the page."; position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; background: rgba(0,0,0,.8); font-size: .95rem; z-index: 5; }

/* control bar */
.m2v__bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 14px 10px; z-index: 3; transition: opacity .35s, transform .35s; }
.m2v:not(.is-started) .m2v__bar { opacity: 0; transform: translateY(10px); pointer-events: none; }
.m2v.is-idle.is-playing .m2v__bar { opacity: 0; transform: translateY(10px); pointer-events: none; }

.m2v__track { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.m2v__track::before, .m2v__buf, .m2v__fill, .m2v__hover { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; transition: height .15s, margin .15s; }
.m2v__track::before { content: ""; right: 0; background: rgba(255,255,255,.22); }
.m2v__buf { background: rgba(255,255,255,.38); width: 0; }
.m2v__hover { background: rgba(255,255,255,.3); width: 0; opacity: 0; }
.m2v__fill { background: var(--m2v-c); width: 0; box-shadow: 0 0 12px var(--m2v-c); }
.m2v__fill i { position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--m2v-c); transform: scale(0); transition: transform .15s; }
.m2v__track:hover::before, .m2v__track:hover .m2v__buf, .m2v__track:hover .m2v__fill, .m2v__track:hover .m2v__hover, .m2v.is-seeking .m2v__fill { height: 6px; margin-top: -3px; }
.m2v__track:hover .m2v__fill i, .m2v.is-seeking .m2v__fill i { transform: scale(1); }
.m2v__track:hover .m2v__hover { opacity: 1; }
.m2v__tip { position: absolute; bottom: 22px; left: 0; transform: translateX(-50%); padding: 4px 9px; border-radius: 7px; background: rgba(15,15,18,.92); font: 600 .75rem Inter, sans-serif; opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap; }
.m2v__track:hover .m2v__tip, .m2v.is-seeking .m2v__tip { opacity: 1; }

.m2v__row { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.m2v__sp { flex: 1; }
.m2v__btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: #fff; cursor: pointer; border-radius: 10px; transition: background .15s, transform .15s; flex: none; }
.m2v__btn svg { width: 22px; height: 22px; }
.m2v__btn--sm svg { width: 19px; height: 19px; }
.m2v__btn:hover { background: rgba(255,255,255,.12); }
.m2v__btn:active { transform: scale(.9); }
.m2v__btn:focus-visible { outline: 2px solid var(--m2v-c); outline-offset: 1px; }
.m2v__time { font: 600 .82rem Inter, sans-serif; font-variant-numeric: tabular-nums; margin-left: 8px; white-space: nowrap; color: rgba(255,255,255,.75); }
.m2v__time b { color: #fff; }

/* volume */
.m2v__vol { display: flex; align-items: center; }
.m2v__vol input { -webkit-appearance: none; appearance: none; width: 0; opacity: 0; height: 4px; border-radius: 4px; cursor: pointer; transition: width .25s, opacity .25s, margin .25s;
                  background: linear-gradient(90deg, #fff var(--p, 100%), rgba(255,255,255,.25) var(--p, 100%)); }
.m2v__vol:hover input, .m2v__vol input:focus-visible { width: 84px; opacity: 1; margin: 0 8px 0 2px; }
.m2v__vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
.m2v__vol input::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }

/* speed menu */
.m2v__menu-wrap { position: relative; }
.m2v.is-menu [data-a="menu"] svg { transform: rotate(60deg); }
.m2v [data-a="menu"] svg { transition: transform .3s; }
.m2v__menu { position: absolute; right: 0; bottom: 48px; min-width: 150px; padding: 8px; border-radius: 12px; background: rgba(18,18,22,.95); backdrop-filter: blur(10px); box-shadow: 0 14px 40px -10px #000;
             display: flex; flex-direction: column; gap: 2px; animation: m2v-menu .18s ease-out; }
.m2v__menu[hidden] { display: none; }
.m2v__menu span { padding: 4px 10px 6px; font: 700 .68rem Inter, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.5); }
.m2v__menu button { text-align: left; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: #fff; font: 500 .86rem Inter, sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.m2v__menu button:hover { background: rgba(255,255,255,.1); }
.m2v__menu button.on { color: var(--m2v-c); font-weight: 700; }
.m2v__menu button.on::after { content: "✓"; }
@keyframes m2v-menu { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
    .m2v { border-radius: 10px; }
    .m2v__big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
    .m2v__big svg { width: 28px; height: 28px; }
    .m2v__btn { width: 36px; height: 36px; }
    .m2v__btn--sm, .m2v__vol input { display: none; }
    .m2v__time { font-size: .74rem; margin-left: 2px; }
    .m2v__title { font-size: .9rem; top: 12px; left: 14px; }
}
@media (prefers-reduced-motion: reduce) { .m2v *, .m2v *::before { animation: none !important; transition: none !important; } }

/* inside the trailer pop-up and spotlight */
.ltr__box [hidden] { display: none !important; }
.ltr__own .m2v { border-radius: 12px; }
.tsp__stage > .m2v { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: inherit; }
