/* ==========================================================================
   体育直播 - 赛事列表页（移植自 hlcgw-web Mirages/sports-category.css 的 schedule-* 区块）
   适配：
   - body.schedule-page / body.has-schedule-modal → .sports-live-app
   - 移除 Mirages 全局容器/分页/底部广告/footer 覆写（hlw-web 用自己的）
   - 分页：#43658 起改回源 .page-nav/.page-jump/.page-navigator（设计稿要求），不再用 component-pagination
   ========================================================================== */
/* 版本号必须跟着 sportslive-common.css 的改动一起手改。外层文件的 URL 由
   $frontCacheVersion 自动带 ?v=，但 @import 进来的这个不会 —— 它的 URL 一直没变，
   CDN 就一直给旧的，改了 common 也不生效（这次就踩了一回）。 */
@import url("sportslive-common.css?v=20260826adslot");

/* ---- 主体 ---- */
.schedule-main {
  position: relative;
  padding-top: 40px;
}

/* ---- 日期条 ---- */
.schedule-date-section {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 78px);
  justify-content: space-between;
  align-items: stretch;
}

.schedule-calendar-trigger,
.schedule-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 78px;
  height: 132px;
  padding: 16px 8px 19px;
  border: 1px solid #515151;
  border-radius: 39px;
  background: #393939;
  cursor: pointer;
}

.schedule-calendar-trigger img {
  display: block;
  width: 52px;
  height: 52px;
}

.schedule-calendar-trigger span,
.schedule-date span {
  color: #f2f2f2;
  font-size: 16px;
  line-height: 1;
}

.schedule-date strong {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  background: #777;
  color: #f2f2f2;
  font-size: 18px;
  font-weight: 500;
}

.schedule-date.is-active {
  border-color: var(--orange);
  background: var(--orange);
}

.schedule-date.is-active strong {
  background: #161616;
}

.schedule-date.is-active span {
  color: #1d1d1d;
}

/* ---- 日历弹层 ---- */
.schedule-calendar-panel {
  position: absolute;
  display: block;
  z-index: 30;
  top: 158px;
  left: 0;
  width: 340px;
  padding: 18px;
  border-radius: 10px;
  background: #3a3735;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

.schedule-calendar-panel[hidden],
.schedule-modal[hidden] {
  display: none;
}

.schedule-calendar-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schedule-calendar-panel__head strong {
  font-size: 20px;
}

.schedule-calendar-panel__head > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.schedule-calendar-panel__head a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: transparent;
  color: #999;
  cursor: pointer;
}

.schedule-calendar-panel__week,
.schedule-calendar-panel__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.schedule-calendar-panel__week {
  margin-top: 18px;
  color: #a7a7a7;
  font-size: 12px;
}

.schedule-calendar-panel__days {
  gap: 8px 0;
  margin-top: 12px;
}

.schedule-calendar-panel__days a,
.schedule-calendar-panel__days span.is-disabled {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.schedule-calendar-panel__days span.is-disabled {
  color: #555;
  cursor: not-allowed;
}

.schedule-calendar-panel__head a.is-disabled {
  color: #555;
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

.schedule-calendar-panel__days a.is-selected {
  background: var(--orange);
}

/* ---- 顶部广告（静态 demo 位，后端填数据） ---- */
.schedule-banners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 153, 31, 0.36);
}

.schedule-banners a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

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

.schedule-banners img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- 筛选 ---- */
.schedule-filter {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.schedule-status-filter {
  display: flex;
  gap: 16px;
}

.schedule-status-filter a,
.sports-live-app .schedule-league-trigger {
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 6px;
  background: #343434;
  color: #999;
  font-size: 20px;
  cursor: pointer;
}

.schedule-status-filter a.is-active {
  background: var(--orange);
  color: #161616;
}

.schedule-league-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.schedule-league-trigger > img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.schedule-league-trigger__arrow {
  width: 12px !important;
  height: 18px !important;
  margin-left: auto;
  transform: rotate(90deg);
  filter: brightness(60%);
}

/* ---- 赛事列表 ---- */
.schedule-results {
  margin-top: 24px;
}

.schedule-table-head,
.schedule-match {
  display: grid;
  grid-template-columns: 160px 112px minmax(170px, 1fr) 90px minmax(170px, 1fr) 84px 105px;
  align-items: center;
}

.schedule-table-head {
  min-height: 62px;
  border-top: 2px solid var(--orange);
  border-radius: 8px 8px 0 0;
  background: #292929;
  color: #eee;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.schedule-match-list {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.schedule-match {
  min-height: 60px;
  border-radius: 7px;
  background: #353535;
  color: #e2e2e2;
  font-size: 13px;
  text-align: center;
}

.schedule-match[hidden] {
  display: none;
}

.schedule-match__time img {
  display: none;
}

.schedule-match__team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.schedule-match__team--home {
  justify-content: flex-end;
}

.schedule-match__team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-match__team img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.schedule-match__score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--score);
  font-size: 20px;
}

.schedule-match__score b,
.schedule-match__score strong {
  font-weight: 500;
}

.schedule-match__away-score--h5 {
  display: none;
}

.schedule-match__live {
  display: grid;
  place-items: center;
}

.schedule-match__live img {
  display: block;
  width: 22px;
  height: 19px;
  object-fit: contain;
}

.schedule-match__viewers {
  color: #aaa;
}

.schedule-match__viewers i {
  margin-right: 5px;
}

@media (min-width: 721px) {
  .schedule-match__team--home,
  .schedule-match__team--away {
    justify-content: center;
  }
}

/* ---- 空状态 ---- */
.schedule-empty {
  display: grid;
  min-height: 780px;
  place-items: start center;
  padding-top: 210px;
}

.schedule-empty[hidden] {
  display: none;
}

.schedule-empty img {
  display: block;
  width: 198px;
  height: 204px;
  object-fit: contain;
}

/* ---- 分页（#43658：移植自源 mirages.min.css 的 .page-nav/.page-jump/.page-navigator，
     与前端仓 hlw-web cc618eb7 对齐；本文件只在 sports_live_schedule 页加载，
     所以沿用页面里 .schedule-* 的裸类名惯例，不另加作用域）---- */
.page-nav[hidden] {
  display: none;
}

.page-nav {
  position: relative;
  flex-direction: column;
  height: 3rem;
  line-height: 3rem;
  margin: 0.8rem 0;
}

.page-jump {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14rem;
  text-align: center;
}

.page-jump form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  line-height: normal;
}

.page-jump .page-info,
.page-jump input,
.page-jump button {
  flex: none;
  margin: 0;
  line-height: 20px;
  vertical-align: middle;
}

.page-jump .page-info {
  color: #fff;
  font-size: 1rem;
}

.page-jump input {
  padding: 10px;
  max-width: 4rem;
  background: transparent;
  outline-style: none;
  border: 1px solid #fff;
  border-radius: 3px;
  color: #fff;
  font-weight: bold;
  margin: 0 0.3rem;
  height: 40px;
  line-height: 40px;
}

.page-jump input:focus {
  border: 1px solid #fff;
}

.page-jump button {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  height: 40px;
  cursor: pointer;
}

.page-jump button:hover {
  color: #fff;
  border-color: #fff !important;
  border: 1px solid #fff;
}

.page-jump input[type="number"]::-webkit-inner-spin-button,
.page-jump input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-jump input[type="number"] {
  -moz-appearance: textfield;
}

.page-navigator {
  padding: 0;
  margin: 0;
  list-style: none;
}

.page-navigator > li {
  display: none;
}

/* 设计稿左右各一个按钮：上一页贴左、下一页贴右 */
.page-navigator > .prev {
  display: inline-block;
  float: left;
}

.page-navigator > .next {
  display: inline-block;
  float: right;
}

.page-navigator li a,
.page-navigator li span {
  color: #fff;
  padding: 8px 8px;
  border: 1px solid #fff;
  border-radius: 5px;
}

.page-navigator li a:hover,
.page-navigator li span:hover {
  color: #fff;
  border-color: #fff;
}

/* 首页/末页：按钮还在，但不可点，压暗一点做区分 */
.page-navigator li span {
  opacity: 0.45;
  cursor: default;
}

/* ---- 赛事筛选弹窗 ---- */
.schedule-modal {
  position: absolute;
  z-index: 80;
  inset: 0;
  pointer-events: none;
}

.schedule-modal__backdrop {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  pointer-events: auto;
}

.schedule-modal__panel {
  position: absolute;
  top: auto;
  left: auto;
  display: flex;
  flex-direction: column;
  width: min(340px, calc(100vw - 32px));
  height: min(354px, calc(100vh - 32px));
  padding: 14px 14px 12px;
  border-radius: 18px;
  transform: none;
  background: linear-gradient(135deg, #323232 0%, #483e33 100%);
  pointer-events: auto;
}

.schedule-modal__options {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.schedule-modal__options.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.schedule-modal__empty {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 13px;
  line-height: 18px;
}

.schedule-modal__empty img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  opacity: 0.42;
}

/* #43596：空态放在 fieldset 的三列网格里，不跨行就会挤在第一格，图会偏左。
   图沿用列表页那张 no-events.png（396x408，文案已烤在图里），切图版预留的 72px
   会把图里的字压到看不清，这里按原比例给到 1/3。 */
.schedule-modal fieldset .schedule-modal__empty {
  grid-column: 1 / -1;
}

.schedule-modal fieldset .schedule-modal__empty img {
  width: 132px;
  height: 136px;
  opacity: 1;
}

.schedule-modal fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 0;
  padding: 4px 0 7px;
  border: 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

/* 首字母索引行：和 legend 一样跨满 3 列，否则会被塞进网格的某一格里 */
.schedule-modal__letter {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.schedule-modal__letter:first-of-type {
  margin-top: 0;
}

/* 场次数量，原型是方括号 [3] */
.schedule-modal__count {
  color: rgba(255, 255, 255, 0.4);
  font-style: normal;
}

.schedule-modal legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #fff;
  font-size: 14px;
}

.schedule-modal label {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #eee;
  font-size: 13px;
  line-height: 1.3;
}

.schedule-modal label span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-modal input {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: url("../../__base/images/sports-live/league-unchecked.svg") center / 13px 13px no-repeat;
  cursor: pointer;
}

.schedule-modal input:checked {
  background-image: url("../../__base/images/sports-live/league-checked.svg");
}

.schedule-modal input:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 2px;
}

.schedule-modal__actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 10px;
}

.schedule-modal__actions button {
  height: 34px;
  border: 0;
  border-radius: 4px;
  background: #5b554f;
  font-size: 13px;
  cursor: pointer;
}

.schedule-modal__actions button.is-primary {
  background: var(--orange);
  color: #222;
}

.sports-live-app.has-schedule-modal {
  overflow-x: hidden;
}

.sports-live-app .schedule-modal__options::-webkit-scrollbar {
  width: 10px;
}

.sports-live-app .schedule-modal__options::-webkit-scrollbar-track {
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.05);
}

.sports-live-app .schedule-modal__options::-webkit-scrollbar-thumb {
  min-height: 0;
  padding: 0;
  border-radius: 6px;
  background-clip: border-box;
  background-color: #ffffff66;
  -webkit-box-shadow: none;
  box-shadow: none;
}

.sports-live-app .schedule-modal__options::-webkit-scrollbar-thumb:hover,
.sports-live-app .schedule-modal__options::-webkit-scrollbar-thumb:active {
  background-color: #ffffff66;
  -webkit-box-shadow: none;
  box-shadow: none;
}

@supports not selector(::-webkit-scrollbar) {
  .schedule-modal__options {
    scrollbar-color: #ffffff66 rgba(255, 255, 255, 0.05);
    scrollbar-width: thin;
  }
}

/* ---- 移动端 ---- */
@media (max-width: 720px) {
  .schedule-shell {
    width: calc(100% - 2rem);
  }

  .schedule-main {
    padding-top: 9px;
  }

  .schedule-date-section {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    padding-right: 2px;
  }

  .schedule-date-section::-webkit-scrollbar {
    display: none;
  }

  .schedule-calendar-trigger,
  .schedule-date {
    flex: 0 0 37px;
    width: 37px;
    height: 63px;
    padding: 5px 2px 8px;
    border-radius: 19px;
  }

  .schedule-calendar-trigger img {
    width: 24px;
    height: 24px;
  }

  .schedule-calendar-trigger span,
  .schedule-date span {
    font-size: 10px;
  }

  .schedule-date strong {
    width: 31px;
    height: 31px;
    font-size: 10px;
  }

  .schedule-calendar-panel {
    position: fixed;
    top: 188px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .schedule-banners {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-top: 20px;
    padding-top: 0;
    border-top: 0;
  }

  .schedule-banners a {
    border-radius: 5px;
  }

  .schedule-filter {
    gap: 6px;
    margin-top: 10px;
  }

  .schedule-status-filter {
    flex: 0 0 auto;
    gap: 7px;
  }

  .schedule-status-filter a,
  .sports-live-app .schedule-league-trigger {
    height: 24px;
    padding: 0 12px;
    border-radius: 3px;
    font-size: 11px;
  }

  .schedule-league-trigger > img {
    width: 16px;
    height: 16px;
  }

  .sports-live-app .schedule-league-trigger {
    flex: 0 0 92px;
    min-width: 92px;
    gap: 5px;
    padding: 0 8px;
    white-space: nowrap;
  }

  .schedule-league-trigger > .schedule-league-trigger__arrow {
    width: 5px !important;
    height: 9px !important;
    margin-left: auto;
  }

  .schedule-results {
    margin-top: 10px;
  }

  .schedule-table-head {
    display: none;
  }

  .schedule-match-list {
    gap: 11px;
    margin-top: 0;
  }

  .schedule-match {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    grid-template-rows: 28px 48px;
    min-height: 76px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 12px;
  }

  .schedule-match__competition {
    grid-column: 1 / 4;
    grid-row: 1;
    align-self: center;
    width: 100%;
    padding-inline: 56px;
    border-bottom: 1px solid var(--line);
    color: #999;
    font-size: 13px;
    line-height: 27px;
    text-align: center;
  }

  .schedule-match__time {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #999;
    font-size: 11px;
  }

  .schedule-match__time img {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 3px;
    vertical-align: -2px;
  }

  .schedule-match__team {
    grid-row: 2;
    gap: 6px;
    white-space: nowrap;
  }

  .schedule-match__team--home {
    grid-column: 1;
  }

  .schedule-match__team--away {
    grid-column: 3;
  }

  .schedule-match__team img {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
  }

  .schedule-match__score {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    gap: 5px;
    margin-top: 5px;
    font-size: 17px;
  }

  .schedule-match__away-score--pc {
    display: none;
  }

  .schedule-match__away-score--h5 {
    display: inline;
  }

  .schedule-match__live {
    position: absolute;
    left: 50%;
    bottom: 5px;
    transform: translateX(-50%);
  }

  .schedule-match__live img {
    width: 18px;
    height: 16px;
  }

  .schedule-match__viewers {
    display: none;
  }

  .schedule-page--basketball .schedule-match {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    column-gap: 3px;
  }

  .schedule-page--basketball .schedule-match__team {
    gap: 5px;
  }

  .schedule-page--basketball .schedule-match__team span {
    min-width: 0;
  }

  .schedule-page--basketball .schedule-match__team img {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
  }

  .schedule-page--basketball .schedule-match__score {
    gap: 4px;
    white-space: nowrap;
  }

  .schedule-empty {
    min-height: 490px;
    padding-top: 84px;
  }

  .schedule-empty img {
    width: 132px;
    height: 136px;
  }

  .schedule-modal__panel {
    left: 50% !important;
    width: min(340px, calc(100vw - 32px));
    height: min(354px, calc(100vh - 32px));
    padding: 12px 12px 10px;
    border-radius: 14px;
    transform: translateX(-50%);
  }
}

@media (max-width: 370px) {
  .schedule-status-filter {
    gap: 4px;
  }

  .schedule-status-filter a {
    padding-inline: 9px;
  }

  .sports-live-app .schedule-league-trigger {
    min-width: 84px;
  }
}


/* 独立类名，不复用切图版的 .schedule-modal__empty，避免覆盖它的缺省图样式 */
.sports-live-empty-hint {
  margin: 0;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ==========================================================================
   电竞：先选游戏再选联赛
   ========================================================================== */
.schedule-modal__games {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.schedule-modal__game {
  padding: 4px 10px;
  border: 1px solid #515151;
  border-radius: 14px;
  background: #393939;
  color: #f2f2f2;
  font-size: 13px;
  line-height: 18px;
}

.schedule-modal__game.is-active {
  border-color: var(--orange);
  background: var(--orange);
  color: #1d1d1d;
}

