/* ==========================================================================
   DTV Video Playlist
   Desktop: video 837px | gap 5px | liste 358px = 1200px toplam
   ========================================================================== */

.dtv-video-playlist {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 358px;
  gap: 5px;
  align-items: stretch;
  margin: 24px 0 32px;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
}

.dtv-video-playlist__player {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dtv-video-playlist__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101820;
  object-fit: contain;
  flex: 1;
}

.dtv-video-playlist__title {
  display: none;
}

.video-player-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #101820;
}

.video-player-shell > video {
  position: relative;
  z-index: 0;
}

.video-player-overlay {
  position: absolute;
  z-index: 2;
  inset: 0 0 48px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100% - 48px);
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
  cursor: pointer;
  transition: background-color 180ms ease, opacity 180ms ease;
}

.video-player-overlay::before {
  content: "";
  position: absolute;
  width: 104px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  background: rgba(20, 34, 48, 0.72);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.video-player-overlay::after {
  content: "";
  position: relative;
  width: 0;
  height: 0;
  margin-left: 8px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 27px solid #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.video-player-shell:hover .video-player-overlay,
.video-player-overlay:focus-visible {
  background: rgba(0, 0, 0, 0.34);
}

.video-player-shell:hover .video-player-overlay::before,
.video-player-overlay:focus-visible::before {
  transform: scale(1.08);
  background: rgba(20, 34, 48, 0.92);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.52);
}

.video-player-overlay:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.video-player-shell.is-playing .video-player-overlay {
  opacity: 0;
  pointer-events: none;
}

.dtv-video-playlist--single {
  display: block;
  width: 100%;
  margin: 0 0 24px;
}

.dtv-video-playlist--single .dtv-video-playlist__player {
  display: block;
}

.dtv-video-playlist--single .dtv-video-playlist__video {
  flex: none;
  height: auto;
}

/* --------------------------------------------------------------------------
   Playlist listesi: dis cerceve + arka plan
   -------------------------------------------------------------------------- */
.dtv-video-playlist__list {
  display: flex;
  flex-direction: column;
  width: 358px;
  height: 100%;
  max-height: 471px;
  box-sizing: border-box;
  background-color: #e7f0fe !important;
  border: 3px solid #aedcfa;   /* Dis cerceve - tum listenin etrafinda */
  overflow: hidden;
  gap: 4px;                    /* Item'lar arasi bosluk (ic cerceveler gorunsun) */
  padding: 4px;                /* Dis cerceve ile itemlar arasinda nefes */
}

/* --------------------------------------------------------------------------
   Her item: kendi ic cercevesi
   -------------------------------------------------------------------------- */
.dtv-video-playlist__item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 0 0 calc((100% - 16px) / 5);
  width: 100%;
  padding: 0;
  border: 3px solid #aedcfa;  /* Her videonun kendi cercevesi */
  border-radius: 2px;
  background: #ffffff;
  color: #1a3a5c;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.dtv-video-playlist__item:hover {
  background: #d0e8fb;
  border-color: #5ab4f0;
}

.dtv-video-playlist__item.is-active {
  background: #c2dff7;
  border-color: #2d88c8;
}

/* --------------------------------------------------------------------------
   Thumbnail: item yuksekligini tamamen doldurur, 16:9 orani
   -------------------------------------------------------------------------- */
.dtv-video-playlist__thumbnail {
  display: block;
  flex-shrink: 0;
  height: 100% !important;
  width: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

/* --------------------------------------------------------------------------
   Baslik
   -------------------------------------------------------------------------- */
.dtv-video-playlist__item-title {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.15px;
  color: #1a3a5c;
  word-break: break-word;
  overflow: hidden;
}

.dtv-video-playlist__item.is-active .dtv-video-playlist__item-title {
  color: #0d2a4a;
}

/* --------------------------------------------------------------------------
   Responsive: 995px alti - tek sutun (Tablet ve Mobil)
   -------------------------------------------------------------------------- */
@media (max-width: 995px) {
  .dtv-video-playlist {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 16px;
    align-items: start;
    margin: 16px 0 24px;
  }

  .dtv-video-playlist__video {
    max-width: 100%;
    width: 100%;
  }

  .dtv-video-playlist__list {
    width: 100%;
    height: auto;
    max-height: 380px;
    overflow-y: auto;
  }

  .dtv-video-playlist__item {
    flex: 0 0 auto;
    min-height: 68px;
  }

  .dtv-video-playlist__thumbnail {
    flex-shrink: 0;
    width: 110px !important;
    height: 62px !important;
    aspect-ratio: unset;
    align-self: center;
  }
}

/* --------------------------------------------------------------------------
   Kucuk mobil
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .dtv-video-playlist {
    margin: 16px 0 24px;
  }

  .dtv-video-playlist__list {
    display: none;
  }

  .dtv-video-playlist__player {
    width: 100%;
  }

  .dtv-video-playlist__thumbnail {
    width: 90px !important;
    height: 51px !important;
  }

  .dtv-video-playlist__item-title {
    font-size: 11px !important;
    padding: 6px 8px;
  }
}

/* ==========================================================================
   Video.js Player & YouTube Button Integration
   ========================================================================== */

.video-player-shell .video-js {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 16 / 9;
  background-color: #101820;
}

/* Big Play Button - Modern Accent */
.video-player-shell .video-js .vjs-big-play-button {
  background-color: rgba(220, 20, 60, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  width: 68px;
  height: 68px;
  line-height: 64px;
  margin-top: -34px;
  margin-left: -34px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-player-shell .video-js:hover .vjs-big-play-button {
  background-color: #e50914;
  transform: scale(1.1);
}

/* Control Bar Styling */
.video-player-shell .video-js .vjs-control-bar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35), transparent);
  height: 48px;
  font-size: 13px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Allow normal hide on inactive while video is actively playing */
.video-player-shell .video-js.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
  opacity: 0 !important;
  visibility: visible;
  pointer-events: none;
}

/* YouTube Button in Control Bar */
.video-js .vjs-youtube-button {
  cursor: pointer;
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px;
  height: 100%;
}

.video-js .vjs-youtube-button .vjs-icon-placeholder {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
}

.video-js .vjs-youtube-button .vjs-icon-placeholder:before {
  content: "" !important;
  display: none !important;
}

.video-js .vjs-youtube-button svg {
  display: block;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.2s ease;
}

.video-js .vjs-youtube-button:hover svg {
  transform: scale(1.22);
  filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.95));
}


