/* Outer container for each player set; takes full width of parent */
.player-set {
  width: 100%;
  margin: 20px auto 40px auto;
  padding: 10px;
  background: #fff;
  border-radius: 5px;
  height: auto;
  overflow: hidden;
  box-sizing: border-box;
}/* Outer container for each player set; takes full width of parent */
.player-set {
  width: 100%;
  margin: 20px auto 40px auto;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 5px;
  height: auto;
  overflow: hidden;
  box-sizing: border-box;
}

/* Player area */
.with-playlist .video-player-section {
  position: relative;
  width: 100%;
  height: 300px;
  box-sizing: border-box;
  margin-bottom: 12px;
  overflow: hidden;
  background: #000;
  padding-right: 0;
}

/* Playlist area under the player */
.with-playlist .video-playlist-section {
  float: left;
  width: 100%;
  height: 260px;
  box-sizing: border-box;
  padding-left: 0;
  overflow: hidden;
}

/* For the player-only instance, the video player takes full width */
.without-playlist .video-player-section {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Clear floats */
.clear {
  clear: both;
}

/* Iframe player fills container */
.video-player-section iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Leave this in case older video.js sections still exist elsewhere */
.video-js {
  width: 100% !important;
  height: 100% !important;
}

/* Video Player Section Headings */
.video-playlist-section h3 {
  text-align: center;
  margin-bottom: 10px;
}

/* Search Box and Tag Filter */
.search-box,
.tag-filter {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 12px;
  box-sizing: border-box;
  background: #fff;
}

/* Video List */
.video-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  max-height: 170px;
  border: 1px solid #ddd;
  background: #f7f7f7;
}

/* Video List Item Layout */
.video-list li {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #ddd;
  padding: 8px 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  background: #f7f7f7;
  box-sizing: border-box;
}

.video-list li:hover {
  background: #f1f1f1;
}

.video-list li.active,
.active {
  background: #e6e6e6 !important;
}

/* Thumbnail image inside list item */
.video-list li img {
  width: 56px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Title text inside list item */
.video-list li span {
  font-size: 12px;
  line-height: 1.4;
  color: #333;
}

/* Optional tag block */
.video-tag {
  display: inline-block;
  background: #f0f0f0;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  color: #333;
}

/* Legacy classes kept in case older markup still uses them */
.thumbnail-column {
  width: 80px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.thumbnail-column img {
  width: 70px;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.title-progress-column {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
}

.title-progress-column .video-title {
  font-size: 12px;
  margin-bottom: 5px;
}

.title-progress-column .watched-indicator {
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  overflow: hidden;
}

.title-progress-column .watched-indicator .progress {
  height: 100%;
  background: #4caf50;
  width: 0%;
}

.tags-aircraft-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
}

.tag-item,
.aircraft-item {
  display: inline-block;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 2px 4px 2px 0;
  font-size: 12px;
}

.duration-column {
  width: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  padding: 0 10px;
}

.color-bar {
  width: 3px;
  background-color: transparent;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .with-playlist .video-player-section {
    height: 220px;
  }

  .with-playlist .video-playlist-section {
    height: 280px;
  }

  .video-list {
    max-height: 185px;
  }

  .video-list li {
    grid-template-columns: 56px 1fr auto auto;
    gap: 8px;
  }

  .video-tag,
  .video-duration {
    display: block;
  }

  .video-tag {
    padding: 4px 8px;
    font-size: 11px;
  }

  .video-duration {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .video-player-section,
  .video-playlist-section {
    float: none;
    width: 100%;
    padding: 0;
    height: auto;
  }

  .player-set {
    height: auto;
  }

  .with-playlist .video-player-section {
    height: 200px;
  }

  .with-playlist .video-playlist-section {
    height: auto;
    overflow: visible;
  }

  .video-list {
    max-height: 220px;
  }

  .video-list li {
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .video-tag {
    display: none;
  }

  .video-duration {
    display: block;
    font-size: 12px;
  }
}

.video-list li {
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) max-content max-content !important;
  align-items: center !important;
  column-gap: 12px !important;
  padding: 10px 12px !important;
}

.video-list li img {
  width: 56px !important;
  height: 36px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
}

.video-list li span {
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

.video-list li .video-tag {
  display: inline-block !important;
  justify-self: end !important;
  white-space: nowrap !important;
}

.video-list li .video-duration {
  display: block !important;
  justify-self: end !important; 
  min-width: 42px !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #2f3b4a !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.video-list li a.video-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) max-content max-content;
  align-items: center;
  column-gap: 12px;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.video-list li a.video-link:hover {
  text-decoration: none;
}

/* Player area */
.with-playlist .video-player-section {
  position: relative;
  width: 100%;
  height: 300px;
  box-sizing: border-box;
  margin-bottom: 12px;
  overflow: hidden;
  background: #000;
  padding-right: 0;
}

/* Playlist area under the player */
.with-playlist .video-playlist-section {
  float: left;
  width: 100%;
  height: 260px;
  box-sizing: border-box;
  padding-left: 0;
  overflow: hidden;
}

/* For the player-only instance, the video player takes full width */
.without-playlist .video-player-section {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Clear floats */
.clear {
  clear: both;
}

/* Iframe player fills container */
.video-player-section iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Leave this in case older video.js sections still exist elsewhere */
.video-js {
  width: 100% !important;
  height: 100% !important;
}

/* Video Player Section Headings */
.video-playlist-section h3 {
  text-align: center;
  margin-bottom: 10px;
}

.tag-filter {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 12px;
  box-sizing: border-box;
  background: #fff;
}

/* Video List */
.video-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  max-height: 170px;
  border: 1px solid #ddd;
  background: #f7f7f7;
}

/* Video List Item Layout */
.video-list li {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #ddd;
  padding: 8px 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  background: #f7f7f7;
  box-sizing: border-box;
}

.video-list li:hover {
  background: #f1f1f1;
}

.video-list li.active,
.active {
  background: #e6e6e6 !important;
}

/* Thumbnail image inside list item */
.video-list li img {
  width: 56px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Title text inside list item */
.video-list li span {
  font-size: 12px;
  line-height: 1.4;
  color: #333;
}

/* Optional tag block */
.video-tag {
  display: inline-block;
  background: #f0f0f0;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  color: #333;
}

/* Legacy classes kept in case older markup still uses them */
.thumbnail-column {
  width: 80px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.thumbnail-column img {
  width: 70px;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.title-progress-column {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
}

.title-progress-column .video-title {
  font-size: 12px;
  margin-bottom: 5px;
}

.title-progress-column .watched-indicator {
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  overflow: hidden;
}

.title-progress-column .watched-indicator .progress {
  height: 100%;
  background: #4caf50;
  width: 0%;
}

.tags-aircraft-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
}

.tag-item,
.aircraft-item {
  display: inline-block;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 2px 4px 2px 0;
  font-size: 12px;
}

.duration-column {
  width: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  padding: 0 10px;
}

.color-bar {
  width: 3px;
  background-color: transparent;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .with-playlist .video-player-section {
    height: 220px;
  }

  .with-playlist .video-playlist-section {
    height: 280px;
  }

  .video-list {
    max-height: 185px;
  }

  .video-list li {
    grid-template-columns: 56px 1fr auto auto;
    gap: 8px;
  }

  .video-tag,
  .video-duration {
    display: block;
  }

  .video-tag {
    padding: 4px 8px;
    font-size: 11px;
  }

  .video-duration {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .video-player-section,
  .video-playlist-section {
    float: none;
    width: 100%;
    padding: 0;
    height: auto;
  }

  .player-set {
    height: auto;
  }

  .with-playlist .video-player-section {
    height: 200px;
  }

  .with-playlist .video-playlist-section {
    height: auto;
    overflow: visible;
  }

  .video-list {
    max-height: 220px;
  }

  .video-list li {
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .video-tag {
    display: none;
  }

  .video-duration {
    display: block;
    font-size: 12px;
  }
}

.video-list li {
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) max-content max-content !important;
  align-items: center !important;
  column-gap: 12px !important;
  padding: 10px 12px !important;
}

.video-list li img {
  width: 56px !important;
  height: 36px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
}

.video-list li span {
  min-width: 0 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

.video-list li .video-tag {
  display: inline-block !important;
  justify-self: end !important;
  white-space: nowrap !important;
}

.video-list li .video-duration {
  display: block !important;
  justify-self: end !important;
  min-width: 42px !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #2f3b4a !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.watched-indicator {
  display: none !important;
}

/* Fix overlap — stack player and playlist vertically */
.player-set.with-playlist {
  display: flex !important;
  flex-direction: column !important;
}

.with-playlist .video-playlist-section {
  float: none !important;
  width: 100% !important;
  height: auto !important;
  max-height: 260px !important;
  overflow-y: auto !important;
}

.with-playlist .video-player-section {
  flex-shrink: 0 !important;
}

.player-set.with-playlist {
  overflow: visible !important;
}

