/* /{lang}/{category}/videos — loaded only on that page (not first-paint listing).
 *
 * Header/footer stay normal (same as other pages). Only the video grid freezes at
 * 768px and scrolls sideways inside .container.videos-page — never put overflow-x
 * on body/html (that clips sticky header/footer hearts).
 */

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

/* Do NOT set overflow-x on body — it clips header/footer decorative hearts. */
.container.videos-page {
    --videos-mobile-freeze-width: 768px;
    width: 100%;
    max-width: var(--site-shell-max-width, 1152px) !important;
    margin-left: auto;
    margin-right: auto;
    /* Space under header — do not touch header/footer markup or footer padding. */
    padding-top: 1.25rem;
    padding-bottom: 2rem;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

/* Always 4 columns — freeze width; parent scrolls horizontally on narrow viewports */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem 0.85rem;
    margin-top: 0;
    width: var(--videos-mobile-freeze-width);
    min-width: var(--videos-mobile-freeze-width);
    max-width: none;
}

@media (min-width: 768px) {
    .videos-grid {
        width: 100%;
        min-width: 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: #000;
}

.videos-card__media video {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
    border-radius: 12px;
    background: #000;
    color-scheme: dark;
}

/* 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,
.videos-card__media.is-playing .post-video-play-facade__icon {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.videos-card__media .post-video-play-facade {
    /* Leave top bar + bottom controls clear */
    top: 2.9rem !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 3.1rem !important;
    width: auto !important;
    height: auto !important;
    /* Mouse hits the <video> so native controls show on any hover over the card. */
    pointer-events: none !important;
}
.videos-card__media:not(.is-playing) .post-video-play-facade__icon {
    pointer-events: auto;
    cursor: pointer;
}

/* ~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;
}

/* Dark strip only behind the native bar (same as single-ad / popup). */
.videos-card__media video::-webkit-media-controls,
.videos-card__media video::-webkit-media-controls-overlay-enclosure,
.videos-card__media video::-webkit-media-controls-enclosure {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.videos-card__media video::-webkit-media-controls-panel {
    background-color: transparent !important;
    background-image: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0,
        rgba(0, 0, 0, 0.82) 3.5rem,
        rgba(0, 0, 0, 0) 3.5rem
    ) !important;
    color: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.videos-card__media video::-webkit-media-controls-current-time-display,
.videos-card__media video::-webkit-media-controls-time-remaining-display {
    color: #fff !important;
}
.videos-card__media video::-webkit-media-controls-start-playback-button,
.videos-card__media video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.videos-card__media video:fullscreen,
.videos-card__media video:-webkit-full-screen {
    width: auto !important;
    height: auto !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #000 !important;
}
