/* _content/VideoPlayerModule/Presentation/Components/Player/CameraPlayer.razor.rz.scp.css */
.camera-player[b-zhnjl02676] {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #111;
    overflow: hidden;
}

.camera-player__video[b-zhnjl02676] {
    flex: 1 1 0;
    min-height: 0; /* allow flex item to shrink below content size */
    width: 100%;
    object-fit: contain; /* letterbox — never crops */
}

/* PTZ is absolutely positioned so it overlays the video, not a flex child.
   Hover-revealed so it doesn't crowd the stream when the user isn't interacting. */
.camera-player__ptz[b-zhnjl02676] {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.camera-player:hover .camera-player__ptz[b-zhnjl02676] {
    opacity: 1;
    pointer-events: auto;
}

.camera-player__overlay[b-zhnjl02676] {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
}

/* Top-right toolbar — all tile actions in one MudStack so layout stays predictable.
   Whole toolbar fades in on player hover so it doesn't crowd the stream when idle. */
.camera-player__top-right-controls[b-zhnjl02676] {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.camera-player:hover .camera-player__top-right-controls[b-zhnjl02676] {
    opacity: 1;
    pointer-events: auto;
}

/* Bottom-right controls container — currently the Playback toggle, sized to host more
   actions later. Hover-reveals so it doesn't crowd the video when idle. In Playback mode
   the playback bar's LIVE button occupies this slot (rendered inside the bar). */
.camera-player__bottom-right-controls[b-zhnjl02676] {
    position: absolute;
    right: 4px;
    bottom: 4px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.camera-player:hover .camera-player__bottom-right-controls[b-zhnjl02676] {
    opacity: 1;
    pointer-events: auto;
}

/* Top-left info strip — status dot + camera name */
/* right:8px gives it a real width so the name badge can measure against it */
.camera-player__top-left-info[b-zhnjl02676] {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

/* Status dot — inline with name, top-left */
.camera-player__status[b-zhnjl02676] {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #555;
    transition: background 0.3s ease;
}

.camera-player__status--live[b-zhnjl02676] {
    background: #4caf50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.7);
}

/* Camera name badge — inline with status dot */
/* flex: 0 1 auto + min-width: 0 allows it to show full text and only truncate when tight */
.camera-player__name-badge[b-zhnjl02676] {
    flex: 0 1 auto;
    min-width: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #ddd;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* _content/VideoPlayerModule/Presentation/Components/Player/MotionTimeline.razor.rz.scp.css */
.motion-timeline[b-mt94ruxgvp] {
    position: relative;
    height: 64px;
    background: rgba(0, 0, 0, 0.85);
    flex-shrink: 0;
    overflow: visible;
    color: #ddd;
    font-size: 11px;
}

.motion-timeline__host[b-mt94ruxgvp] {
    /* vis-timeline sets `style="position: relative"` inline on the container element it owns,
       which overrides any `position: absolute` we'd set here. Use explicit width/height so the
       host fills the parent regardless of position. */
    width: 100%;
    height: 100%;
}

/* Overlay covering the empty host while the initial page of motion events loads
   and vis-timeline initialises. Removed once `_initialized` flips true. Two stacked
   skeletons mirror vis-timeline's panel layout (event row + time axis).
   The wrapper is a div emitted by this component, so it gets the scoped attribute
   and styles directly. The inner MudSkeleton spans don't carry the attribute, hence
   `::deep` for their rules. */
.motion-timeline__skeleton[b-mt94ruxgvp] {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

[b-mt94ruxgvp] .motion-timeline__skeleton-events {
    flex: 0 0 20px;
}

[b-mt94ruxgvp] .motion-timeline__skeleton-axis {
    flex: 1 1 auto;
    min-height: 0;
}

/* Off-screen cursor indicator — pinned to the active edge with an arrow and the cursor time. */
.motion-timeline__cursor-bubble[b-mt94ruxgvp] {
    position: absolute;
    top: 4px;
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 16px;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 4px;
}

.motion-timeline__cursor-bubble--left[b-mt94ruxgvp]  { left: 4px; }
.motion-timeline__cursor-bubble--right[b-mt94ruxgvp] { right: 4px; }
.motion-timeline__cursor-arrow[b-mt94ruxgvp]         { font-weight: bold; }

/* Floating cursor pill — JS-rendered sibling of the host. Same visual treatment as the
   off-screen bubble above. Sits just above the timeline top edge, centered on the cursor. */
[b-mt94ruxgvp] .mt-cursor-pill {
    position: absolute;
    top: -10px;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
    z-index: 6;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* vis-timeline elements are JS-rendered, so `::deep` is required to escape the
   Blazor isolation attribute scope. Selectors target classes the lib emits. */

[b-mt94ruxgvp] .vis-timeline {
    border: none;
    background: transparent;
    font-family: inherit;
    color: #ddd;
}

[b-mt94ruxgvp] .vis-panel.vis-top,
[b-mt94ruxgvp] .vis-panel.vis-bottom,
[b-mt94ruxgvp] .vis-panel.vis-left,
[b-mt94ruxgvp] .vis-panel.vis-right,
[b-mt94ruxgvp] .vis-panel.vis-center {
    border-color: rgba(255, 255, 255, 0.08);
}

[b-mt94ruxgvp] .vis-time-axis .vis-text {
    color: #bbb;
}

[b-mt94ruxgvp] .vis-time-axis .vis-grid.vis-minor {
    border-color: rgba(255, 255, 255, 0.06);
}

[b-mt94ruxgvp] .vis-time-axis .vis-grid.vis-major {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Motion event blocks — MudBlazor success green, no border bleed.
   `min-width` keeps very short events visible at zoomed-out levels (each event
   would otherwise be sub-pixel at a multi-day window). */
[b-mt94ruxgvp] .vis-item.vis-range.motion-event {
    background-color: var(--mud-palette-success, #4caf50);
    border-color: var(--mud-palette-success-darken, #388e3c);
    border-radius: 2px;
    color: transparent;
    cursor: pointer;
    min-width: 2px;
}

[b-mt94ruxgvp] .vis-item.vis-range.motion-event:hover {
    background-color: var(--mud-palette-success-lighten, #66bb6a);
}

/* The playback cursor custom-time line. */
[b-mt94ruxgvp] .vis-custom-time.playback-cursor {
    background-color: var(--mud-palette-warning, #ff9800);
    width: 2px;
    z-index: 4;
}
/* _content/VideoPlayerModule/Presentation/Components/Player/PlaybackBar.razor.rz.scp.css */
/* Layout lives on MudStack and inline styles in the .razor — no scoped rules needed here. */
/* _content/VideoPlayerModule/Presentation/Components/Player/PtzOverlay.razor.rz.scp.css */
.ptz-overlay[b-fs151ykfx5] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 8px;
    width: fit-content;
}

.ptz-grid[b-fs151ykfx5] {
    display: grid;
    grid-template-columns: repeat(3, 36px);
    grid-template-rows: repeat(3, 36px);
    gap: 1px;
}

.ptz-zoom[b-fs151ykfx5] {
    display: flex;
    gap: 2px;
}

.ptz-presets[b-fs151ykfx5] {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.ptz-speed[b-fs151ykfx5] {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 110px; /* matches ptz-grid: 3 × 36px + 2 × 1px gap */
    padding: 0 2px;
}

.ptz-speed__label[b-fs151ykfx5] {
    font-size: 0.6rem;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Tighten up MudSlider's default vertical padding so it doesn't bloat the overlay */
.ptz-speed__slider[b-fs151ykfx5] {
    flex: 1;
    margin-top: -8px;
    margin-bottom: -8px;
}

.ptz-error[b-fs151ykfx5] {
    font-size: 0.65rem;
    color: #f88;
    text-align: center;
    max-width: 110px;
}
/* _content/VideoPlayerModule/Presentation/Pages/MultiviewPage.razor.rz.scp.css */
/* ── Page shell ──────────────────────────────────────────────────────────── */

.multiview-content[b-wnhnl68eso] {
    background: #111;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

/* ── CSS grid ────────────────────────────────────────────────────────────── */

.multiview-grid[b-wnhnl68eso] {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), 1fr);
    grid-template-rows: repeat(var(--grid-rows), 1fr);
    width: 100%;
    height: 100%;
    gap: 2px;
    background: #222;
}

/* ── Grid cells ──────────────────────────────────────────────────────────── */

.camera-cell[b-wnhnl68eso] {
    position: relative;
    overflow: hidden;
    background: #111;
    cursor: default;
}

.camera-cell--empty[b-wnhnl68eso] {
    border: 1px dashed #333;
}

/* JS adds/removes this class on dragover */
.camera-cell.vp-cell--drag-over[b-wnhnl68eso] {
    border: 2px solid #42a5f5;
    background: rgba(66, 165, 245, 0.08);
}

.camera-cell__empty-hint[b-wnhnl68eso] {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.camera-cell__loading[b-wnhnl68eso] {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

/* Shown while a new stream is being fetched for a cell that already has a stream
   rendered (e.g. seek, mode flip). Small corner badge — does not occlude the player
   or motion timeline underneath, so vis-timeline keeps its pan/zoom state. */
.camera-cell__loading-overlay[b-wnhnl68eso] {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ── Drawer items ────────────────────────────────────────────────────────── */

.multiview-camera-item[b-wnhnl68eso] {
    display: flex;
    align-items: center;
    padding: 6px 16px 6px 32px;
    cursor: grab;
    user-select: none;
    border-radius: 4px;
    transition: background 0.1s ease;
}

.multiview-camera-item:hover[b-wnhnl68eso] {
    background: rgba(255, 255, 255, 0.06);
}

.multiview-camera-item:active[b-wnhnl68eso] {
    cursor: grabbing;
}

.multiview-view--active[b-wnhnl68eso] {
    background: rgba(66, 165, 245, 0.12);
}

/* ── Saved view items ────────────────────────────────────────────────────── */

.multiview-view-item[b-wnhnl68eso] {
    display: flex;
    align-items: center;
    padding: 4px 4px 4px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s ease;
    user-select: none;
}

.multiview-view-item:hover[b-wnhnl68eso] {
    background: rgba(255, 255, 255, 0.06);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.multiview-empty-state[b-wnhnl68eso] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
