/**
 * 防止移動端長按/點擊出現高亮框和焦點邊框
 *
 * 問題：Chrome 在長按圖片、連結時會顯示邊框
 * 原因：tap-highlight + :focus + :focus-visible + :focus-within 狀態
 * 解決：統一處理所有互動元素的觸控反饋和焦點狀態
 *
 * 適用於：
 * - 所有連結 (<a>)
 * - 所有圖片 (<img>)
 * - 所有按鈕 (<button>)
 * - 所有卡片組件
 *
 * 焦點狀態說明：
 * - :focus - 元素獲得焦點時
 * - :focus-visible - 鍵盤導航時的焦點（Chrome 預設顯示）
 * - :focus-within - 元素或其子元素獲得焦點時
 */

/* ==========================================
   【全域規則】移除所有 focus 狀態的 outline
   ========================================== */

*:focus,
*:focus-visible,
*:focus-within {
  outline: none !important;
}

/* ==========================================
   【通用規則】所有連結
   ========================================== */

a {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
}

/* 移除 focus、focus-visible、focus-within 的 outline */
a:focus,
a:focus-visible,
a:focus-within {
  outline: none !important;
}

/* 連結內的圖片 */
a img {
  -webkit-user-drag: none !important;
  user-select: none !important;
  pointer-events: none !important;
}

/* ==========================================
   【通用規則】所有圖片
   ========================================== */

img {
  -webkit-user-drag: none !important;
  user-select: none !important;
}

/* ==========================================
   【通用規則】所有按鈕
   ========================================== */

button {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* 移除按鈕的 focus 邊框 */
button:focus,
button:focus-visible,
button:focus-within {
  outline: none !important;
}

button img {
  -webkit-user-drag: none !important;
  user-select: none !important;
  pointer-events: none !important;
}

/* 評論提交按鈕 */
.comment-submit-btn {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* ==========================================
   【卡片組件】防止選取和拖曳
   ========================================== */

.vod-card {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

.vod-card__link,
.vod-card__title-link {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* 移除卡片連結的 focus 邊框 */
.vod-card__link:focus,
.vod-card__link:focus-visible,
.vod-card__link:focus-within,
.vod-card__title-link:focus,
.vod-card__title-link:focus-visible,
.vod-card__title-link:focus-within {
  outline: none !important;
}

.vod-card__image img,
.vod-card__pic {
  -webkit-user-drag: none !important;
  user-select: none !important;
  pointer-events: none !important;
}

/* ==========================================
   【排行榜】防止選取
   ========================================== */

.rank__item a,
.rank__link {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* 移除排行榜連結的 focus 邊框 */
.rank__item a:focus,
.rank__item a:focus-visible,
.rank__item a:focus-within,
.rank__link:focus,
.rank__link:focus-visible,
.rank__link:focus-within {
  outline: none !important;
}

/* ==========================================
   【輪播圖】防止拖曳
   ========================================== */

.kv_item img,
.kv_item__image img {
  -webkit-user-drag: none !important;
  user-select: none !important;
  pointer-events: none !important;
}

.kv_list-item,
.kv_list-link {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* ==========================================
   【操作按鈕】防止選取
   ========================================== */

.detail-actions__btn {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

.detail-actions__btn img {
  -webkit-user-drag: none !important;
  user-select: none !important;
  pointer-events: none !important;
}

/* ==========================================
   【篩選按鈕】防止選取
   ========================================== */

.filter-btn,
.filter-row__items a,
.filter-tabs__link,
.filter-tabs__item,
.filter-sort__btn {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* ==========================================
   【Tab 標籤】防止選取
   ========================================== */

.detail-tabs__link,
.years__item,
.tab-item,
.tab-link,
.sidebar-tabs a {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* ==========================================
   【分集按鈕】防止選取
   ========================================== */

.episode-item,
.episode-link,
.result-episode-btn,
.group-btn,
.episode-controls__group-btn {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* ==========================================
   【分頁按鈕】防止選取
   ========================================== */

.pagination a,
.pagination button,
.load-more__btn {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* ==========================================
   【搜尋結果】防止選取
   ========================================== */

.result-detail a,
.result-poster,
.result-more,
.result-player-link,
.result-meta__link,
.result-description__link {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
}

.result-poster__image img,
.result-more__image {
  -webkit-user-drag: none !important;
  user-select: none !important;
  pointer-events: none !important;
}

/* ==========================================
   【播放頁控制項】防止選取
   ========================================== */

.control-link,
.player-control {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}

/* ==========================================
   【分類導覽】防止選取
   ========================================== */

.category-bar__link,
.category-bar__item,
.category-bar__label {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
}
