/* =========================================================
   WPPV Category Video List – Divi Module Styles
   ========================================================= */

/* Grid container – uses a CSS custom property set inline
   so the column count is always in sync with the Divi field. */
.wppv-category-list {
    display: grid;
    grid-template-columns: repeat(var(--wppv-cols, 3), 1fr);
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Individual card */
.wppv-category-item {
    box-sizing: border-box;
    min-width: 0; /* prevent grid blow-out */
}

.wppv-category-item-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Responsive 16:9 video wrapper */
.wppv-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
}

.wppv-video-wrapper > *,
.wppv-video-wrapper iframe,
.wppv-video-wrapper video,
.wppv-video-wrapper .wppv_player_wrap,
.wppv-video-wrapper .plyr,
.wppv-video-wrapper .wppv_player_container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video title */
.wppv-video-title {
    margin: 12px 0 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: inherit;
}

/* Placeholder / error messages */
.wppv-cat-placeholder,
.wppv-no-video {
    padding: 1em;
    background: #f8f8f8;
    border: 1px dashed #ccc;
    color: #666;
    font-style: italic;
    border-radius: 4px;
    text-align: center;
}

/* ---- Responsive breakpoints ---- */
@media (max-width: 980px) {
    .wppv-category-list {
        grid-template-columns: repeat(min(var(--wppv-cols, 3), 2), 1fr);
    }
}

@media (max-width: 767px) {
    .wppv-category-list {
        grid-template-columns: 1fr;
    }
}
