/* Owner 2026-11-16: Britishey's own video player (britishey-player.js), shared by the course lessons and the course
   overview on the course page. Same rules as in course-space.css. */
@keyframes cs-spin { to { transform: rotate(360deg); } }
.bp { position: absolute; inset: 0; overflow: hidden; background: #000; color: #fff; font-family: Cabin, system-ui, sans-serif; outline: 0; user-select: none; }
.bp__frame { position: absolute; left: 0; right: 0; top: -60px; height: calc(100% + 120px); pointer-events: none; }
.bp__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.bp__shield { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.bp__big { position: absolute; left: 50%; top: 50%; z-index: 3; display: none; place-items: center; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%;
    background: var(--cs-hi, #ffe66b); color: #14274a; font-size: 30px; box-shadow: 5px 5px 0 var(--cs-red, #cc2a1d); cursor: pointer; transition: transform .15s ease; }
.bp__big i { margin-left: 4px; }
.bp__big:hover { transform: scale(1.06); }
.bp.is-paused .bp__big, .bp.is-ended .bp__big { display: grid; }
.bp.is-ended .bp__big i { margin-left: 0; }
/* Paused or finished: a soft veil hides anything YouTube lays over the picture. */
.bp.is-paused .bp__shield { background: radial-gradient(circle at center, rgba(11, 20, 38, .35), rgba(11, 20, 38, .72)); }
.bp.is-ended .bp__shield { background: #0b1426; }
.bp__spinner { position: absolute; left: 50%; top: 50%; z-index: 2; display: none; width: 54px; height: 54px; margin: -27px 0 0 -27px; border: 5px solid rgba(255, 255, 255, .25); border-top-color: var(--cs-hi, #ffe66b); border-radius: 50%; animation: cs-spin .8s linear infinite; }
.bp.is-loading .bp__spinner { display: block; }
.bp.is-loading .bp__shield { background: #0b1426; }
.bp__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 26px 14px 10px; background: linear-gradient(180deg, transparent, rgba(8, 15, 30, .88)); transition: opacity .25s ease, transform .25s ease; }
.bp.is-idle.is-playing .bp__bar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.bp.is-idle.is-playing { cursor: none; }
.bp__row { display: flex; align-items: center; gap: 4px; }
.bp__gap { flex: 1; }
.bp__btn { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 16px; cursor: pointer; }
.bp__btn:hover, .bp__btn:focus-visible { background: rgba(255, 255, 255, .16); outline: 0; }
.bp__text { font: 800 13px/1 Cabin, sans-serif; letter-spacing: .04em; }
.bp__btn.is-on { background: var(--cs-hi, #ffe66b); color: #14274a; }
.bp__btn.is-none { opacity: .45; }
.bp__time { margin: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp__time b { font-weight: 700; }
.bp input[type=range] { -webkit-appearance: none; appearance: none; height: 5px; margin: 0; border-radius: 999px; background: rgba(255, 255, 255, .28); cursor: pointer; }
.bp__seek { display: block; width: 100%; margin-bottom: 8px !important; background: linear-gradient(90deg, var(--cs-red, #cc2a1d) var(--bp-done, 0%), rgba(255, 255, 255, .28) var(--bp-done, 0%)) !important; }
.bp__volume { width: 78px; }
.bp input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--cs-hi, #ffe66b); box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); }
.bp input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--cs-hi, #ffe66b); }
.bp__menu { position: relative; }
.bp__menu[hidden] { display: none; }
.bp__list { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; display: grid; min-width: 120px; max-height: 240px; overflow: auto; padding: 6px; border-radius: 10px; background: rgba(14, 27, 51, .96); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.bp__list[hidden] { display: none; }
.bp__list button { padding: 8px 12px; border: 0; border-radius: 7px; background: transparent; color: #fff; font: 600 13.5px/1 Cabin, sans-serif; text-align: left; cursor: pointer; white-space: nowrap; }
.bp__list button:hover { background: rgba(255, 255, 255, .14); }
.bp__list button[aria-checked="true"] { background: var(--cs-hi, #ffe66b); color: #14274a; }
.bp.is-error::after { content: "This video cannot play right now. Please try again in a moment."; position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 20px; background: #0b1426; color: #fff; text-align: center; }
@media (max-width: 640px) { .bp__volume, .bp [data-bp="back"], .bp [data-bp="forward"] { display: none; } .bp__time { margin: 0 4px; font-size: 12px; } }
.bp__text [data-bp-quality] { margin-left: 5px; font-size: 12px; }
.bp__text [data-bp-quality]:empty { display: none; }
.bp__btn.bp__text { display: inline-flex; align-items: center; }
.bp__big { width: auto; min-width: 104px; height: 70px; margin: -35px 0 0 -52px; padding: 0 28px; border-radius: 10px; background: transparent; box-shadow: none; transform: none; isolation: isolate; }
.bp__big::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 10px; background: var(--cs-hi, #ffe66b); transform: skewX(-12deg); box-shadow: 5px 5px 0 var(--cs-red, #cc2a1d); transition: box-shadow .15s ease, translate .15s ease; }
.bp__big:hover { transform: none; }
.bp__big:hover::before { translate: -2px -2px; box-shadow: 7px 7px 0 var(--cs-red, #cc2a1d); }
.bp__big i { margin-left: 2px; }
.bp:not(.has-started) .bp__frame { opacity: 0; }
.bp:not(.has-started) .bp__shield { background: #0b1426; }
.bp:not(.has-started):not(.is-error) .bp__spinner { display: block; }
.bp:not(.has-started) .bp__big { display: none; }
