﻿/* Hide content initially */
.yt-hidden {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.5s ease;
}

/* Show content after load */
.yt-visible {
    visibility: visible;
    opacity: 1;
}

/* Wrapper to center content */
#yt-content-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Container to hold both the video and the playlist */
#yt-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Ensures both video and playlist card take up equal height */
    max-width: 1200px;
    width: 100%;
    gap: 20px;
    flex-wrap: nowrap; /* Do not wrap on larger screens */
    box-sizing: border-box;
}

/* Style for the video thumbnail container */
#yt-thumbnail-container {
    flex: 7; /* 70% width on larger screens */
    position: relative;
    display: flex;
    align-items: center;
}

#yt-videoLink {
    display: block;
    width: 100%;
}

#yt-videoThumbnail {
    width: 100%;
    height: 100%; /* Ensure the thumbnail fills the container */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* YouTube overlay logo */
#yt-overlay-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: auto;
}

/* Style for the playlist card */
#yt-playlist-card {
    flex: 3; /* 30% width on larger screens */
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Make sure it takes the same height as the thumbnail */
}

/* Header (title and subscribe button) */
#yt-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Scrollable Playlist */
#yt-playlist-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Playlist styling */
.yt-playlist-item {
    display: flex;
    align-items: center;
    padding: 5px 0;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.yt-playlist-item.active {
    background-color: #f4f4f4;
    font-weight: bold;
}

.yt-playlist-item img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.yt-playlist-item a {
    text-decoration: none;
    color: #000;
    display: inline-block;
    width: calc(100% - 32px);
}

.yt-playlist-item a:hover {
    text-decoration: underline;
    color: #000;
}

.yt-playlist-item:hover {
    background-color: #eaeaea;
}

/* Responsive behavior for screens smaller than 1500px */
@media (max-width: 1500px) {
    #yt-container {
        flex-direction: column; /* Stack video and playlist vertically */
        align-items: center;
    }

    #yt-thumbnail-container, #yt-playlist-card {
        width: 100%; /* Full width for both video and playlist on smaller screens */
        margin-bottom: 20px;
        height: auto; /* Let the height adjust naturally */
    }

    #yt-videoThumbnail {
        height: auto; /* Reset height for smaller screens to ensure the thumbnail scales properly */
    }
}
