/* Tutor owns this video; keep Plyr and the outer ratio frame the same size. */
.tutor-video-player > .plyr:not(.plyr--fullscreen-active) {
 position: absolute; inset: 0; width: 100%; height: 100%;
}
.tutor-video-player .plyr__video-wrapper { width: 100%; height: 100%; }
.tutor-video-player video { width: 100%; height: 100%; object-fit: contain; }
.single-lesson .tutor-learning-header { top: var(--mlab-promo-height, 0px); }

/* Volume is a labelled popover, separate from the seek bar. */
.tutor-video-player .mlab-volume-popover[hidden] { display: none !important; }
.tutor-video-player .mlab-volume-popover {
 position: absolute; right: 0; bottom: calc(100% + 12px); z-index: 10;
 width: 168px; padding: 12px; border: 1px solid #555; border-radius: 8px;
 background: #202020; color: #fff; box-shadow: 0 4px 20px #0005;
 display: grid; gap: 10px; font: 13px/1.3 system-ui,sans-serif;
}
.tutor-video-player .mlab-volume-popover input[data-plyr="volume"] {
 display: block !important; width: 100%; max-width: none; min-width: 0; margin: 0;
}
.tutor-video-player .mlab-volume-mute {
 padding: 6px 8px; border: 1px solid #777; border-radius: 4px;
 background: transparent; color: #fff; font: inherit; cursor: pointer;
}
.tutor-video-player .plyr.mlab-volume-active { overflow: visible; }
.tutor-video-player .plyr.mlab-volume-active .plyr__controls {
 opacity: 1 !important; transform: none !important; pointer-events: auto !important;
}
@media (max-width: 600px) and (orientation: portrait) {
 .tutor-video-player .plyr__controls { flex-wrap: wrap; gap: 4px; }
 .tutor-video-player .plyr__progress__container { order: -1; flex: 0 0 100%; margin: 0; }
 .tutor-video-player .plyr__time { margin-inline-start: auto; }
}

/* A phone in landscape has little vertical room. Keep navigation compact,
 * put controls under the picture and move the lesson footer below the player. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 991px) {
 body.single-lesson #ml-sirovine,
 body.single-lesson #ml-sale-space,
 body.single-lesson #pp-popup-tab { display: none !important; }
 .single-lesson .tutor-learning-area { --tutor-learning-header-height: 44px; }
 .single-lesson .tutor-learning-header { top: 0; height: 44px; padding: 4px 8px; }
 .single-lesson .tutor-learning-header-inner { height: 36px; padding: 0; }
 .single-lesson .tutor-learning-header-back,
 .single-lesson .tutor-learning-header-back a,
 .single-lesson .tutor-learning-header-toggle-mobile { height: 36px; width: 36px; }
 .single-lesson .tutor-learning-header-title { font-size: 16px; line-height: 20px; }
 .single-lesson .tutor-learning-area .tutor-learning-area-content { padding: 44px 8px 8px !important; }
 .single-lesson .tutor-learning-area .tutor-learning-area-container { max-width: none; padding: 0; }
 .single-lesson .tutor-video-player {
  aspect-ratio: auto;
  height: var(--mlab-video-landscape-height, calc(var(--mlab-video-viewport-height, 100dvh) - 72px));
  min-height: 120px;
 }
 .single-lesson .tutor-video-player > .plyr:not(.plyr--fullscreen-active) { display: flex; flex-direction: column; }
 .single-lesson .tutor-video-player .plyr:not(.plyr--fullscreen-active) > .plyr__video-wrapper {
  flex: 1 1 0; height: 0; min-height: 0;
 }
 .single-lesson .tutor-video-player .plyr:not(.plyr--fullscreen-active) > .plyr__controls {
  position: relative; inset: auto; order: 1; flex: 0 0 auto; width: 100%; align-self: stretch;
  padding: 6px 8px; background: #171717; color: #fff;
  opacity: 1 !important; transform: none !important; pointer-events: auto !important;
 }
 .single-lesson .tutor-learning-area-footer { position: static !important; margin-top: 8px; }
}

.tutor-video-player .mlab-volume-is-muted .icon--pressed { display: block !important; }
.tutor-video-player .mlab-volume-is-muted .icon--not-pressed { display: none !important; }
