/* YouTube Tutorials Dialog - Accordion Style (MNR Design) */

/* Responsive Dialog Box Sizing */
#DlgTutorials_Box {
    width: 1200px !important;
    height: 1000px !important;
    max-width: 95vw;
    max-height: 95vh;
}

/* Medium screens */
@media only screen and (max-width: 1400px) {
    #DlgTutorials_Box {
        width: 90vw !important;
        height: 90vh !important;
    }
}

/* Small screens */
@media only screen and (max-width: 768px) {
    #DlgTutorials_Box {
        width: 95vw !important;
        height: 95vh !important;
    }
}

/* Content area to remove default padding overflow */
#DlgTutorials_Content {
    height: calc(100% - 50px); /* Box height minus heading */
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Playlists Container - Scrollable list below player */
#DlgTutorials_Playlists {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    padding-right: 5px;
}

/* Video Player Wrapper */
#tutorial-video-player-wrapper {
    flex-shrink: 0;
    margin-bottom: 15px;
}

/* Responsive Player Height */
#tutorial-video-player {
    height: 500px;
}

@media only screen and (max-width: 1400px) {
    #tutorial-video-player {
        height: 400px;
    }
}

@media only screen and (max-width: 768px) {
    #tutorial-video-player {
        height: 300px;
    }
}

/* Accordion Item Container */
.tutorial-accordion-item {
    margin-bottom: 5px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Videos Container - NO max-height, NO scroll */
.tutorial-videos-container {
    overflow: visible;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Individual Video Item (Simplified) */
.tutorial-video-item-simple {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

@media only screen and (max-width: 768px) {
    .tutorial-video-item-simple {
        padding: 8px;
        margin-bottom: 5px;
    }
}

.tutorial-video-item-simple:hover {
    background-color: #f0f0f0;
}

.tutorial-video-item-simple.tutorial-video-active {
    background-color: #e3f2fd;
    border-left: 3px solid #2196F3;
}

.tutorial-video-item-simple.tutorial-video-active:hover {
    background-color: #e3f2fd;
}

.tutorial-video-item-simple img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Responsive thumbnails for small screens */
@media only screen and (max-width: 768px) {
    .tutorial-video-item-simple img {
        width: 80px;
        height: 45px;
        margin-right: 10px;
    }
}

.tutorial-video-item-simple .video-number {
    font-weight: bold;
    margin-right: 10px;
    min-width: 25px;
    color: #666;
    flex-shrink: 0;
}

.tutorial-video-item-simple .video-title {
    flex: 1;
    font-weight: 500;
    font-size: 16px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media only screen and (max-width: 768px) {
    .tutorial-video-item-simple .video-title {
        font-size: 14px;
    }
}

.tutorial-video-item-simple .play-icon {
    font-size: 28px;
    color: #e74c3c;
    margin-left: 15px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

@media only screen and (max-width: 768px) {
    .tutorial-video-item-simple .play-icon {
        font-size: 24px;
        margin-left: 10px;
    }
}

.tutorial-video-item-simple:hover .play-icon {
    transform: scale(1.1);
}

/* Arrow Animation */
.ArrowHeadDown {
    transition: transform 0.3s ease;
}

/* Scrollbar for Playlists Container */
#DlgTutorials_Playlists::-webkit-scrollbar {
    width: 8px;
}

#DlgTutorials_Playlists::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#DlgTutorials_Playlists::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#DlgTutorials_Playlists::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading State */
.tutorial-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Error State */
.tutorial-error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
}

/* Empty State */
.tutorial-empty {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tutorial-video-item-simple img {
        width: 80px;
        height: 45px;
    }

    .tutorial-video-item-simple .video-title {
        font-size: 14px;
    }

    #DlgTutorials_Box {
        width: 95vw !important;
        max-width: 95vw;
    }
}