
/* 11RD LIVE — Mobile UI */

/* มือถือ */
@media (max-width: 800px) {
  .live {
    min-height: 100vh;
    min-height: 100dvh;
    background: #080808;
  }

  .livegrid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px;
    min-width: 0;
  }

  /* พื้นที่วิดีโอ LIVE */
  .stage {
    position: relative;
    width: 100%;
    height: 76dvh;
    min-height: 450px;
    border-radius: 14px;
    overflow: hidden;
    isolation: isolate;
    background: #000;
    box-sizing: border-box;
  }

  .stage video,
  .stage .remote-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .stage .badge {
    position: absolute;
    top: 12px;
    left: 10px;
    z-index: 40;
  }

  .stage .clock {
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 40;
  }

  /* ปุ่มลอยด้านขวาบนวิดีโอ */
  
.video-toolbar {
  position: absolute;
  top: 58px;
  right: 5px;
  bottom: 120px;
  z-index: 50;
  width: 64px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 25px;
  overflow-y: auto;
  scrollbar-width: none;
  background: transparent;
  border: 0;
  pointer-events: none;
}

.video-toolbar::-webkit-scrollbar {
  display: none;
}

/* วงกลมแบบ TikTok */
.video-toolbar button {
  position: relative;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 25px;
  line-height: 1;
  background: rgba(35, 35, 35, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  touch-action: manipulation;
}

.video-toolbar button:active {
  transform: scale(0.92);
}

.video-toolbar button.active,
.video-toolbar button[aria-pressed="true"] {
  background: rgba(254, 44, 85, 0.9);
  border-color: #fe2c55;
}

/* ข้อความอยู่ใต้ปุ่มวงกลม */
.video-toolbar button .toolbar-label {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 4px #000;
}
  /* แถบสินค้าแนวนอนด้านล่างวิดีโอ */
  .live-pinned-strip {
    position: absolute;
    left: 7px;
    right: 51px;
    bottom: 8px;
    z-index: 45;
    display: flex;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
    padding: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background: rgba(10, 10, 10, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .live-pinned-strip::-webkit-scrollbar {
    display: none;
  }

  .live-pinned-card {
    flex: 0 0 100px;
    width: 100px;
    min-width: 0;
    padding: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9px;
    text-align: left;
  }

  .live-pinned-card.is-pinned {
    background: rgba(255, 48, 48, 0.18);
    border-color: rgba(255, 112, 112, 0.9);
  }

  .live-pinned-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 800;
  }

  .live-pinned-code {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    white-space: nowrap;
  }

  .live-pinned-stock {
    display: block;
    margin-top: 4px;
    color: #8cf0aa;
    font-size: 10px;
    white-space: nowrap;
  }

  /* กล่องแชร์ */
  .stage .share {
    left: 8px;
    right: 8px;
    bottom: 70px;
    z-index: 35;
    padding: 9px;
    border-radius: 11px;
  }

  .stage .share small {
    font-size: 10px;
    margin-bottom: 5px;
  }

  .stage .share-live {
    padding: 9px;
    margin-top: 6px;
    font-size: 12px;
  }

  /* แผงควบคุมด้านล่าง */
  .panel {
    width: 100%;
    min-width: 0;
    min-height: auto;
    border-radius: 14px;
  }
}

/* มือถือจอเล็ก */
@media (max-width: 380px) {
  .stage {
    height: 72dvh;
    min-height: 420px;
  }

  .video-toolbar {
    right: 3px;
    width: 42px;
    gap: 10px;
  }

  .video-toolbar button {
    flex-basis: 35px;
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .live-pinned-strip {
    right: 46px;
    gap: 5px;
    padding: 5px;
  }

  .live-pinned-card {
    flex-basis: 90px;
    width: 90px;
    padding: 6px;
  }
}

/* จอมือถือแนวนอน */
@media (max-height: 600px) and (max-width: 800px) {
  .stage {
    height: 88dvh;
    min-height: 340px;
  }

  .video-toolbar {
    top: 48px;
    bottom: 80px;
    gap: 7px;
  }

  .video-toolbar button {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .live-pinned-strip {
    bottom: 6px;
  }
}
/* ซ่อนแถบเวลาคงเหลือเดิมมุมขวาบน */
.stage > .clock {
  display: none !important;
}