/* Vid Vault: click-to-play player, end screen, video cards. Uses tokens from site.css. */

.vv-player {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line-strong);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.vv-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
}

.vv-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .85;
    transition: opacity .2s ease, transform .3s ease;
}

.vv-poster:hover img,
.vv-poster:focus-visible img { opacity: 1; transform: scale(1.02); }

.vv-poster:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

.vv-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--gradient-brand);
    box-shadow: 0 8px 24px rgba(193, 11, 11, .5);
    transition: transform .2s ease;
}

.vv-poster:hover .vv-play { transform: scale(1.08); }

.vv-play--sm { width: 44px; height: 44px; margin: -22px 0 0 -22px; }

.vv-player.is-playing .vv-poster { display: none; }

.vv-frame,
.vv-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.vv-end {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(10, 4, 4, .82);
    backdrop-filter: blur(4px);
    text-align: center;
}

.vv-end[hidden] { display: none; }

.vv-end-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Dashboard (small) variant */
.vv-compact .vv-player { border-radius: var(--radius); box-shadow: none; }
.vv-compact .vv-play { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
.vv-compact .vv-end-title { font-size: 1rem; margin-bottom: 8px; }
.vv-compact .vv-end .btn { padding: .3rem .7rem; font-size: .85rem; }
.vv-compact-title { font-weight: 600; line-height: 1.3; }

.vv-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Vault grid cards */
.vv-card {
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease;
}

.vv-card:hover { transform: translateY(-3px); border-color: var(--line-strong); color: inherit; }

.vv-thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }

.vv-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }

.vv-card-title {
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .vv-poster img, .vv-play, .vv-card { transition: none; }
    .vv-poster:hover img, .vv-poster:hover .vv-play, .vv-card:hover { transform: none; }
}
