/* ─────────────────────────────────────────
   DY Video Player — 前端樣式
   預設黑底，所有顏色可由 Elementor 後台覆寫
───────────────────────────────────────── */

.dy-vp-wrap {
  display: flex;
  background-color: #111111;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* ── 主播放區 ── */
.dy-vp-main {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dy-vp-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.dy-vp-screen iframe,
.dy-vp-screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.dy-vp-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #666;
  font-size: 13px;
}

.dy-vp-placeholder svg {
  color: #444;
}

/* ── 右側清單 ── */
.dy-vp-sidebar {
  width: 240px;
  flex-shrink: 0;
  background-color: #1a1a1a;
  border-left: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 600px;   /* 可被 JS 依播放器高度動態調整 */
}

.dy-vp-sidebar-header {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #eeeeee;
  background-color: #111111;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.dy-vp-list {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.dy-vp-list::-webkit-scrollbar        { width: 4px; }
.dy-vp-list::-webkit-scrollbar-track  { background: transparent; }
.dy-vp-list::-webkit-scrollbar-thumb  { background: #333; border-radius: 2px; }

/* ── 清單項目 ── */
.dy-vp-item {
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #222;
  border-left: 2px solid transparent;
  transition: background-color 0.15s, border-left-color 0.15s;
  align-items: flex-start;
  box-sizing: border-box;
}

.dy-vp-item:hover {
  background-color: #222;
}

.dy-vp-item.is-active {
  background-color: #2d0000;
  border-left-color: #cc0000;
}

/* ── 縮圖 ── */
.dy-vp-thumb {
  width: 80px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  background: #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.dy-vp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dy-vp-thumb-dur {
  position: absolute;
  bottom: 3px;
  right: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

/* ── 文字資訊 ── */
.dy-vp-item-info {
  flex: 1;
  min-width: 0;
}

.dy-vp-item-title {
  font-size: 12px;
  color: #dddddd;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
}

.dy-vp-item-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 來源徽章 ── */
.dy-vp-badge {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.dy-vp-badge-yt  { background: #c00; color: #fff; }
.dy-vp-badge-vi  { background: #1ab7ea22; color: #1ab7ea; border: 1px solid #1ab7ea55; }
.dy-vp-badge-mp4 { background: #1a3d1a; color: #7ec87e; }

/* ── 空狀態 ── */
.dy-vp-empty {
  padding: 24px;
  text-align: center;
  color: #888;
  font-size: 13px;
  background: #111;
  border-radius: 8px;
}

/* ── RWD：小螢幕改為上下版型 ── */
@media (max-width: 767px) {
  .dy-vp-wrap.dy-vp-has-sidebar {
    flex-direction: column;
  }

  .dy-vp-sidebar {
    width: 100% !important;
    border-left: none;
    border-top: 1px solid #2a2a2a;
    max-height: 280px;
  }
}
