/* Agora / live stage — fullscreen fill (TikTok shell, all viewports) */
body.live_stream_tiktok_lock {
  overflow: hidden !important;
}

body.live_stream_tiktok_lock > .header,
body.live_stream_tiktok_lock .mobile_footer_fixed_menu_container {
  display: none !important;
}

.live_wrapper_tik.live_tiktok_mobile {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: 100% !important;
  min-height: 100% !important;
  padding-top: 0 !important;
  margin: 0 !important;
  background: #000 !important;
  z-index: 120 !important;
}

.live_wrapper_tik.live_tiktok_mobile .live_left,
.live_wrapper_tik.live_tiktok_mobile .live_left_in_wrapper,
.live_wrapper_tik.live_tiktok_mobile .live_left_in_holder {
  display: none !important;
}

.live_wrapper_tik.live_tiktok_mobile .live_right_in_wrapper {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
}

.live_wrapper_tik.live_tiktok_mobile .live_right_in_left {
  position: absolute !important;
  inset: 0 !important;
  flex: 1 1 auto !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.live_wrapper_tik.live_tiktok_mobile .live_right_in_right {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  height: auto !important;
  border-left: none !important;
}

.live_wrapper_tik.live_tiktok_mobile .live__live_video_holder.max_height_live_mobile {
  max-height: none !important;
  height: 100% !important;
}

.live_wrapper_tik.live_tiktok_mobile .live_vide__holder,
.live_wrapper_tik.live_tiktok_mobile .live_vide__holder .filtvid,
.live_wrapper_tik.live_tiktok_mobile .live_vide__holder .player,
.live_wrapper_tik.live_tiktok_mobile .live_vide__holder .player .col,
.live_wrapper_tik.live_tiktok_mobile .live_vide__holder .player .col div,
.live_wrapper_tik.live_tiktok_mobile #local-player,
.live_wrapper_tik.live_tiktok_mobile #remote-playerlist,
.live_wrapper_tik.live_tiktok_mobile #local-player [id^="agora-video-player"],
.live_wrapper_tik.live_tiktok_mobile #local-player [id^="player-"],
.live_wrapper_tik.live_tiktok_mobile #remote-playerlist [id^="agora-video-player"],
.live_wrapper_tik.live_tiktok_mobile #remote-playerlist [id^="player-"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  background: transparent !important;
  overflow: hidden;
}

.live_wrapper_tik.live_tiktok_mobile #local-player video,
.live_wrapper_tik.live_tiktok_mobile #remote-playerlist video,
.live_wrapper_tik.live_tiktok_mobile .agora_video_player,
.live_wrapper_tik.live_tiktok_mobile .live_stage_webrtc video,
.live_wrapper_tik.live_tiktok_mobile .live_stage_hls video {
  object-fit: cover !important;
  object-position: center center !important;
  max-height: none !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
}

/* Header overlay was covering the entire frame (inset:0) — keep only top gradient */
.live_wrapper_tik.live_tiktok_mobile .live_video_header,
.live_wrapper_tik.live_tiktok_mobile .live_video_header.live_video_header_mobile {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: block !important;
  padding: max(10px, env(safe-area-inset-top)) 12px 36px !important;
  margin: 0 !important;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.48) 0%,
    rgba(0, 0, 0, 0.12) 55%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
  border-bottom: none !important;
  pointer-events: none;
}

.live_wrapper_tik.live_tiktok_mobile .live_video_header > * {
  pointer-events: auto;
}

/* إخفاء لوحة الشات/الهدايا/التفاعلات القديمة — الاعتماد على overlay + شريط سفلي */
.live_wrapper_tik.live_tiktok_mobile .live_right_in_right .live_right_in_right_in,
.live_wrapper_tik.live_tiktok_mobile .live_right_in_right .live_gifters_leaderboard,
.live_wrapper_tik.live_tiktok_mobile .live_right_in_right .live_interaction_modules,
.live_wrapper_tik.live_tiktok_mobile .live_right_in_right .live_chat_restriction_notice.is-muted {
  display: none !important;
  visibility: hidden !important;
}

.live_wrapper_tik.live_tiktok_mobile .live_stage_main_label {
  display: none !important;
}

.live_wrapper_tik.live_tiktok_mobile .live_holder_plus_in .live_pulse {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  z-index: 45;
}

/* Stories rail: keep LIVE bubbles right after "your story"
   (mystoriesstyle flex-grow + default order pushed them off-screen) */
.stories_scroller > .story-view-item-fake.chsStoryw {
  -webkit-box-ordinal-group: 1;
      -ms-flex-order: 0;
          order: 0;
}

.stories_scroller > .story-view-item-fake.story-live {
  -webkit-box-ordinal-group: 2;
      -ms-flex-order: 1;
          order: 1 !important;
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
}

.stories_scroller > .my-stories-wrapper,
.stories_scroller > .mystoriesstyle {
  -webkit-box-ordinal-group: 3;
      -ms-flex-order: 2;
          order: 2 !important;
  -webkit-box-flex: 0 !important;
      -ms-flex-positive: 0 !important;
          flex-grow: 0 !important;
  -ms-flex-negative: 0;
      flex-shrink: 0;
  min-width: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 18px;
}
