/**
 * Shared video-card styling — matches includes/video_cards.php's render_feed_card()
 * markup exactly, so every page gets the same look without duplicating these
 * rules in its own stylesheet. Extracted from pn-pages/Home/styles.css, the
 * original (and only fully correct) reference implementation.
 */
.feed-card {
    min-width: 0;
}

.thumbnail-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #272727;
}

.thumbnail-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease, filter .35s ease;
}

.feed-card:hover .thumbnail-link img {
    transform: scale(1.025);
    filter: brightness(.88);
}

.duration,
.live-badge {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 3px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .8);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.live-badge {
    right: auto;
    left: 6px;
    padding: 4px 6px;
    background: #f00;
    font-weight: 700;
    letter-spacing: .4px;
}

.watch-progress {
    --progress: 0%;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(to right, #f00 var(--progress), rgba(255, 255, 255, .45) var(--progress));
}

.card-details {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 28px;
    gap: 12px;
    padding-top: 12px;
}

.card-details.compact {
    grid-template-columns: minmax(0, 1fr) 28px;
}

.channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.avatar-amber { background: linear-gradient(145deg, #e0a22a, #7c4314); }
.avatar-violet { background: linear-gradient(145deg, #9d75ff, #3b246f); }
.avatar-blue { background: linear-gradient(145deg, #45a6e8, #183d83); }
.avatar-red { background: linear-gradient(145deg, #ec4141, #7c1616); }
.avatar-green { background: linear-gradient(145deg, #48a86b, #164d2b); }
.avatar-orange { background: linear-gradient(145deg, #fa8334, #793311); }

.card-copy {
    min-width: 0;
}

.card-title,
.short-title {
    display: -webkit-box;
    overflow: hidden;
    color: #f1f1f1;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.channel-name,
.card-meta {
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
}

a.channel-name {
    display: block;
    margin-top: 6px;
    text-decoration: none;
}

a.channel-name:hover {
    color: #f1f1f1;
}

.card-meta span {
    margin: 0 2px;
}

.verified {
    display: inline-grid;
    width: 13px;
    height: 13px;
    place-items: center;
    border-radius: 50%;
    background: #aaa;
    color: #0f0f0f;
    font-size: 9px;
    font-weight: 700;
}

.card-menu-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #f1f1f1;
    font-size: 22px;
    line-height: 22px;
    cursor: pointer;
    opacity: 0;
}

.feed-card:hover .card-menu-btn,
.card-menu-btn:focus-visible {
    opacity: 1;
}

.card-menu-btn:active {
    background: #3f3f3f;
}

/**
 * Shared card options menu — built and positioned by shared/videohub.js
 * (installVideoCardMenu). One instance per page, reused across every card's
 * "⋮" button, exactly like the already-shared report dialog.
 */
.vh-video-context-menu {
    position: fixed;
    z-index: 1500;
    width: 270px;
    display: none;
    padding: 8px 0;
    border-radius: 12px;
    background: #282828;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .5);
}

.vh-video-context-menu.active {
    display: block;
}

.vh-video-context-menu button {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    border: 0;
    background: transparent;
    color: #f1f1f1;
    font-size: 15px;
    cursor: pointer;
    text-align: left;
}

.vh-video-context-menu button:hover {
    background: #3f3f3f;
}

.vh-video-context-menu hr {
    height: 1px;
    margin: 8px 0;
    border: 0;
    background: #3f3f3f;
}
