/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

/* YouTube Playlists Plugin Styles */
/* Hide scrollbar for Chrome, Safari and Opera */
.ytp-sidebar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.ytp-sidebar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.ytp-container {
    max-width: 100%;
    margin: 20px 0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ytp-playlists-grid, .ytp-videos-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.ytp-playlist-item, .ytp-video-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ytp-playlist-item:hover, .ytp-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.playlist-thumbnail, .video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.playlist-thumbnail img, .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ytp-playlist-item:hover .playlist-thumbnail img,
.ytp-video-item:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 24px;
}

.ytp-playlist-item:hover .play-overlay,
.ytp-video-item:hover .play-overlay {
    opacity: 1;
}

.playlist-info, .video-info {
    padding: 15px;
}

.playlist-info h3, .video-info h4 {
    font-family: 'Open Sans', sans-serif;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}

.video-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Video Description Styling */
.ytp-video-description {
    font-family: 'Open Sans', sans-serif;
    margin: 15px 0;
    padding: 15px;
    background: #ECF0F2;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    border: 1px solid #e5e5e5;
}

.ytp-video-description .section-header {
    font-weight: 600;
    font-size: 1.1em;
    margin: 20px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
    color: #1a1a1a;
}

.ytp-video-description .learn-header {
    color: #1a73e8;
}

.ytp-video-description .perfect-for-header {
    color: #e91e63;
    margin-top: 25px;
}

.ytp-video-description .perfect-for-item {
    position: relative;
    padding-left: 25px;
    margin: 8px 0;
    line-height: 1.5;
}

.ytp-video-description .perfect-for-item:before {
    content: '✓';
    color: #34a853;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f5e9;
    border-radius: 50%;
    font-size: 12px;
}

.ytp-video-description p {
    margin: 10px 0;
    line-height: 1.6;
    color: #334155;
}

.ytp-video-description .ytp-description-content {
    display: block;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.ytp-video-description strong,
.ytp-video-description b {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.05em;
    display: block;
    margin: 15px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
}

/* Style for 'What You'll Learn' section */
.ytp-video-description p:has(> strong:first-child:contains("What You'll Learn")),
.ytp-video-description p:has(> b:first-child:contains("What You'll Learn")) {
    position: relative;
    padding-left: 35px;
    margin: 25px 0 15px 0;
    color: #1a1a1a;
    font-size: 1.1em;
    font-family: 'Open Sans', sans-serif;
}

.ytp-video-description p:has(> strong:first-child:contains("What You'll Learn"))::before,
.ytp-video-description p:has(> b:first-child:contains("What You'll Learn"))::before {
    content: '📚';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    margin-right: 10px;
}

/* Style for 'Perfect for' section */
.ytp-video-description p:has(> strong:first-child:contains('Perfect for')),
.ytp-video-description p:has(> b:first-child:contains('Perfect for')) {
    position: relative;
    padding-left: 35px;
    margin: 25px 0 15px 0;
    color: #1a1a1a;
    font-size: 1.1em;
    font-family: 'Open Sans', sans-serif;
}

.ytp-video-description p:has(> strong:first-child:contains('Perfect for'))::before,
.ytp-video-description p:has(> b:first-child:contains('Perfect for'))::before {
    content: '🎯';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    margin-right: 10px;
}

/* Style for list items under these sections */
.ytp-video-description p:has(> strong:first-child) + p,
.ytp-video-description p:has(> b:first-child) + p {
    padding-left: 35px;
    margin: 5px 0;
    position: relative;
    line-height: 1.6;
    font-family: 'Open Sans', sans-serif;

}

.ytp-video-description p:has(> strong:first-child) + p::before,
.ytp-video-description p:has(> b:first-child) + p::before {
    content: '→';
    color: #1a73e8;
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
    margin-right: 5px;
    transition: transform 0.2s ease;
}

.ytp-video-description p:has(> strong:first-child) + p:hover::before,
.ytp-video-description p:has(> b:first-child) + p:hover::before {
    transform: translateX(3px);
}

/* Hover effect for list items */
.ytp-video-description p:has(> strong:first-child) + p:hover,
.ytp-video-description p:has(> b:first-child) + p:hover {
    color: #1a73e8;
    cursor: default;
    font-family: 'Open Sans', sans-serif;

}
.ytp-video-description {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    border: 1px solid #e5e5e5;
    font-family: 'Open Sans', sans-serif;

}

.ytp-video-description p {
    margin: 0 0 10px 0;
    color: #334155;
    font-family: 'Open Sans', sans-serif;

}

.ytp-video-description .ytp-description-content {
    display: inline;
}
.ytp-description-content, .ytp-description-short, .ytp-description-full,
.ytp-more-text, .ytp-less-text, .ytp-more-button, .ytp-more-arrow{
    color: #334155;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Open Sans', sans-serif;
}
.ytp-video-description .ytp-description-more{
    display: none;
    margin-top: 10px;
    color: #334155;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Open Sans', sans-serif;

}

.ytp-more-button {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: #606060;
    cursor: pointer;
    padding: 0;
    margin: 5px 0 0 0;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Open Sans', sans-serif;
}

.ytp-more-button:hover {
    color: #030303;
}

.ytp-more-arrow {
    width: 18px;
    height: 18px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.ytp-more-button[aria-expanded="true"] .ytp-more-arrow {
    transform: rotate(180deg);
}

.ytp-less-text {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ytp-playlists-grid, .ytp-videos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .ytp-playlists-grid, .ytp-videos-grid {
        grid-template-columns: 1fr !important;
    }
}
/* Base style */
.ytp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
  }
  
  /* Mobile and small screens (up to 767px) */
  @media (max-width: 767px) {
    .ytp-container {
      display:flex;
      flex-direction: column;
    }
  }
  
  /* Tablets and larger screens (768px and up) */
  @media (min-width: 768px) {
    .ytp-container {
      display:flex;
      gap: 20px;
      flex-direction: row;
    }
  }
/* Sidebar base styles */
.ytp-sidebar {
    flex: 1;
    max-width: 400px;
    overflow-y: visible; 
  }
  
  /* For tablets and larger: enable scrolling */
  @media (min-width: 767px) {
    .ytp-sidebar {
      overflow-y: auto;
      max-height: 100vh;
      border: 1px solid #F0F0F0;
      border-radius: 5px;
      padding: 0 20px 20px 20px;
    }
  }
  
/* Tablet and Desktop (768px and above) */
@media (min-width: 768px) {
    .ytp-description-more {
      display: block !important;
      white-space: pre-line !important;
      max-height: none !important;
      overflow: visible !important;
      text-overflow: unset !important;
    }
  
    .ytp-description-content {
      display: none !important;
    }
  
    .ytp-more-button {
      visibility: hidden !important;
      pointer-events: none !important;
      height: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
    }
  }
  
  /* Mobile only (767px and below) */
  @media (max-width: 767px) {
    .ytp-description-more {
      /* No !important so JS can control it */
      display: none;
    }
  
    .ytp-description-content {
      display: inline;
    }
  
    .ytp-more-button {
      display: flex !important;
      visibility: visible !important;
      pointer-events: auto !important;
      height: auto !important;
      margin-top: 4px !important;
    }
  }
  
  
/* Main container for the video and sidebar */
.ytp-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
    overflow: visible !important;
}

/* Main content area */
.ytp-main-content {
    flex: 1;
    min-width: 0;
}

/* Sticky sidebar for devices 767px and up */
@media (min-width: 767px) {
    .wrapper-sidebar {
        position: sticky;
        top: 20px;
        width: 350px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        overflow-x: hidden;
        background: #fff;
        border-radius: 8px;
        scrollbar-width: none; 
        -ms-overflow-style: none; 
    }
    .wrapper-sidebar::-webkit-scrollbar {
        display: none;
    }
    .ytp-sidebar-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        padding: 15px;
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
}