.viewVideo {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-content: stretch;
    align-items: flex-start;
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: none;
}

.viewVideo.active {
    display: flex;
}

.mainContainer.editActive .viewVideo {
    border: 10px solid #FFFFFF;
    box-sizing: border-box;
}

.viewVideo .slideArea {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-content: stretch;
    align-items: flex-start;
    order: 0;
    flex: 1 1 auto;
    min-height: 0;
    align-self: auto;
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 0px;
    background: var(--primary-bg-color);
}

.viewVideo .slideArea.is-sliding {
    transition-property: margin-top;
    transition-duration: 200ms;
}

/* Player Container */

.playerContainer {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-content: stretch;
    align-items: flex-start;
    order: 0;
    flex: 1 1 auto;
    min-height: 0;
    align-self: auto;
    margin: 10px 0;
    z-index: 1;
}

.playerContainer.scrollFix {
    pointer-events: none;
}

.playerContainer .timeline {
    order: 0;
    flex: 0 1 6px;
    min-height: 6px;
    align-self: auto;
}

.playerContainer .timeline.editable {
    z-index: 3;
}

/* Autohide: overlay controls on top of the video so no empty space remains.
   Active in player mode and preview mode, but not in real edit modes.
   Classes are set on the target element (.frametrail-body), not body. */
.autohideControls .mainContainer:not([data-edit-mode="overlays"]):not([data-edit-mode="annotations"]):not([data-edit-mode="codesnippets"]):not([data-edit-mode="layout"]):not([data-edit-mode="chapters"]) .playerContainer .controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transition: visibility 0.4s, opacity 0.4s;
}

.autohideControls .mainContainer:not([data-edit-mode="overlays"]):not([data-edit-mode="annotations"]):not([data-edit-mode="codesnippets"]):not([data-edit-mode="layout"]):not([data-edit-mode="chapters"]) .playerContainer .playerProgress {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    width: 100%;
    transition: visibility 0.4s, opacity 0.4s;
}

/* Titlebar: only autohide when NOT in edit mode (not even preview) */
.autohideControls:has(.mainContainer:not(.editActive)) > .titlebar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--secondary-bg-color);
    transition: visibility 0.4s, opacity 0.4s;
}

.userinactive .mainContainer:not([data-edit-mode="overlays"]):not([data-edit-mode="annotations"]):not([data-edit-mode="codesnippets"]):not([data-edit-mode="layout"]):not([data-edit-mode="chapters"]) .playerContainer .controls,
.userinactive .mainContainer:not([data-edit-mode="overlays"]):not([data-edit-mode="annotations"]):not([data-edit-mode="codesnippets"]):not([data-edit-mode="layout"]):not([data-edit-mode="chapters"]) .playerContainer .playerProgress {
    display: block;
    visibility: hidden;
    opacity: 0;
    transition: visibility 1.5s, opacity 1.5s;
}

.userinactive:has(.mainContainer:not(.editActive)) > .titlebar {
    visibility: hidden;
    opacity: 0;
    transition: visibility 1.5s, opacity 1.5s;
}

/* Progress Bar */

.playerContainer .playerProgress {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
    height: 6px;
    background: var(--semi-transparent-fg-color);
    z-index: 101;
    pointer-events: all;
    overflow: visible;
    cursor: pointer;
}

.playerContainer .playerProgress::before {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: 0;
    right: 0;
}

.playerContainer.livestream .playerProgress {
    display: none !important;
}

.playerContainer .playerProgress .ui-slider-handle {
    position: absolute;
    top: 0;
    margin-left: -1px;
    height: 100%;
    width: 2px;
    background: var(--primary-fg-color);
    outline: none;
}

.playerContainer .playerProgress .ui-slider-handle.small {
    top: 0;
    height: 100%;
}

.playerContainer .playerProgress .ui-slider-range {
    position: absolute;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-fg-color);
    display: block;
    pointer-events: none;
}

.playerContainer .playerProgress:hover .ui-slider-handle {
    opacity: 1;
}

.playerContainer .playerProgress .ui-slider-handle-circle {
    position: absolute;
    left: -6.5px;
    top: -6px;
    width: 15px;
    height: 15px;
    margin-bottom: -15px;
    border-radius: 8px;
    background: var(--primary-fg-color);
    transition-property: transform;
    transition-duration: 300ms;
    z-index: 6;
}

.playerContainer .playerProgress .ui-slider-handle:hover .ui-slider-handle-circle, .playerContainer .playerProgress .ui-slider-handle:hover {
    background: var(--primary-fg-color);
}

.playerContainer .playerProgress .ui-slider-handle-circle:hover {
    transform: scale(1.2);
    cursor: pointer;
}


.playerContainer .playerProgress .ui-slider-handle-circle-inner {
    position: absolute;
    left: 4px;
    bottom: 4px;
    width: 7px;
    height: 7px;
    border-radius: 5px;
    background: var(--primary-bg-color);
}

.playerContainer .playerProgress .ui-slider-handle.highlight {
    opacity: 1;
    background: var(--primary-fg-color);
}

/* LayoutAreas (Top, Bottom, Left, Right) */

.areaTopContainer, .areaBottomContainer {
    position: relative;
    width: 100%;
    order: 0;
    flex: 0 1 auto;
    align-self: auto;
    background: transparent;
    transition: margin-top 500ms;
}

.areaLeftContainer, .areaRightContainer {
    position: relative;
    order: 0;
    align-self: stretch;
    background: var(--primary-bg-color);
}

.areaLeftContainer {
    border-right: 2px solid var(--primary-bg-color);
}

.areaRightContainer {
    border-left: 2px solid var(--primary-bg-color);
}

.areaTopDetails, .areaBottomDetails {
    position: relative;
    width: 100%;
    order: 0;
    flex: 0 0 0px;
    min-height: 0;
    align-self: auto;
    background: transparent;
    z-index: 2;
    overflow: hidden;
    visibility: hidden;
    transition: margin-top 500ms;
}

.viewVideo.slide-pos-top .areaTopDetails,
.viewVideo.slide-pos-bottom .areaBottomDetails {
    flex: 0 1 clamp(200px, calc(var(--ft-height, 100vh) * 0.6 - 40px), 450px);
    min-height: clamp(200px, calc(var(--ft-height, 100vh) * 0.6 - 40px), 450px);
    visibility: visible;
}

/* LayoutArea Sizes */

.areaTopContainer, .areaBottomContainer {
    min-height: 0px;
}

.areaTopContainer[data-size="small"], .areaBottomContainer[data-size="small"] {
    flex-basis: 76px;
    min-height: 76px;
}

.areaTopContainer[data-size="medium"], .areaBottomContainer[data-size="medium"] {
    flex-basis: 156px;
    min-height: 156px;
}

.areaTopContainer[data-size="large"], .areaBottomContainer[data-size="large"] {
    flex-basis: clamp(200px, calc(var(--ft-height, 100vh) * 0.6 - 40px), 400px);
    min-height: clamp(200px, calc(var(--ft-height, 100vh) * 0.6 - 40px), 400px);
}

.areaLeftContainer, .areaRightContainer {
    flex: 0 0 0px;
    min-width: 0px;
}

.areaLeftContainer[data-size="small"], .areaRightContainer[data-size="small"] {
    flex: 0 0 88px;
    min-width: 88px;
}

.areaLeftContainer[data-size="medium"], .areaRightContainer[data-size="medium"] {
    flex: 0 0 clamp(300px, calc(var(--ft-width, 100vw) * 0.25), 450px);
    min-width: clamp(300px, calc(var(--ft-width, 100vw) * 0.25), 450px);
}

.areaLeftContainer[data-size="large"], .areaRightContainer[data-size="large"] {
    flex: 0 0 clamp(350px, calc(var(--ft-width, 100vw) * 0.35), 650px);
    min-width: clamp(350px, calc(var(--ft-width, 100vw) * 0.35), 650px);
}

/* Hidden tabs: reduce area size by 36px (tab bar height) */

.areaTopContainer.hiddenTabs[data-size="small"], .areaBottomContainer.hiddenTabs[data-size="small"] {
    flex-basis: 40px;
    min-height: 40px;
}

.areaTopContainer.hiddenTabs[data-size="medium"], .areaBottomContainer.hiddenTabs[data-size="medium"] {
    flex-basis: 120px;
    min-height: 120px;
}

.areaTopContainer.hiddenTabs[data-size="large"], .areaBottomContainer.hiddenTabs[data-size="large"] {
    flex-basis: clamp(164px, calc(var(--ft-height, 100vh) * 0.6 - 76px), 364px);
    min-height: clamp(164px, calc(var(--ft-height, 100vh) * 0.6 - 76px), 364px);
}

.areaLeftContainer.hiddenTabs[data-size="small"], .areaRightContainer.hiddenTabs[data-size="small"] {
    flex: 0 0 52px;
    min-width: 52px;
}

.areaLeftContainer.hiddenTabs[data-size="medium"], .areaRightContainer.hiddenTabs[data-size="medium"] {
    flex: 0 0 clamp(264px, calc(var(--ft-width, 100vw) * 0.25 - 36px), 414px);
    min-width: clamp(264px, calc(var(--ft-width, 100vw) * 0.25 - 36px), 414px);
}

.areaLeftContainer.hiddenTabs[data-size="large"], .areaRightContainer.hiddenTabs[data-size="large"] {
    flex: 0 0 clamp(314px, calc(var(--ft-width, 100vw) * 0.35 - 36px), 614px);
    min-width: clamp(314px, calc(var(--ft-width, 100vw) * 0.35 - 36px), 614px);
}

.areaTopContainer.closed, .areaBottomContainer.closed {
    min-height: 36px !important;
    flex-basis: 36px !important;
}

.areaTopContainer.closed.hiddenTabs, .areaBottomContainer.closed.hiddenTabs {
    min-height: 0px !important;
    flex-basis: 0px !important;
    overflow: hidden;
}

.areaLeftContainer.closed, .areaRightContainer.closed {
    flex: 0 0 36px !important;
    min-width: 36px !important;
}

.areaLeftContainer.closed.hiddenTabs, .areaRightContainer.closed.hiddenTabs {
    flex: 0 0 0px !important;
    min-width: 0px !important;
    overflow: hidden;
}

/* Annotations */

.playerContainer .annotationTimeline {
    position: relative;
    width: 100%;
    height: 3px;
    margin-top: 40px;
    min-height: 3px;
    flex-basis: 3px;
    background: var(--secondary-bg-color);
    z-index: 2;
    pointer-events: none;
    display: none;
}

/* Overlays */

.playerContainer .overlayTimeline {
    position: relative;
    width: 100%;
    height: 3px;
    min-height: 3px;
    flex-basis: 3px;
    background: var(--secondary-bg-color);
    z-index: 2;
    pointer-events: none;
    display: none;
}

/* Code Snippets */

.playerContainer .codeSnippetTimeline {
    position: relative;
    width: 100%;
    height: 0px;
    background: var(--secondary-bg-color);
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    display: none;
}

/* Show each timeline when it has the editable class (set by enter*Mode functions) */
.playerContainer .annotationTimeline.editable,
.playerContainer .overlayTimeline.editable,
.playerContainer .codeSnippetTimeline.editable {
    display: block;
    overflow: visible;
}

/* Only show each timeline in its corresponding edit mode */
.editActive[data-edit-mode="overlays"] .playerContainer .annotationTimeline,
.editActive[data-edit-mode="overlays"] .playerContainer .codeSnippetTimeline,
.editActive[data-edit-mode="codesnippets"] .playerContainer .annotationTimeline,
.editActive[data-edit-mode="codesnippets"] .playerContainer .overlayTimeline,
.editActive[data-edit-mode="annotations"] .playerContainer .overlayTimeline,
.editActive[data-edit-mode="annotations"] .playerContainer .codeSnippetTimeline {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    flex-basis: 0 !important;
    overflow: hidden !important;
}

/* Other Users Container (annotation timelines from other users) */

.otherUsersContainer {
    display: none;
    width: 100%;
    flex: 0 0 auto;
    max-height: 180px;
    padding-top: 10px;
    background: var(--primary-fg-color);
    border-top: 1px solid var(--secondary-bg-color);
    flex-direction: column;
    height: auto;
    overflow: auto;
}

.otherUsersContainer > .timelineList {
    flex: 0 0 auto;
    height: auto;
}

.otherUsersContainer.active {
    display: flex;
}

.otherUsersContainer .timelineList .timelineZoomWrapper {
    flex: 0 0 auto;
    height: auto;
}

/* Controls */

.playerContainer .controls {
    position: relative;
    order: 0;
    flex: 0 1 40px;
    min-height: 40px;
    align-self: auto;
    width: 100%;
    background: var(--secondary-bg-color);
    z-index: 3;
    pointer-events: none;
}

.playerContainer .controls .playerControl {
    float: left;
    position: relative;
    height: 40px;
    width: 40px;
    border: none;
    background-color: transparent;
    pointer-events: all;
    color: var(--primary-fg-color);
    padding: 0;
    opacity: .9;
}

.playerContainer .controls .playerControl:hover {
    opacity: 1;
    cursor: pointer;
}

.playerContainer .controls .playerControl [class^="icon-"]::before, .playerContainer .controls .playerControl [class*=" icon-"]::before {
    font-size: 19px;
    margin: 0px;
    width: 40px;
    line-height: 40px;
}

.playerContainer .controls .leftControlPanel {
    float: left;
}

.playerContainer .controls .rightControlPanel {
    float: right;
}

.playerContainer .controls .playerControl.playButton [class^="icon-"]::before, .playerContainer .controls .playerControl.playButton [class*=" icon-"]::before {
    font-size: 30px;
    margin-top: -1px;
    margin-left: 5px;
}

.playerContainer .controls .playerControl.playButton.playing [class^="icon-"]::before, .playerContainer .controls .playerControl.playButton.playing [class*=" icon-"]::before {
    content: "\e8a9";
}

.playerContainer .controls .playerControl.annotationSearchButton {
    display: none;
}

.playerContainer .controls .playerControl.annotationSearchButton.active {
    opacity: 1;
}

.playerContainer .controls .playerControl.contextButton .contextButtonContainer {
    background: var(--primary-bg-color);
    display: none;
    height: auto;
    position: absolute;
    right: 4px;
    font-size: 12px;
    color: var(--primary-fg-color);
    bottom: 38px;
    width: 315px;
    border: 5px solid var(--primary-bg-color);
    box-shadow: 0 0 3px 2px #000;
    overflow: hidden;
    cursor: default;
}

.playerContainer .controls .playerControl.contextButton.active .contextButtonContainer {
    display: block;
}

.playerContainer .controls .playerControl.captionsButton.active [class^="icon-"]::before, .playerContainer .controls .playerControl.captionsButton.active [class*=" icon-"]::before {
    content: "\e8e6";
}

.playerContainer .controls .playerControl.captionsButton .captionSelectContainer {
    background: var(--primary-bg-color);
    display: none;
    font-size: 12px;
    color: var(--primary-fg-color);
    border: 5px solid var(--primary-bg-color);
    box-shadow: 0 0 3px 2px #000;
    height: auto;
    min-height: 10px;
    position: absolute;
    right: 4px;
    bottom: 46px;
    width: 90px;
    cursor: default;
}

.playerContainer .controls .playerControl.captionsButton .captionSelectContainer.active {
    display: block;
}

.playerContainer .controls .playerControl.captionsButton .captionSelectContainer .captionSelect {
    padding: 3px 5px;
    background: var(--semi-transparent-fg-color);
    border-bottom: 2px solid var(--primary-bg-color);
    color: var(--primary-fg-color);
    font-weight: 100;
    opacity: 0.85;
    cursor: pointer;
    transition: opacity 150ms, background-color 150ms;
}

.playerContainer .controls .playerControl.captionsButton .captionSelectContainer .captionSelect:hover {
    opacity: 1;
}

.playerContainer .controls .playerControl.captionsButton .captionSelectContainer .captionSelect.active {
    background: var(--secondary-fg-color);
    color: var(--primary-bg-color);
    opacity: 1;
}

/* Scrub Preview */

.playerProgress .scrubPreview {
    position: absolute;
    display: none;
    bottom: 16px;
    width: 160px;
    height: 90px;
    margin-left: -80px;
    background-color: #000;
    background-repeat: no-repeat;
    border: 2px solid var(--primary-bg-color);
    border-radius: 3px;
    box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 100001;
}

.playerProgress .scrubPreview.active {
    display: block;
}

.playerProgress .scrubPreview .scrubPreviewTime {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 4px;
    font-size: 11px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 2px;
}

.playerProgress .scrubPreview .scrubPreviewChapter {
    display: none;
    position: absolute;
    bottom: 100%;
    margin-bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 220px;
    padding: 2px 6px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 2px;
}

.playerProgress .scrubPreview .scrubPreviewChapter.active {
    display: block;
}

/* Chapters Button & Panel */

.playerContainer .controls .playerControl.chapterButton .chapterSelectContainer {
    background: var(--primary-bg-color);
    display: none;
    font-size: 12px;
    color: var(--primary-fg-color);
    border: 5px solid var(--primary-bg-color);
    box-shadow: 0 0 3px 2px #000;
    height: auto;
    min-height: 10px;
    max-height: 260px;
    overflow-y: auto;
    position: absolute;
    left: 4px;
    bottom: 46px;
    max-width: 400px;
    cursor: default;
}

.playerContainer .controls .playerControl.chapterButton .chapterSelectContainer.active {
    display: block;
}

.playerContainer .controls .playerControl.chapterButton .chapterSelectContainer .chapterSelect {
    padding: 3px 6px;
    background: var(--semi-transparent-fg-color);
    color: var(--primary-fg-color);
    font-weight: 100;
    opacity: 0.85;
    cursor: pointer;
    text-align: left;
    transition: opacity 150ms, background-color 150ms;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playerContainer .controls .playerControl.chapterButton .chapterSelectContainer .chapterSelect:hover {
    opacity: 1;
}

.playerContainer .controls .playerControl.chapterButton .chapterSelectContainer .chapterSelect.current {
    opacity: 1;
    border-left: 3px solid var(--primary-fg-color);
    padding-left: 3px;
    background: var(--semi-transparent-fg-highlight-color);
}

.playerContainer .controls .playerControl.chapterButton .chapterSelectContainer .chapterSelect .chapterSelectTime {
    display: inline-block;
    min-width: 42px;
    margin-right: 6px;
    opacity: 0.7;
}

.playerProgress .chapterMarker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--primary-fg-color);
    opacity: 0.8;
    z-index: 2;
}

/* Layout Areas Button & Panel */

.playerContainer .controls .playerControl.layoutAreasButton .layoutAreasPanel {
    background: var(--primary-bg-color);
    display: none;
    color: var(--primary-fg-color);
    border: 5px solid var(--primary-bg-color);
    box-shadow: 0 0 3px 2px #000;
    position: absolute;
    right: 4px;
    bottom: 46px;
    width: 180px;
    cursor: default;
}

.playerContainer .controls .playerControl.layoutAreasButton .layoutAreasPanel.active {
    display: block;
}

.playerContainer .controls .layoutAreasSchematic {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 4px;
}

.playerContainer .controls .layoutAreasSchematic .schematicMiddleRow {
    display: flex;
    flex-direction: row;
    gap: 3px;
    min-height: 50px;
}

.playerContainer .controls .layoutAreasSchematic .schematicCenter {
    flex: 1 1 auto;
    background: transparent;
    min-height: 50px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playerContainer .controls .layoutAreasSchematic .schematicCenter .icon-play-1::before {
    font-size: 18px !important;
    margin: 0;
    width: auto;
    line-height: normal;
    color: var(--secondary-fg-color);
    opacity: 0.4;
}

.playerContainer .controls .layoutAreasSchematic .schematicArea {
    background: var(--semi-transparent-fg-color);
    border: 1px dashed var(--primary-fg-color);
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 150ms, background-color 150ms;
}

.playerContainer .controls .layoutAreasSchematic .schematicArea:hover {
    opacity: 0.85;
}

.playerContainer .controls .layoutAreasSchematic .schematicArea.active {
    background: var(--secondary-fg-color);
    opacity: 1;
    border-color: transparent;
}

.playerContainer .controls .layoutAreasSchematic .schematicAreaTop,
.playerContainer .controls .layoutAreasSchematic .schematicAreaBottom {
    height: 20px;
    width: 100%;
}

.playerContainer .controls .layoutAreasSchematic .schematicAreaTop[data-size="medium"],
.playerContainer .controls .layoutAreasSchematic .schematicAreaBottom[data-size="medium"] {
    height: 30px;
}

.playerContainer .controls .layoutAreasSchematic .schematicAreaTop[data-size="large"],
.playerContainer .controls .layoutAreasSchematic .schematicAreaBottom[data-size="large"] {
    height: 45px;
}

.playerContainer .controls .layoutAreasSchematic .schematicAreaLeft,
.playerContainer .controls .layoutAreasSchematic .schematicAreaRight {
    flex: 0 0 30px;
    min-height: 50px;
}

.playerContainer .controls .layoutAreasSchematic .schematicAreaLeft[data-size="medium"],
.playerContainer .controls .layoutAreasSchematic .schematicAreaRight[data-size="medium"] {
    flex: 0 0 40px;
}

.playerContainer .controls .layoutAreasSchematic .schematicAreaLeft[data-size="large"],
.playerContainer .controls .layoutAreasSchematic .schematicAreaRight[data-size="large"] {
    flex: 0 0 55px;
}

.playerContainer .controls .playerControl.volumeButton.active [class^="icon-"]::before, .playerContainer .controls .playerControl.volumeButton.active [class*=" icon-"]::before {
    content: "\e831";
}

.playerContainer .controls .playerControl.fullscreenButton.active [class^="icon-"]::before, .playerContainer .controls .playerControl.fullscreenButton.active [class*=" icon-"]::before {
    content: "\e836";
}

.playerContainer .controls .playerControl.timeDisplay, 
.playerContainer .controls .playerControl.timeDisplayFull {
    color: var(--primary-fg-color);
    height: 30px;
    line-height: 16px;
    padding: 4px 10px;
    pointer-events: none;
    width: auto;
}

.playerContainer .controls .playerControl.timeDisplay .totalDuration, 
.playerContainer .controls .playerControl.timeDisplayFull .totalDurationFull {
    color: #acacb3;
}

.playerContainer .controls .playerControl.timeDisplayFull {
    display: none;
    border-left: 1px solid #acacb3;
    padding-left: 8px;
}

.playerContainer.livestream .controls .playerControl.timeDisplay, 
.playerContainer.livestream .controls .playerControl.timeDisplayFull,
.playerContainer.livestream .controls .playerControl.timeDisplay .totalDuration, 
.playerContainer.livestream .controls .playerControl.timeDisplayFull .totalDurationFull {
    display: none !important;
}

/* Hypervideo Container */

.hypervideoContainer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    order: 0;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    align-self: auto;
    overflow: hidden;
    background: var(--primary-bg-color);
    z-index: 2;
}

.hypervideoContainer .infoAreaRight {
    position: relative;
    order: 0;
    flex: 0 0 400px;
    min-width: 400px;
    align-self: stretch;
    display: none;
    flex-direction: column;
}

.hypervideoContainer .infoAreaRight.active {
    display: flex;
}

.editActive[data-edit-mode="overlays"] .hypervideoContainer .infoAreaRight, .editActive[data-edit-mode="codesnippets"] .hypervideoContainer .infoAreaRight, .editActive[data-edit-mode="annotations"] .hypervideoContainer .infoAreaRight, .editActive[data-edit-mode="chapters"] .hypervideoContainer .infoAreaRight {
    flex: 0 0 580px;
}

/* InfoAreaRight Tab Bar */

.infoAreaRightTabBar {
    display: flex;
    flex: 0 0 auto;
    background: var(--primary-fg-color);
}

.infoAreaRightTab {
    flex: 1 1 0;
    padding: 8px 12px;
    text-align: center;
    color: var(--primary-bg-color);
    cursor: pointer;
    user-select: none;
    border-top: 1px solid var(--secondary-fg-color);
    border-left: 1px solid var(--secondary-fg-color);
    border-right: 1px solid var(--secondary-fg-color);
    border-radius: 3px 3px 0 0;
    margin: 0 10px;
    position: relative;
}

.infoAreaRightTab:hover {
    color: var(--primary-bg-color);
}

.infoAreaRightTab.active {
    border-color: var(--secondary-bg-color);
    color: var(--primary-bg-color);
    background: var(--primary-fg-color);
}

.infoAreaRightTab.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    height: 3px;
    background: var(--primary-fg-color);
    width: 100%;
    display: block;
    left: 0px;
    z-index: 4;
}

.infoAreaRightTabContent {
    display: none;
    flex: 1 1 auto;
    overflow: hidden;
    position: relative;
    border-top: 1px solid var(--secondary-bg-color);
    border-right: 1px solid var(--secondary-bg-color);
    background: var(--primary-fg-color);
}

.infoAreaRightTabContent.active {
    display: flex;
    flex-direction: column;
}

/* EditingOptions (inside infoAreaRight tab) */

.editingOptions {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--primary-bg-color);
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.editingOptions .ui-tabs {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.editingOptions .ui-tabs-panel:has(> .resourceThumb) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    align-content: start;
    gap: 12px;
    box-sizing: border-box;
}

.editingOptions .resourceThumb {
    float: none;
    position: relative;
    width: auto;
    height: 80px;
    margin: 0;
}

.editingOptions .resourceThumb .resourceTitle {
    display: block;
}

.editingOptions .executeEventCode {
    position: absolute;
    right: 12px;
    bottom: 18px;
    background-color: #eaeaef;
}

/* Edit Properties Container */

.hypervideoContainer .infoAreaRight .editPropertiesContainer {
    flex: 1 1 auto;
    padding: 10px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    background-repeat: no-repeat;
    background-position: center center;
    color: var(--primary-bg-color);
    display: none;
    position: relative;
}

.hypervideoContainer .infoAreaRight .editPropertiesContainer.active {
    display: flex;
    flex-direction: column;
}

/* Video Container */

.hypervideoContainer .videoContainer {
    position: relative;
    order: 0;
    flex: 1 1 auto;
    align-self: stretch;
    background: var(--video-background-color);
    border-bottom: 0px solid var(--primary-bg-color);
    overflow: hidden;
    transition: width 200ms linear;
}

.hypervideoContainer .videoContainer .hypervideo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    overflow: hidden;
    transform: translate(-50%, -50%);
    transition: width 200ms linear, height 200ms linear;
}

.hypervideoContainer .videoContainer .hypervideo video.video {
    display: block;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    will-change: filter;
    width: 1920px;
    height: 1080px;
    aspect-ratio: 16 / 9;
    background: var(--video-background-color);
    filter: none;
    transition-property: filter;
    transition-duration: 1s;

}

.hypervideoContainer .videoContainer .hypervideo video.video.nocolor {
    filter: grayscale(90%) brightness(0.5);
}

.hypervideoContainer .videoContainer .hypervideo video.video.dark {
    filter: grayscale(90%) brightness(0.2);
}

.hypervideoContainer .videoContainer .hypervideo .player_youtube,
.hypervideoContainer .videoContainer .hypervideo .player_vimeo {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
}

.hypervideoContainer .videoContainer .hypervideo .overlayContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hypervideoContainer .videoContainer .hypervideo .captionContainer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: rgba(0, 0, 0, .3);
    overflow: hidden;
}

/* Video UI */

.hypervideoContainer .videoContainer .videoStartOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(0, 0, 0, .4);
    transition-property: background;
    transition-duration: 600ms;*/
    z-index: 29;
}

.hypervideoContainer .videoContainer .videoStartOverlay:hover {
    cursor: pointer;
    /*background: rgba(0, 0, 0, .6);*/
}

.hypervideoContainer .videoContainer .videoStartOverlay .playButtonBig {
    --play-button-size: 80px;
    background-color: var(--primary-bg-color);
    border: none;
    border-radius: 50%;
    height: var(--play-button-size);
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    position: absolute;
    width: var(--play-button-size);
    z-index: 29;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hypervideoContainer .videoContainer .videoStartOverlay .playButtonBig [class^="icon-"]::before, .hypervideoContainer .videoContainer .videoStartOverlay .playButtonBig [class*=" icon-"]::before {
    transition-duration: 600ms;
    transition-property: opacity;
    color: var(--primary-fg-color);
    font-size: calc(var(--play-button-size) * 1.075);
    opacity: .7;
}

.hypervideoContainer .videoContainer .videoStartOverlay:hover .playButtonBig [class^="icon-"]::before, .hypervideoContainer .videoContainer .videoStartOverlay:hover .playButtonBig [class*=" icon-"]::before {
    opacity: 1;
}

.hypervideoContainer .videoContainer .expandButton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s ease;
    z-index: 30;
}

.hypervideoContainer .videoContainer:hover .expandButton {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.2);
}

.hypervideoContainer .videoContainer .expandButton .expandLabel {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 40px;
    margin-left: -60px;
    margin-top: -20px;
    line-height: 40px;
    text-align: center;
    color: #333;
    background: transparent;
    transform: scale(0.3);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}

.hypervideoContainer .videoContainer:hover .expandButton .expandLabel {
    transform: scale(1);
    opacity: 1;
}

.hypervideoContainer .videoContainer .expandButton [class^="icon-"]::before, .hypervideoContainer .videoContainer .expandButton [class*=" icon-"]::before {
    font-size: 40px;
    color: var(--primary-fg-color);
    text-shadow: 1px 1px 2px var(--primary-bg-color);
    margin-left: -9px;
}


.hypervideoContainer .videoContainer .workingIndicator {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin-top: -30px;
    margin-left: -30px;
    display: none;
}

/* ===========================================
   EDITING UI
   =========================================== */

.playerContainer .annotationTimeline.editable, .playerContainer .overlayTimeline.editable, .playerContainer .codeSnippetTimeline.editable, .playerContainer .audioTimeline.editable {
    min-height: 20px;
    height: 40px;
    background-color: transparent;
    box-shadow: 0 0 3px 2px #303030 inset;
    background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.3) -1px, rgba(255,255,255,0.3) 1px, transparent 1px, transparent 3px);
    pointer-events: auto;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Timeline Element - Visual Identification (icon + label in edit mode) */

.playerContainer .editable .timelineElement {
    display: flex;
    flex-direction: row;
    align-items: center;
    box-sizing: border-box;
    overflow: visible;
    height: 20px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.playerContainer .editable .timelineElement.brushed {

}

/* Hide icon/label in non-edit mode (timelines are only 6px tall) */
.playerContainer .timelineElement .timelineElementIcon,
.playerContainer .timelineElement .timelineElementLabel {
    display: none;
}

/* Hide preview inside timeline (JS moves it to body on hover to escape overflow clipping) */
.playerContainer .timelineElement .previewWrapper {
    display: none !important;
}
.playerContainer .timelineElement:hover .previewWrapper {
    display: none !important;
}

.playerContainer .editable .timelineElement .timelineElementIcon {
    flex: 0 0 20px;
    width: 20px;
    padding-left: 4px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 10px;
    border-right: 1px solid var(--secondary-bg-color);
}

.playerContainer .editable .timelineElement .timelineElementIcon [class^="icon-"]::before,
.playerContainer .editable .timelineElement .timelineElementIcon [class*=" icon-"]::before {
    font-size: 13px;
    margin: 0;
}

.playerContainer .editable .timelineElement .timelineElementLabel {
    flex: 1 1 auto;
    min-width: 0;
    max-width: max(0px, calc(100% - 20px));
    box-sizing: border-box;
    padding: 0 0 0 4px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Code Snippet timeline element styles */

.playerContainer .codeSnippetTimeline.editable .timelineElement {
    width: 20px;
    margin-left: -10px;
}

.playerContainer .codeSnippetTimeline.editable .timelineElement:before {
    border-top: 4px solid rgba(160, 170, 175, 0.8);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    content: "";
    left: 5px;
    position: absolute;
    bottom: -4px;
    width: 2px;
}

.playerContainer .codeSnippetTimeline.editable .timelineElement:after {
    border-bottom: 4px solid rgba(160, 170, 175, 0.8);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    content: "";
    left: 5px;
    position: absolute;
    top: -4px;
    width: 2px;
}

.playerContainer .codeSnippetTimeline.editable .timelineElement.brushed:before, .playerContainer .codeSnippetTimeline.editable .timelineElement.brushed:after {
    border-top-color: rgba(160, 163, 163, 1);
    border-bottom-color: rgba(160, 163, 163, 1);
}

.playerContainer .codeSnippetTimeline.editable .timelineElement.highlighted:before, .playerContainer .codeSnippetTimeline.editable .timelineElement.highlighted:after {
    border-top-color: #f8f8f8 !important;
    border-bottom-color: #f8f8f8 !important;
}

/* ===========================================
   Timeline Scroller
   =========================================== */

/* Shared zoom/scroll transition for all timeline scrollers and minimap viewport */
.timelineScroller,
.timelineZoomScroller,
.timelineProgressWrapper,
.timelineMinimapViewport {
    transition-property: width;
    transition-duration: 300ms;
}

.playerContainer .timelineScroller {
    position: relative;
    height: 100%;
    min-height: 100%;
    min-width: 100%;
    touch-action: none;
}

.playerContainer .timelineRuler {
    touch-action: none;
}

/* ===========================================
   Timeline Playhead
   =========================================== */

.playerContainer .timelinePlayhead {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--primary-fg-color);
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
}

/* ===========================================
   Timeline Controls Container
   =========================================== */

.playerContainer .timelineControlsContainer {
    width: 100%;
    background-color: var(--secondary-bg-color);
    border-bottom: 1px solid var(--primary-bg-color);
    box-sizing: border-box;
}

.playerContainer .timelineZoomControlsWrapper {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* ===========================================
   Timeline Zoom Controls
   =========================================== */

.playerContainer .timelineZoomControls {
    display: flex;
    gap: 4px;
}

.playerContainer .timelineZoomPreset {
    padding: 3px 10px;
    font-size: 11px;
    min-width: 40px;
    text-align: center;
    color: #acacb3;
}

.playerContainer .timelineZoomPreset.active {
    color: var(--primary-fg-color);
}

/* ===========================================
   Timeline Ruler
   =========================================== */

.playerContainer .timelineRulerWrapper {
    overflow: hidden;
}

.playerContainer .timelineRuler {
    height: 18px;
    background-color: rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    overflow-y: hidden;
    cursor: pointer;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.playerContainer .timelineRuler::-webkit-scrollbar {
    display: none;
}

.playerContainer .timelineRulerScroller {
    position: relative;
    height: 100%;
    min-width: 100%;
}

.playerContainer .timelineRulerMarker {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: var(--secondary-fg-color);
}

.playerContainer .timelineRulerMarker:hover {
    background-color: var(--primary-fg-color);
}

.playerContainer .timelineRulerLabel {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 10px;
    color: var(--secondary-fg-color);
    white-space: nowrap;
    pointer-events: none;
}

.playerContainer .timelineRulerMarker:hover .timelineRulerLabel {
    color: var(--primary-fg-color);
}

/* ===========================================
   Timeline Minimap
   =========================================== */

.playerContainer .timelineMinimapWrapper {
    padding: 4px 8px;
}

.playerContainer .timelineMinimap {
    position: relative;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.playerContainer .timelineMinimapTrack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.playerContainer .timelineMinimapItem {
    position: absolute;
    height: 4px;
    margin-bottom: 3px;
    background-color: rgba(160, 163, 163, 0.6);
    min-width: 2px;
    border-radius: 1px;
}

.playerContainer .timelineMinimapViewport {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--secondary-fg-color);
    border-radius: 2px;
    box-sizing: border-box;
    cursor: ew-resize;
    min-width: 20px;
}

.playerContainer .timelineMinimapViewport:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Subtitles Settings */

.subtitlesSettingsWrapper {

}

.subtitlesSettingsWrapper .subtitlesPlus,  .subtitlesSettingsWrapper .subtitlesRemove, .subtitlesSettingsWrapper .subtitlesDelete {
    padding: 1px 2px;
    font-size: 12px;
    min-width: 24px;
    margin: 4px 4px 0px 4px;
    text-align: center;
}

.subtitlesSettingsWrapper .subtitlesItem, .subtitlesSettingsWrapper .existingSubtitlesItem {
    margin: 4px 10px 8px 0;
    display: inline-block;
}

.subtitlesSettingsWrapper .subtitlesItem, .subtitlesSettingsWrapper .existingSubtitlesItem > span {
    font-size: 12px;
    padding: 0 2px;
}

.subtitlesSettingsWrapper .existingSubtitlesItem > span {
    color: var(--primary-fg-color);
    background: var(--primary-bg-color);
    border: 3px solid var(--primary-bg-color);
    display: inline-block;
    width: auto;
}

.subtitlesSettingsWrapper .subtitlesItem .subtitlesTmpKeySetter {
    width: 85px;
    padding: 0;
    margin-right: 6px;
}

.subtitlesSettingsWrapper .subtitlesItem input[type="file"] {
    width: 200px;
}

/* Hypervideo Layout Container */

.hypervideoLayoutContainer {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 2;
    display: none;
}

.hypervideoLayoutContainer.active {
    display: block;
}

/* Prevent detail-area and top/bottom large collectionElements from overflowing the container.
 * Their parent (.contentViewDetailsContents) is a mega-wide slider, so
 * max-width: 100% is meaningless — we cap against --ft-width instead. */
.areaTopDetails .collectionElement,
.areaBottomDetails .collectionElement, 
.layoutArea[data-area="areaBottom"][data-size="large"] .collectionElement, 
.layoutArea[data-area="areaTop"][data-size="large"] .collectionElement {
    max-width: calc(var(--ft-width, 100vw) - 40px);
}

/* Container Queries — collectionElement widths respond to the .mainContainer
 * height (ft-main) rather than the viewport, so they work correctly when
 * FrameTrail is embedded in a container smaller than the browser window. */

@container ft-main (min-height: 920px) {
    .areaBottomDetails .collectionElement, .areaTopDetails .collectionElement, .areaTopContainer[data-size="large"] .collectionElement, .areaBottomContainer[data-size="large"] .collectionElement {
        width: 700px;
    }
}

@container ft-main (min-height: 820px) and (max-height: 920px) {
    .areaBottomDetails .collectionElement, .areaTopDetails .collectionElement, .areaTopContainer[data-size="large"] .collectionElement, .areaBottomContainer[data-size="large"] .collectionElement {
        width: 520px;
    }
}

@container ft-main (min-height: 680px) and (max-height: 820px) {
    .areaBottomDetails .collectionElement, .areaTopDetails .collectionElement, .areaTopContainer[data-size="large"] .collectionElement, .areaBottomContainer[data-size="large"] .collectionElement {
        width: 380px;
    }
}

@container ft-main (min-height: 540px) and (max-height: 680px) {
    .areaBottomDetails .collectionElement, .areaTopDetails .collectionElement, .areaTopContainer[data-size="large"] .collectionElement, .areaBottomContainer[data-size="large"] .collectionElement {
        width: 350px;
    }
}

@container ft-main (min-height: 400px) and (max-height: 540px) {
    .areaBottomDetails .collectionElement, .areaTopDetails .collectionElement, .areaTopContainer[data-size="large"] .collectionElement, .areaBottomContainer[data-size="large"] .collectionElement {
        width: 320px;
    }
}

@container ft-main (max-height: 400px) {
    .areaBottomDetails .collectionElement, .areaTopDetails .collectionElement, .areaTopContainer[data-size="large"] .collectionElement, .areaBottomContainer[data-size="large"] .collectionElement {
        width: 300px;
    }
}

/* Narrow container layout: stack side areas above/below the video.
   Uses container query on ft-root so it responds to the FrameTrail
   container width, not the browser viewport. Only affects player mode
   (edit mode sets its own layout via the editActive branch in JS). */

@container ft-root (max-width: 768px) {
    .hypervideoContainer {
        flex-wrap: wrap;
    }

    .areaLeftContainer {
        order: -1;
        flex: 0 0 100% !important;
        min-width: 100% !important;
        border-right: none;
        border-bottom: 2px solid var(--primary-bg-color);
    }

    .areaRightContainer {
        order: 1;
        flex: 0 0 100% !important;
        min-width: 100% !important;
        border-left: none;
        border-top: 2px solid var(--primary-bg-color);
    }

    .areaLeftContainer .layoutAreaToggleCloseButton,
    .areaRightContainer .layoutAreaToggleCloseButton {
        display: none !important;
    }

    .areaLeftContainer.closed, .areaRightContainer.closed {
        flex: 0 0 36px !important;
        min-width: 0 !important;
        min-height: 36px;
    }

    .areaLeftContainer.closed.hiddenTabs, .areaRightContainer.closed.hiddenTabs {
        flex: 0 0 0px !important;
        min-height: 0;
        overflow: hidden;
    }

    .startEditButton {
        display: none !important;
    }

    .videoContainer {
        order: 0;
        flex: 1 1 100%;
        width: 100%;
    }

    .areaTopContainer[data-size="large"], 
    .areaBTopContainer.hiddenTabs[data-size="large"],
    .areaBottomContainer[data-size="large"],
    .areaBottomContainer.hiddenTabs[data-size="large"] {
        flex-basis: clamp(200px, calc(var(--ft-height, 100vh) * 0.6 - 40px), 300px);
        min-height: clamp(200px, calc(var(--ft-height, 100vh) * 0.6 - 40px), 300px);
    }

    .viewVideo.slide-pos-top .areaTopDetails,
    .viewVideo.slide-pos-bottom .areaBottomDetails {
        flex: 0 1 clamp(200px, calc(var(--ft-height, 100vh) * 0.6 - 40px), 350px);
        min-height: clamp(200px, calc(var(--ft-height, 100vh) * 0.6 - 40px), 350px);
    }

    .hypervideoContainer .videoContainer .videoStartOverlay .playButtonBig {
        --play-button-size: 50px;
    }

    /* Layout areas panel: match stacked layout */

    .playerContainer .controls .playerControl.layoutAreasButton .layoutAreasPanel {
        width: 100px;
    }

    .playerContainer .controls .layoutAreasSchematic .schematicMiddleRow {
        flex-direction: column;
        min-height: 30px;
    }

    .playerContainer .controls .layoutAreasSchematic .schematicAreaLeft,
    .playerContainer .controls .layoutAreasSchematic .schematicAreaRight {
        flex: 0 0 auto;
        width: 100%;
        height: 16px;
        min-height: 0;
    }

    .playerContainer .controls .layoutAreasSchematic .schematicAreaTop,
    .playerContainer .controls .layoutAreasSchematic .schematicAreaBottom,
    .playerContainer .controls .layoutAreasSchematic .schematicAreaLeft,
    .playerContainer .controls .layoutAreasSchematic .schematicAreaRight {
        height: 16px;
    }

    .playerContainer .controls .layoutAreasSchematic .schematicAreaTop[data-size="medium"],
    .playerContainer .controls .layoutAreasSchematic .schematicAreaBottom[data-size="medium"],
    .playerContainer .controls .layoutAreasSchematic .schematicAreaLeft[data-size="medium"],
    .playerContainer .controls .layoutAreasSchematic .schematicAreaRight[data-size="medium"] {
        height: 35px;
    }

    .playerContainer .controls .layoutAreasSchematic .schematicAreaTop[data-size="large"],
    .playerContainer .controls .layoutAreasSchematic .schematicAreaBottom[data-size="large"],
    .playerContainer .controls .layoutAreasSchematic .schematicAreaLeft[data-size="large"],
    .playerContainer .controls .layoutAreasSchematic .schematicAreaRight[data-size="large"] {
        height: 60px;
    }

    .playerContainer .controls .layoutAreasSchematic .schematicCenter {
        min-height: 35px;
    }

    .playerContainer .controls .layoutAreasSchematic .schematicAreaLeft {
        order: -1;
    }

    .playerContainer .controls .layoutAreasSchematic .schematicAreaRight {
        order: 1;
    }
}

/* Snap Indicators (timeline + overlay canvas) */

.timelineSnapIndicator {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: var(--primary-fg-color);
    pointer-events: none;
    z-index: 100000;
}

.overlayContainer .canvasSnapLine {
    position: absolute;
    background-color: var(--primary-fg-color);
    pointer-events: none;
    z-index: 100000;
}

.overlayContainer .canvasSnapLine.vertical {
    top: 0;
    width: 1px;
    height: 100%;
}

.overlayContainer .canvasSnapLine.horizontal {
    left: 0;
    height: 1px;
    width: 100%;
}

/* Locked by another editor
   One blocking sheet over the whole player rather than dimming each region:
   greying regions individually left parts of the UI looking oddly faded, and
   several of them carry inline styles that a stylesheet cannot reliably beat.
   The sheet also does the blocking simply by being there and swallowing events,
   so nothing needs pointer-events juggling underneath.

   Shown only for the edit modes that write to the shared hypervideo.json.
   Preview is read-only anyway, and annotations live in per-user files and stay
   concurrently editable — so neither is ever blocked. */
.viewVideo .collabBlocker {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: .5;
    z-index: 5;
}

.mainContainer.editActive.collabLocked[data-edit-mode="layout"] .viewVideo .collabBlocker,
.mainContainer.editActive.collabLocked[data-edit-mode="overlays"] .viewVideo .collabBlocker,
.mainContainer.editActive.collabLocked[data-edit-mode="codesnippets"] .viewVideo .collabBlocker,
.mainContainer.editActive.collabLocked[data-edit-mode="chapters"] .viewVideo .collabBlocker {
    display: block;
}
