/* 録画再生画面（/recordings/playback）専用スタイル。
   scoped CSS のキャッシュ取りこぼしを避けるためグローバルに定義する。
   クラス名は pb- 接頭辞で限定しているため他画面に影響しない。 */

/* ── リアルタイムステータス（再生連動） ───────────────────────────────── */
.pb-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 6px 20px;
}

.pb-status-item {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default, #eceff1);
}

.pb-status-label {
    font-size: 11px;
    color: var(--mud-palette-text-secondary, #9e9e9e);
    line-height: 1.4;
}

.pb-status-value {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    min-height: 1.6em;
}

/* ── タイムライン ─────────────────────────────────────────────────────── */
/* 固定幅のスクロール枠。解像度(ズーム)を上げてトラックが枠を超えると横スクロールになる。 */
.pb-timeline-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

/* pb-track の幅 = 24時間軸（インラインで zoom×100% を指定）。時刻ラベル・録画帯・
   シークバーはすべてこの幅に対する left/width(%) で配置するため、左右パディングは付けない。 */
.pb-track {
    position: relative;
    box-sizing: border-box;
    min-width: 100%;
    background: #1e1e1e;
    border-radius: 6px;
    padding: 22px 0 12px 0;
    user-select: none;
    cursor: pointer;
}

.pb-hours {
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    height: 14px;
}

.pb-hour {
    position: absolute;
    transform: translateX(-50%);
    font-size: 10px;
    color: #9e9e9e;
}

.pb-cam {
    margin: 8px 0;
}

.pb-cam-name {
    font-size: 10px;
    color: #cfcfcf;
    margin: 0 0 2px 4px;
    line-height: 1.2;
}

.pb-cam-bar {
    position: relative;
    height: 16px;
    background: #2c2c2c;
    border-radius: 3px;
    overflow: hidden;
}

.pb-range {
    position: absolute;
    top: 0;
    height: 100%;
    min-width: 1px;
    border-radius: 2px;
}

.pb-normal {
    background: #e53935;
}

.pb-evt {
    background: #fdd835;
}

.pb-seek-handle {
    position: absolute;
    top: 18px;
    bottom: 8px;
    left: 0;
    width: 2px;
    background: #ffffff;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
    cursor: ew-resize;
    z-index: 5;
}

.pb-seek-handle::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}

/* 凡例 */
.pb-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 2px;
}
