/* Course player polish (player-polish.js). Uses the v3 design tokens. */
.mxp-hide { display: none !important; }

.mxp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 12px 14px 12px 16px; background: var(--mx-surface, #fff); border-radius: var(--mx-radius-lg, 16px); box-shadow: 0 1px 0 var(--mx-tone, #e6e8ec); }
.mxp-bar[hidden] { display: none; }
.mxp-info { min-width: 0; }
.mxp-count { display: block; font-size: .8125rem; font-weight: 600; color: var(--mx-ink-3, #6b7280); font-variant-numeric: tabular-nums; }
.mxp-title { display: block; font-weight: 800; color: var(--mx-ink, #111827); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mxp-nav { display: flex; gap: 8px; flex: none; }

.mxp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border: 1px solid var(--mx-tone, #e6e8ec); border-radius: 999px; background: var(--mx-paper, #f5f6f8); color: var(--mx-ink, #111827); font: inherit; font-weight: 700; cursor: pointer; transition: transform 120ms ease, background-color 160ms ease, opacity 160ms ease; }
.mxp-btn:active { transform: scale(.97); }
.mxp-btn:disabled { opacity: .38; cursor: default; transform: none; }
.mxp-btn:focus-visible { outline: 3px solid var(--mx-brand, #f59e0b); outline-offset: 2px; }
.mxp-next { background: var(--mx-brand, #f59e0b); border-color: transparent; color: var(--mx-on-brand, #111827); }
@media (hover: hover) and (pointer: fine) {
	.mxp-btn:not(:disabled):hover { background: var(--mx-tone, #e6e8ec); }
	.mxp-next:not(:disabled):hover { background: var(--mx-brand-strong, #d97706); }
}

/* next-lesson screen over the finished video */
.mxp-end { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 20px; background: rgba(10, 18, 30, .88); color: #fff; text-align: center; animation: mxp-in 260ms ease both; }
.mxp-end-in { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 520px; }
.mxp-end-label { font-size: .9375rem; color: rgba(255, 255, 255, .78); }
.mxp-end-title { font-size: clamp(1.125rem, 1rem + .8vw, 1.5rem); font-weight: 800; line-height: 1.35; }
.mxp-end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.mxp-ghost { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff; }
@media (hover: hover) and (pointer: fine) { .mxp-ghost:not(:disabled):hover { background: rgba(255, 255, 255, .12); } }
@keyframes mxp-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mxp-end { animation: none; } }

/* personal watermark over the playing video */
.mxp-wm { position: absolute; z-index: 2; top: 10%; inset-inline-start: 8%; max-width: 70%; pointer-events: none; user-select: none; font-size: clamp(.75rem, .6rem + .6vw, 1rem); font-weight: 700; color: rgba(255, 255, 255, .34); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: top 1.2s ease, inset-inline-start 1.2s ease; direction: rtl; }
@media (prefers-reduced-motion: reduce) { .mxp-wm { transition: none; } }

/* "continue from lesson N" button: its text was the same color as its background */
.mx-course .mx-resume { color: #fff; }
.mx-course .mx-resume bdi { color: inherit; }

/* the lesson that is playing */
.mx-lesson[aria-current] { box-shadow: inset -4px 0 0 var(--mx-brand, #f59e0b); }
.mx-lesson[aria-current] .mx-lesson-state .mx-i { display: none; }
.mx-lesson[aria-current] .mx-lesson-state::after { content: "מתנגן"; font-size: .8125rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--mx-ink, #111827); color: var(--mx-surface, #fff); }

/* phones, course already bought: lessons straight after the video, the "your course" card below them */
@media (max-width: 980px) {
	.mx-course-grid:has(.mx-buy [data-continue]) .mx-syllabus { order: -1; }
}
@media (max-width: 640px) {
	.mxp-bar { flex-wrap: wrap; padding: 12px; }
	.mxp-info { flex: 1 1 100%; }
	.mxp-nav { flex: 1 1 100%; }
	.mxp-nav .mxp-btn { flex: 1; }
	.mxp-end-label { font-size: .875rem; }
	.mxp-end-actions .mxp-btn { min-height: 38px; padding: 0 12px; font-size: .9375rem; }
}
