/*!
 * YouTube Widget
 * Copyright 2026 Steven Weise
 *
 * This code is proprietary and intended for use on authorized websites only.
 * Redistribution, reuse, or modification without permission is not allowed.
 * For inquiries about use, contact:
 * steve@weisefamilyhomes.com
 */

 /* Playlist Container */
/*    .playlist-wrapper 
    {
        width: 100%;
        overflow: hidden;
        position: relative; /* Ensure it stays within bounds * /
    }
*/

/* Wrapper to keep everything properly aligned */
.sw-playlist-widget {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0 48px;
}

.sw-playlist-viewport {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    /* added */
}

.sw-playlist-viewport::before,
.sw-playlist-viewport::after {
    content: "";
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.sw-playlist-viewport::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.sw-playlist-viewport::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

.sw-playlist-track {
    display: flex;
    gap: 16px;
    will-change: transform;
    transition: transform 0.35s ease;
}

.sw-video-thumbnail {
    flex: 0 0 275px;
    width: 275px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sw-video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    cursor: pointer;
}

.sw-video-thumbnail img:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.sw-video-title {
    font-size: 14px;
    font-weight: bold;
    color: #063088;
    padding: 8px 4px 0;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.sw-nav-button {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background-color: rgba(6, 48, 136, 0.8);
    color: #fa9f15;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    z-index: 20;
    border-radius: 50%;
    transition: opacity 0.3s ease-in-out;
}

.sw-nav-button:hover {
    background-color: #063088;
}

.sw-nav-button.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.sw-left-button {
    left: 8px;
}

.sw-right-button {
    right: 8px;
}
/*! Copyright 2026 Steven Weise */
/* Important: allow page-builder parents to shrink */
.bee-html-block,
.bee-block,
.bee-col,
.bee-col-w12,
.bee-row-content {
    min-width: 0;
    box-sizing: border-box;
}

/* Each Thumbnail */
.video-container {
    flex: 0 0 auto;
    /* Prevent shrinking */
    width: 300px;
    /* Adjust based on need - originally was 300 */
    margin: 0 5px;
    /* originally did not exist */
}

/* Ensure videos are inline and properly spaced */
.thumbnail-container {
    flex: 0 0 auto;
    /* Prevent shrinking */
    width: 300px;
    /* Set a fixed width for consistency */
}

.video-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Keeps thumbnails within bounds */
}

.video-carousel {
    display: flex;
    gap: 16px;
    /* Space between thumbnails */
    overflow-x: hidden;
    /* Prevents unintended scrolling */
    scroll-behavior: smooth;
    white-space: nowrap;
    /* Keeps items in a single row */
}

/* Enable horizontal scrolling within each playlist */
#thumbnail-gallery {
    display: grid;
    grid-auto-flow: column;
    /* Ensures items flow in a single row */
    grid-auto-columns: min-content;
    /* Ensures items fit naturally */
    justify-content: center;
    justify-content: start;
    /* Aligns items to the left */
    width: max-content;
    /* Expands based on content */
}

/* Ensure individual items are centered in each grid cell */
.thumbnail-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center content horizontally */
    text-align: center;
    margin: 0 auto;
}

.thumbnail-container {
    cursor: pointer;
}

.thumbnail-container img {
    width: 100%;
    border-radius: 8px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal iframe {
    width: 80%;
    height: 80%;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Responsive Styling */
@media (max-width: 600px) {

    #playlist-gallery,
    #thumbnail-gallery {
        grid-template-columns: 1fr !important;
    }

    .video-container,
    .thumbnail-container,
    .video-thumbnail {
        justify-self: center;
    }
}
/*! Copyright 2026 Steven Weise */
