/* /{lang}/{category}/videos — loaded only on that page (not first-paint listing).
 *
 * Same idea as forum main: at the mobile-header breakpoint (~768px) header/footer
 * adapt, but the video grid freezes at desktop size and the page scrolls horizontally.
 */

:root {
    --videos-mobile-freeze-width: 768px;
}

/* Allow horizontal scroll so frozen content can sit partly off-screen */
html body.videos-page-body {
    overflow-x: auto !important;
}

/* Freeze at mobile-header width (768); cap growth with the same ~12" shell as header */
.container.videos-page {
    --videos-mobile-freeze-width: 768px;
    width: max(100%, var(--videos-mobile-freeze-width)) !important;
    min-width: var(--videos-mobile-freeze-width) !important;
    max-width: var(--site-shell-max-width, 1152px) !important;
    margin-left: auto;
    margin-right: auto;
    padding-top: 0.1rem;
    padding-bottom: 2rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

.videos-page__empty {
    color: #cbb8e8;
    padding: 1.25rem 0;
    margin: 0;
}

/* Always 4 columns — no phone/tablet reflow */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem 0.85rem;
    margin-top: 0;
}

.videos-card {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    min-width: 0;
}

.videos-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: #12061f;
}

.videos-card__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    background: #12061f;
}

/* Ad thumb + title: full-bleed dark bar at the very top of the video */
.videos-card__admeta {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.35rem 0.45rem;
    box-sizing: border-box;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.55);
    text-decoration: none;
    color: #fff;
    overflow: hidden;
}

.videos-card__admeta:hover,
.videos-card__admeta:focus-visible {
    color: #fff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.7);
}

/* Fixed thumb size — never scales down with the viewport */
.videos-card__thumb {
    flex: 0 0 2.35rem;
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    max-width: 2.35rem;
    object-fit: cover;
    border-radius: 5px;
    display: block;
    background: #2a1544;
}

.videos-card__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.videos-card__media.is-playing .post-video-play-facade {
    display: none;
}

.videos-card__media .post-video-play-facade {
    /* Leave top bar + bottom controls clear */
    top: 2.9rem;
    bottom: 3.1rem;
}

/* ~30% smaller than the shared gallery play mark */
.videos-card__media .post-video-play-facade__icon {
    font-size: clamp(1.68rem, 5.6vmin, 2.38rem);
}

html:not(.dark-mode) .videos-page__empty {
    color: #4b0082;
}
