/* ── Fight Video Player ───────────────────────────────────────────
   Embedded low-bandwidth fight footage (judging scoring panel,
   judging history/review, fight history). Requires a .portal-page-themed
   parent for theming, same as portal-pagination.
   ─────────────────────────────────────────────────────────────── */

.fvp-slot {
    border: 1px solid var(--portal-c-border);
    border-radius: 0.5rem;
    background: var(--portal-c-surface);
}

/* ── Collapsed / loading / empty states ─────────────────────────── */

.fvp-collapsed,
.fvp-loading,
.fvp-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--portal-c-text-muted);
    font-size: 0.85rem;
}

.fvp-load-btn,
.fvp-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--portal-c-text);
    background: var(--portal-c-tab-hover);
    border: 1px solid var(--portal-c-border);
    border-radius: 0.375rem;
    cursor: pointer;
    /* Named, not `all`: these hovers change three colours, and `all` also
       animates whatever a future edit adds — including properties that
       force layout. */
    transition: color var(--portal-dur-1, 120ms) var(--portal-ease-out, ease),
                background-color var(--portal-dur-1, 120ms) var(--portal-ease-out, ease),
                border-color var(--portal-dur-1, 120ms) var(--portal-ease-out, ease);
}

.fvp-load-btn:hover,
.fvp-retry-btn:hover {
    color: var(--portal-c-accent);
    border-color: var(--portal-c-accent-border);
    background: var(--portal-c-accent-muted);
}

.fvp-fallback-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--portal-c-text-muted);
    text-decoration: none;
}

.fvp-fallback-link:hover {
    color: var(--portal-c-accent);
}

/* ── Player ──────────────────────────────────────────────────────── */

.fvp-player {
    position: relative;
    display: flex;
    flex-direction: column;
}

.fvp-player:focus-visible {
    outline: 2px solid var(--portal-c-accent-border);
    outline-offset: -2px;
}

.fvp-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 0.5rem 0.5rem 0 0;
}

.fvp-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--portal-c-border-subtle);
}

.fvp-cameras,
.fvp-quality,
.fvp-speed,
.fvp-frame-step {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.fvp-quality,
.fvp-speed,
.fvp-frame-step {
    padding-left: 0.5rem;
    border-left: 1px solid var(--portal-c-border-subtle);
}

.fvp-camera-pill,
.fvp-quality-btn,
.fvp-speed-btn,
.fvp-frame-btn,
.fvp-start-btn,
.fvp-loop-btn,
.fvp-pip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 1.75rem;
    padding: 0 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--portal-c-text-muted);
    background: transparent;
    border: 1px solid var(--portal-c-border);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: color var(--portal-dur-1, 120ms) var(--portal-ease-out, ease),
                background-color var(--portal-dur-1, 120ms) var(--portal-ease-out, ease),
                border-color var(--portal-dur-1, 120ms) var(--portal-ease-out, ease);
    white-space: nowrap;
}

.fvp-frame-btn,
.fvp-pip-btn {
    width: 1.75rem;
    padding: 0;
    justify-content: center;
}

.fvp-camera-pill:hover,
.fvp-quality-btn:hover,
.fvp-speed-btn:hover,
.fvp-frame-btn:hover,
.fvp-start-btn:hover,
.fvp-loop-btn:hover,
.fvp-pip-btn:hover {
    color: var(--portal-c-text);
    background: var(--portal-c-tab-hover);
}

.fvp-camera-pill--active,
.fvp-quality-btn--active,
.fvp-speed-btn--active {
    color: var(--portal-c-tab-active-color);
    background: var(--portal-c-accent-muted);
    border-color: var(--portal-c-accent-border);
}

/* Loop is a 3-state control: idle, "click again to set the end" (pending —
 * warning color, since it's a half-finished action), then actually looping
 * (accent, matching every other active toggle in this toolbar). */
.fvp-loop-btn--pending {
    color: var(--portal-c-badge-warning-color);
    background: var(--portal-c-badge-warning-bg);
    border-color: transparent;
}

.fvp-loop-btn--active {
    color: var(--portal-c-tab-active-color);
    background: var(--portal-c-accent-muted);
    border-color: var(--portal-c-accent-border);
}

.fvp-shortcuts-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    color: var(--portal-c-text-muted);
    cursor: help;
}

.fvp-shortcuts-hint:hover {
    color: var(--portal-c-text);
}

.fvp-toolbar .fvp-fallback-link {
    margin-left: auto;
}

/* ── Touch double-tap seek flash ─────────────────────────────────── */

.fvp-seek-flash {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    animation: fvp-seek-flash-fade 0.5s ease-out forwards;
}

.fvp-seek-flash--left {
    left: 0;
    border-radius: 0.5rem 0 0 0;
}

.fvp-seek-flash--right {
    right: 0;
    border-radius: 0 0.5rem 0 0;
}

@keyframes fvp-seek-flash-fade {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .fvp-toolbar {
        justify-content: center;
    }

    .fvp-toolbar .fvp-fallback-link {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}
