/* ==========================================================================
   体育直播 - 直播详情页（移植自 hlcgw-web Mirages/sports-live.css 的 sports-* 区块）
   适配：
   - body.sports-page / .sports-page--* → .sports-live-app.sports-page--*
   - 移除 #footer / .horizontal-banner / foot-menu 覆写（hlw-web 用自己的 footer）
   - 背景大图 → ../../__base/images/sports-live/*.webp
   - DPlayer 样式由 header.phtml 按 action 加载，本文件不再 @import
   ========================================================================== */
/* 版本号必须跟着 sportslive-common.css 的改动一起手改。外层文件的 URL 由
   $frontCacheVersion 自动带 ?v=，但 @import 进来的这个不会 —— 它的 URL 一直没变，
   CDN 就一直给旧的，改了 common 也不生效（这次就踩了一回）。 */
@import url("sportslive-common.css?v=20260826adslot");

/* 详情页 shell：记分牌/直播内容 全宽容器（源 --sports-shell: 1972px） */
.sports-live-app {
  --sports-shell: 1972px;
}

.sports-shell {
  width: min(calc(100% - 64px), var(--sports-shell));
  margin-inline: auto;
}

/* ---- 记分牌 ---- */
.sports-scoreboard {
  min-height: 200px;
  background: url("../../__base/images/sports-live/score-football-bg.webp") center / cover no-repeat;
}

.sports-live-app.sports-page--basketball .sports-scoreboard {
  background-image: url("../../__base/images/sports-live/score-basketball-bg.webp");
}

.sports-live-app.sports-page--esports .sports-scoreboard {
  background-image: url("../../__base/images/sports-live/score-esports-bg.webp");
}

.sports-scoreboard__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 200px;
}

.sports-scoreboard__competition {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #868686;
  font-size: 12px;
}

.sports-scoreboard__competition span {
  color: #eee;
  font-size: 14px;
}

.sports-scoreboard__teams {
  display: grid;
  grid-template-columns: 1fr 250px 1fr;
  align-items: center;
  gap: 28px;
  margin-top: 16px;
}

.sports-live-app.sports-page--esports .sports-scoreboard__teams {
  margin-top: 0;
}

.sports-scoreboard__team {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sports-scoreboard__team--home {
  justify-content: flex-end;
  text-align: right;
}

.sports-scoreboard__team small {
  display: block;
  margin-bottom: 3px;
  color: var(--orange);
  font-size: 11px;
}

.sports-scoreboard__team strong {
  display: block;
  color: #fff;
  font-size: 16px;
}

.sports-scoreboard__team img {
  display: block;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.sports-scoreboard__score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.sports-scoreboard__score strong {
  font-size: 42px;
  font-weight: 700;
}

.sports-scoreboard__score span {
  color: #d09835;
  font-size: 25px;
  font-style: italic;
  font-weight: 700;
}

/* ---- 直播内容区 ---- */
.sports-live-main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding: 0;
  min-height: 100vh;
}

.sports-detail__content {
  max-width: 1104px;
  margin-inline: auto;
  overflow-x: hidden;
  padding-top: 40px;
}

/* 顶部广告（静态 demo 位，后端填数据） */
.sports-ad-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 0 16px;
}

.sports-ad-row a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

/* 配了奇数条时，最后一条跨满整行，别让它落单留半边空白 */
.sports-ad-row a:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.sports-ad-row img {
  display: block;
  width: 100%;
  height: auto;
}

/* 播放器下面紧跟着全站的广告列表，那个列表容器自己没有上外边距，
   直接贴在播放器底边上；而列表内广告之间是 16px。这里把上间距补成同样的 16px，
   让「播放器→广告」和「广告→广告」看着一致。
   只在体育直播页作用域内改，不动全站广告组件本身。 */
.sports-live-app main + .slf-ad-list-type-a,
.sports-live-app main + * > .slf-ad-list-type-a {
  margin-top: 16px;
}

/* ---- 播放器 + 聊天 布局 ---- */
.sports-watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 766px) minmax(0, 290px);
  gap: 16px;
  align-items: stretch;
  margin-top: 24px;
  padding: 0 16px;
}

.sports-player-panel,
.sports-chat {
  min-width: 0;
}

.sports-player-panel {
  position: relative;
}

/* 播放器顶栏 */
.sports-player-panel__topline {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  gap: 16px;
  height: 40px;
  padding: 0 16px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  pointer-events: none;
  white-space: nowrap;
}

.sports-player-panel__status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.sports-player-panel__topline b {
  padding: 0 5px;
  border-radius: 3px;
  background: #ff375a;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

/* #43605：设计图直播态是「● 正在直播」白字 + LIVE 红胶囊。
   切图版的 .sports-player-panel__topline b 本身就是红胶囊，直播态要把它还原成白字，
   胶囊样式挪给 LIVE 徽标。用 __status 作用域提高特异度，不动切图版原规则。 */
.sports-player-panel__topline .sports-player-panel__status b {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}

.sports-player-panel__live-badge {
  padding: 0 5px;
  border-radius: 3px;
  background: #ff375a;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0.06em;
}

.sports-player-panel__topline strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
}

.sports-live-dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff375a;
}

/* 播放器容器 */
.sports-player {
  position: relative;
  aspect-ratio: 766 / 430;
  overflow: hidden;
  border-radius: 8px;
  background: #070707;
}

.sports-video,
.sports-video .dplayer-video-wrap,
.sports-video .dplayer-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #070707;
}

.sports-video .dplayer-video {
  object-fit: contain;
}

.sports-video.dplayer-fulled,
.sports-video:fullscreen,
.sports-video:-webkit-full-screen {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0;
  background: #000;
}

.sports-video.dplayer-fulled .dplayer-video-wrap,
.sports-video.dplayer-fulled .dplayer-video,
.sports-video:fullscreen .dplayer-video-wrap,
.sports-video:fullscreen .dplayer-video,
.sports-video:-webkit-full-screen .dplayer-video-wrap,
.sports-video:-webkit-full-screen .dplayer-video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* 播放器背景随运动切换 */
.sports-live-app.sports-page--football .sports-player,
.sports-live-app.sports-page--football .sports-video {
  background: #070707 url("../../__base/images/sports-live/player-football-bg.webp") center / cover no-repeat;
}

.sports-live-app.sports-page--basketball .sports-player,
.sports-live-app.sports-page--basketball .sports-video {
  background: #070707 url("../../__base/images/sports-live/player-basketball-bg.webp") center / cover no-repeat;
}

.sports-live-app.sports-page--esports .sports-player,
.sports-live-app.sports-page--esports .sports-video {
  background: #070707 url("../../__base/images/sports-live/player-esports-bg.webp") center / cover no-repeat;
}

.sports-video .dplayer-controller {
  padding: 0 10px;
}

.sports-video .dplayer-bar-wrap {
  display: none !important;
}

.sports-video .dplayer-time {
  display: none !important;
}

.sports-video .dplayer-controller-mask {
  height: 96px;
}

/* 开屏广告 */
.sports-opening-ad {
  position: absolute;
  inset: 0;
  z-index: auto;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070707;
}

.sports-opening-ad[hidden] {
  display: none;
}

.sports-opening-ad.is-disabled {
  cursor: default;
  pointer-events: none;
}

.sports-opening-ad img,
.sports-opening-ad video {
  position: absolute;
  inset: -1px;
  display: block;
  width: calc(100% + 2px);
  max-width: none;
  height: calc(100% + 2px);
  max-height: none;
  border-radius: 0;
  object-fit: cover;
}

.sports-opening-ad video[hidden],
.sports-opening-ad img[hidden] {
  display: none;
}

.sports-opening-ad [data-opening-ad-countdown] {
  position: absolute;
  z-index: 4;
  top: 52px;
  right: 18px;
  min-width: 148px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}

/* 线路切换（DPlayer 控制条上的自定义菜单） */
.sports-video .dplayer-line-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.sports-video .dplayer-line-btn {
  display: flex;
  align-items: center;
  width: auto !important;
  height: 100%;
  padding: 0 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sports-video .dplayer-line-label {
  position: relative;
  top: 1px;
  padding: 4px 10px;
  border: 1px solid #ff9000;
  border-radius: 4px;
  color: #ff9000;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}

.sports-video .dplayer-line-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  z-index: 100;
  min-width: 128px;
  overflow: hidden;
  padding: 4px 0;
  border-radius: 4px;
  background: rgba(18, 18, 18, 0.88);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.sports-video .dplayer-line-panel.is-open {
  display: block;
}

.sports-video .dplayer-line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  box-sizing: border-box;
  width: 100%;
  padding: 8px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.sports-video .dplayer-line-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sports-video .dplayer-line-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.sports-video .dplayer-line-item.is-active,
.sports-video .dplayer-line-item.is-active .dplayer-line-ping {
  color: #ff9000;
}

.sports-video .dplayer-line-ping {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

/* ---- 聊天面板 ---- */
.sports-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #343434;
}

.sports-chat__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 44px;
  padding: 5px 8px;
  background: #262626;
}

.sports-chat__tabs {
  display: grid;
  grid-template-columns: repeat(2, 64px);
  gap: 4px;
}

.sports-chat__tabs button {
  height: 34px;
  border: 0;
  border-radius: 3px;
  background: #393939;
  color: #aaa;
  cursor: pointer;
}

.sports-chat__tabs button.is-active {
  background: var(--orange);
  color: #171717;
}

.sports-viewer-count {
  color: #888;
  font-size: 12px;
}

.sports-viewer-count i {
  margin-right: 4px;
}

.sports-chat__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sports-chat__body[hidden] {
  display: none;
}

.sports-chat__messages {
  flex: 1;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  background: linear-gradient(180deg, #3a3a3a, #343434);
  scrollbar-color: #5d5d5d transparent;
  scrollbar-width: thin;
}

.sports-chat__message {
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.5;
}

.sports-chat__message span {
  color: var(--teal);
}

.sports-chat__message p {
  display: inline;
  margin: 0 0 0 5px;
  color: #e3e3e3;
  word-break: break-all;
}

.sports-chat__message--join p {
  color: var(--orange);
}

.sports-chat__composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  gap: 6px;
  padding: 8px;
  background: #333;
}

.sports-chat__composer > * {
  min-width: 0;
}

.sports-chat__input-wrap {
  position: relative;
  min-width: 0;
}

.sports-chat__composer input {
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 26px;
  outline: 0;
  background: #4a4a4a;
  color: #fff;
  font-size: 16px;
}

.sports-chat__input-wrap input {
  box-sizing: border-box;
  width: 100%;
  padding-right: 58px;
}

.sports-chat__composer input::placeholder {
  color: #929292;
}

.sports-chat__input-wrap .sports-chat__count {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #929292;
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}

.sports-chat__send {
  border: 0;
  cursor: pointer;
  height: 34px;
  border-radius: 26px;
  background: var(--orange);
  color: #fff;
  font-size: 16px !important;
}

/* 赛程 tab */
.sports-fixtures {
  flex: 1;
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
  background: #252525;
}

.sports-fixture {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  min-height: 104px;
  margin-bottom: 8px;
  padding: 22px 12px 17px;
  background: url("../../__base/images/sports-live/match-card-bg.webp") center / 100% 100% no-repeat;
  text-align: center;
}

.sports-fixture__competition {
  position: absolute;
  top: 7px;
  right: 0;
  left: 0;
  color: #888;
  font-size: 10px;
}

.sports-fixture__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.sports-fixture__team img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.sports-fixture__team b {
  max-width: 84px;
  overflow: hidden;
  color: #eee;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sports-fixture__score {
  color: #d19b3e;
  font-size: 18px;
  font-style: italic;
  white-space: nowrap;
}

.sports-fixture small {
  position: absolute;
  right: 0;
  bottom: 23px;
  left: 0;
  color: #aaa;
  font-size: 9px;
}

.sports-fixture time {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  color: #777;
  font-size: 9px;
}

@media (min-width: 821px) {
  .sports-chat {
    height: 0;
    min-height: 100%;
  }
}

/* ---- 移动端 ---- */
@media (max-width: 820px) {
  .sports-shell {
    width: 100%;
  }

  .sports-scoreboard,
  .sports-scoreboard__inner {
    min-height: 82px;
  }

  .sports-scoreboard__competition {
    font-size: 8px;
  }

  .sports-scoreboard__competition span {
    font-size: 9px;
  }

  .sports-scoreboard__teams {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: 5px;
    margin-top: 5px;
  }

  .sports-scoreboard__team {
    gap: 5px;
  }

  .sports-scoreboard__team img {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .sports-scoreboard__team small {
    font-size: 7px;
  }

  .sports-scoreboard__team strong {
    max-width: 92px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sports-scoreboard__score {
    gap: 6px;
  }

  .sports-scoreboard__score strong {
    font-size: 19px;
  }

  .sports-scoreboard__score span {
    font-size: 12px;
  }

  .sports-detail__content {
    padding-top: 12px;
  }

  .sports-ad-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sports-watch-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }

  .sports-player-panel {
    width: 100%;
    margin-left: 0;
  }

  .sports-player-panel__topline {
    height: 34px;
    gap: 8px;
    padding: 0 8px;
    padding-right: 118px;
    border-radius: 0;
    font-size: 8px;
  }

  .sports-player-panel__status {
    gap: 4px;
  }

  .sports-player-panel__topline b {
    padding: 0 3px;
    font-size: 8px;
    line-height: 14px;
  }

  .sports-player-panel__topline strong {
    font-size: 8px;
    line-height: 14px;
  }

  .sports-live-dot {
    flex-basis: 6px;
    width: 6px;
    height: 6px;
  }

  .sports-opening-ad [data-opening-ad-countdown] {
    top: 42px;
    right: 8px;
    min-width: 100px;
    padding: 5px 8px;
    font-size: 8px;
    line-height: 16px;
  }

  .sports-player {
    aspect-ratio: 375 / 200;
    border-radius: 6px;
  }

  .sports-video .dplayer-controller {
    padding: 0;
  }

  .sports-video.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-volume {
    display: inline-block !important;
  }

  .sports-video.dplayer-mobile .dplayer-volume {
    position: relative;
  }

  .sports-video.dplayer-mobile .dplayer-notice-list {
    display: none !important;
  }

  .sports-video.dplayer-mobile .dplayer-volume-bar-wrap {
    display: none;
    position: absolute;
    right: -16px;
    bottom: 24px;
    z-index: 8;
    width: 64px;
    height: 16px;
    padding: 4px 0;
    background: transparent;
    touch-action: none;
  }

  .sports-video.dplayer-mobile .dplayer-volume.is-volume-open .dplayer-volume-bar-wrap {
    display: block !important;
  }

  .sports-video.dplayer-mobile .dplayer-volume.is-volume-open .dplayer-volume-bar {
    width: 56px !important;
    background: rgba(255, 255, 255, 0.5);
  }

  .sports-video.dplayer-mobile .dplayer-volume.is-volume-open .dplayer-volume-bar-inner .dplayer-thumb {
    transform: scale(1) !important;
  }

  .sports-video .dplayer-line-label {
    padding: 3px 7px;
    font-size: 11px;
    line-height: 16px;
  }

  .sports-chat {
    height: 420px;
    border-radius: 0;
  }

  .sports-chat__tabs {
    grid-template-columns: repeat(2, 54px);
  }

  .sports-chat__tabs button {
    height: 34px;
    font-size: 13px;
  }

  .sports-viewer-count {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 44px;
    white-space: nowrap;
  }

  .sports-chat__messages {
    padding: 10px 8px;
  }

  .sports-chat__message {
    margin-bottom: 13px;
    font-size: 12px;
  }

  .sports-chat__composer {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .sports-chat__composer input {
    height: 34px;
  }

  .sports-chat__input-wrap input {
    padding-right: 42px;
  }

  .sports-chat__input-wrap .sports-chat__count {
    right: 8px;
    font-size: 11px;
  }

  .sports-chat__send {
    font-size: 12px;
  }

  .sports-fixture {
    min-height: 126px;
  }

  .sports-fixture__team img {
    width: 42px;
    height: 42px;
  }

  .sports-fixture__score {
    font-size: 24px;
  }

  .sports-fixture__team b {
    font-size: 12px;
  }
}

/* ==========================================================================
   非直播态提示（切图版只做了直播中，需求要求未开赛/已完赛在播放器中央给文案）
   ========================================================================== */
.sports-player__tip {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  background: rgba(7, 7, 7, 0.55);
  color: #f2f2f2;
  font-size: 20px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 720px) {
  .sports-player__tip {
    font-size: 15px;
  }
}

/* ==========================================================================
   播放器顶部：LIVE 标识与联赛名（原型要求「直播状态、LIVE标识、联赛名称及对阵双方信息」）
   ========================================================================== */

/* #43615：设计图是居中的半透明卡片，标题一行、副文案一行，不是一整句 */
.sports-player__tip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 34px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  text-align: center;
}

.sports-player__tip-card strong {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.sports-player__tip-card span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .sports-player__tip-card {
    padding: 12px 22px;
  }
  .sports-player__tip-card strong { font-size: 15px; }
  .sports-player__tip-card span { font-size: 12px; }
}

