/**
 * VOD Info Card - 影片介紹卡（hover 彈出）
 *
 * 尺寸：220×293px（與 M 卡圖片一致）
 * 場景：M 卡 hover 時覆蓋相鄰卡片顯示詳細資訊
 *
 * ⚠️ 依賴文件（使用此功能的頁面必須引入）：
 * - CSS: css/components/vod-info-card.css （本文件）
 * - JS:  js/vod-info-card.js
 *
 * ⚠️ 適用頁面：
 * - vod/show.html
 * - vod/type.html（如有）
 * - 任何使用 .vod-card--m 的頁面
 */

/* ==================== 主容器 ==================== */
.vod-info-card {
  position: absolute;  /* 使用 absolute 讓 popup 跟隨頁面滾動 */
  /* 讓 ::before 偽元素可以相對定位 */
  width: 220px;
  height: 293px;
  background: #222222;
  border-radius: 8px;
  padding: 15px;
  /* 白色發光陰影（更集中） */
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5),
              0 0 12px rgba(255, 255, 255, 0.25);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateX(22px);  /* 起始位置：右偏 22px */
  transition: none;  /* 消失不需要效果 */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: visible;  /* 讓箭頭可以超出 */
}

.vod-info-card.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity 0.1s ease, transform 0.1s ease;  /* 只有進入有效果 */
}

/* 左側三角形箭頭（指向被 hover 的卡片） */
.vod-info-card::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 5px solid #222222;
}

/* 最右邊卡片：由左往右滑入 */
.vod-info-card--from-left {
  transform: translateX(-22px);
}

/* 最右邊卡片：三角形在右側，指向右 */
.vod-info-card--from-left::before {
  left: auto;
  right: -5px;
  border-right: none;
  border-left: 5px solid #222222;
}

/* ==================== 標題 ==================== */
.vod-info-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
  line-height: 1.2;
  flex-shrink: 0;
  /* 單行截斷 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 元數據區 ==================== */
.vod-info-card__meta {
  margin: 0 0 8px 0;
  padding: 0;
  flex-shrink: 0;
}

.vod-info-card__meta-item {
  display: flex;
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.vod-info-card__meta-item:last-child {
  margin-bottom: 0;
}

.vod-info-card__meta-item dt {
  color: #999999;
  flex-shrink: 0;
  font-size: 12px;
}

.vod-info-card__meta-item dd {
  color: #999999;
  margin: 0;
  font-size: 12px;
  /* 超長截斷 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 類型連結（可點擊） */
.vod-info-card__class-link {
  color: #999999;
  text-decoration: none;
  transition: color 0.2s ease;
}

.vod-info-card__class-link:hover {
  color: #e63f35;
}

/* ==================== 簡介區 ==================== */
.vod-info-card__intro {
  font-size: 12px;
  line-height: 1.6;
  color: #999999;
  margin-bottom: 12px;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.vod-info-card__intro-label {
  color: #999999;
  display: inline;
}

.vod-info-card__intro-text {
  color: #999999;
  display: inline;
}

.vod-info-card__detail-link {
  color: #999999;
  text-decoration: none;
  float: right;
  margin-top: 4px;
}

.vod-info-card__detail-link:hover {
  color: #fff;
}

/* ==================== 按鈕區 ==================== */
.vod-info-card__actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  margin-top: auto;
  padding-bottom: 5px;  /* 離最下 20px（padding 15 + 5） */
}

.vod-info-card__btn {
  width: 86px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e63f35;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  background: transparent;
  color: #e63f35;
}

.vod-info-card__btn:hover {
  background: #e63f35;
  color: #fff;
}

/* 主要按鈕（立即播放）*/
.vod-info-card__btn--primary {
  /* 預設樣式即可 */
}

/* 次要按鈕（收藏）*/
.vod-info-card__btn--secondary {
  /* 預設樣式即可 */
}
