/* Video feature: the player, its cards and the admin video page. */

.player { display: block; margin: 16px 0; }
.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: #000;
    user-select: none;
    -webkit-user-select: none;
}
.player-box video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-box:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.player-box:-webkit-full-screen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.player-mark {
    position: absolute;
    top: 8%;
    left: 8%;
    z-index: 2;
    pointer-events: none;
    direction: ltr;
    font-family: var(--font-code);
    font-size: clamp(.75rem, 2.2vw, 1.1rem);
    letter-spacing: .08em;
    color: #fff;
    opacity: .35;
    text-shadow: 0 0 3px #000;
}
.player-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}
.player-quality-label { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; }
.player-quality {
    min-height: 40px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}
.player .btn-small { min-height: 40px; padding: 6px 16px; }
.player-message { margin: 8px 0 0; color: var(--danger); }

.video-card { margin: 16px 0; text-align: center; }
.video-card p { margin: 0 0 12px; }
.video-locked { border-color: var(--amber); background: #FFF8E8; }
.video-locked-title { font-family: var(--font-title); font-size: 1.15rem; }
.video-soon { color: var(--muted); }
.video-soon p { margin: 0; }

/* Admin video page */
.upload-form { max-width: 560px; margin-bottom: 24px; }
.upload-progress { width: 100%; height: 12px; margin-bottom: 8px; accent-color: var(--turquoise); }
.upload-status { min-height: 1.7em; margin: 0 0 12px; }
.notice { padding: 10px 14px; border-radius: 10px; background: #E7F7F5; color: var(--turquoise-dark); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.table th { background: var(--bg); font-weight: 500; white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions form { margin: 0; }
.btn.btn-small { min-height: 36px; padding: 4px 14px; font-size: .9rem; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.video-status { white-space: nowrap; font-weight: 500; }
.video-status-ready { color: var(--turquoise-dark); }
.video-status-failed { color: var(--danger); }
.video-status-uploaded, .video-status-transcoding { color: var(--muted); }
.error-text {
    max-width: 480px;
    max-height: 200px;
    overflow: auto;
    margin: 6px 0 0;
    padding: 8px;
    border-radius: 8px;
    background: var(--danger-bg);
    font-size: .8rem;
    white-space: pre-wrap;
}
