/**
 * Showcase video player theming (Plyr v3, MIT — lifetime free).
 * Brand accent via Plyr's own CSS variable; frame matches the
 * showcase section style.
 */

.showcase-video-frame .plyr {
    --plyr-color-main: #f59e0b; /* amber brand accent */
    --plyr-video-background: #000;
    border-radius: calc(1.25rem - 3px); /* sit inside the gradient border */
    overflow: hidden;
    display: block;
    position: relative;
}

/* Force a sane 16:9 player even if the video metadata fails to load —
   prevents the collapsed ultra-wide strip. Real ratio letterboxes inside. */
.showcase-video-frame .plyr__video-wrapper {
    aspect-ratio: 16 / 9;
}

.showcase-video-frame .plyr__video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Fallback if Plyr itself fails: raw video still looks sane + has controls */
.showcase-video-frame video.showcase-player:not(.plyr__video-wrapper video) {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: block;
}

/* Error overlay when the video file cannot be played */
.showcase-video-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #0b1220;
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
    border-radius: inherit;
}

.showcase-video-error i {
    font-size: 2rem;
    color: #475569;
}

/* Big center play button in brand amber */
.showcase-video-frame .plyr__control--overlaid {
    background: rgba(245, 158, 11, 0.95);
    color: #0f172a;
    padding: 1.4rem;
}

.showcase-video-frame .plyr__control--overlaid:hover {
    background: #f59e0b;
}

/* Slightly larger control bar for a premium feel */
.showcase-video-frame .plyr__controls {
    padding: 0.6rem 0.9rem;
}
