/* 共享網頁分頁（webtab.js）：舞台內網頁圖層、分頁切換鈕；待播分頁內的共享網頁區塊 */

/* 網頁圖層：播放器（z 1）與空舞台（z 2）之上、畫布（z 4）之下；播放器不銷毀，只是被蓋住 */
.web-layer { position: absolute; inset: 0; z-index: 3; background: #fff; }
.web-frame-box, .web-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.web-frame { background: #fff; }

/* 網頁分頁時隱藏播放器的遮罩、錯誤訊息與「點此加入同步播放」（切回影片時恢復） */
.stage[data-tab="web"] .stage-empty,
.stage[data-tab="web"] .stage-msg,
.stage[data-tab="web"] .stage-resume { display: none; }

/* 禁止嵌入 */
.web-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; padding: 12px 12px 56px; text-align: center;
  background: #0b0c10; color: var(--fg);
}
.web-msg-title { font-size: 18px; font-weight: 600; }
.web-msg-host { color: var(--fg-2); font-size: 14px; overflow-wrap: anywhere; }
.web-msg .btn-row { flex-wrap: wrap; justify-content: center; gap: 8px; }
.web-msg .btn, .web-notice .btn { white-space: nowrap; padding: 0 12px; font-size: 14px; }
.web-msg .btn .icon, .web-notice .btn .icon { width: 20px; height: 20px; }

/* 無法確認可否嵌入：下方提示（分頁切換鈕之上） */
.web-notice {
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%);
  width: min(96%, 560px); padding: 4px 4px 4px 10px; border-radius: 12px;
  background: rgba(17, 19, 24, .92); color: var(--fg); font-size: 12px; line-height: 1.35;
  display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
.web-notice-text { flex: 1; min-width: 0; }
.web-notice-row { display: flex; align-items: center; gap: 2px; flex: none; }
.web-notice-close { color: var(--fg-2); }

/* 舞台分頁切換鈕（網頁分頁時，舞台下方中央） */
.stage-tabs {
  position: absolute; z-index: 12; left: 50%; bottom: 6px; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 0; border-radius: 999px;
  background: rgba(17, 19, 24, .82); box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  transition: opacity .25s, visibility .25s;
}
.stage-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: var(--tap); height: var(--tap); padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: #fff; font-size: 14px; white-space: nowrap; cursor: pointer;
  touch-action: manipulation;
}
.stage-tab .icon { width: 20px; height: 20px; }
.stage-tab[aria-pressed="true"] { background: var(--accent); }
.stage-tab-icon { padding: 0; }
.stage-tabs.idle { visibility: hidden; opacity: 0; }
.stage-to-web-solo { position: absolute; z-index: 12; top: 6px; right: 6px; }

/* 待播分頁：共享網頁區塊 */
.web-section { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.web-current { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); }
.web-cur-info { display: flex; align-items: center; gap: 6px; min-width: 0; }
.web-cur-info .icon { width: 20px; height: 20px; color: var(--fg-2); }
.web-cur-host { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.web-cur-state { color: var(--fg-2); font-size: 13px; flex: none; }
.web-cur-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-danger-text { color: var(--danger); }

/* 其他人要求在新分頁開啟 */
.web-open-sheet { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.web-open-url { color: var(--fg-2); font-size: 13px; overflow-wrap: anywhere; }

/* 手機直式：舞台很矮，「無法確認」提示的按鈕只留圖示 */
@media (max-width: 599px) {
  .web-notice .web-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .web-notice .btn { padding: 0; width: var(--tap); }
}

@media (prefers-reduced-motion: reduce) {
  .stage-tabs { transition: none; }
}
