/* ==========================================================================
   CFB 中国足球小将 - Tab 2: 赛程中心吸顶指挥舱与时间轴底座 (Fixtures Timeline & Sticky Header)
   ========================================================================== */

/* ==========================================================================
   Tab 2: 赛程中心 (单一全景时间轴 + 一体化双层吸顶指挥舱)
   ========================================================================== */

/* 1. 赛程顶部一体化吸顶指挥舱 (统一 Sticky 锚点，彻底根除层级独立滚动微动) */
.cfb-fixtures-sticky-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--cfb-border-subtle);
  box-shadow: 0 4px 12px rgba(0, 30, 80, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow-anchor: none;
  touch-action: pan-x; /* 物理绝缘：仅允许横向平移手势，彻底杜绝从该吸顶条触发纵向赛程卡片滚动 */
  overscroll-behavior: contain;
}

/* 第一排：梯队全局筛选流 (方案 B: 上下滑动响应式收拢，释放沉浸式垂直空间) */
.cfb-squad-filter {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 0 8px 12px;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(0, 75, 153, 0.06);
  box-sizing: border-box;
  max-height: 52px;
  opacity: 1;
  transition: max-height 0.25s cubic-bezier(0.25, 1, 0.5, 1), 
              padding 0.25s cubic-bezier(0.25, 1, 0.5, 1), 
              opacity 0.2s ease, 
              border-color 0.2s ease;
  overflow: visible;
}

.cfb-squad-filter.is-collapsed,
#pane-fixtures.is-squad-collapsed .cfb-squad-filter {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0 !important;
  border-bottom-color: transparent !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* 横向滑动胶囊轨道 */
.cfb-squad-filter__track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x; /* 物理绝缘：仅允许横向平移梯队胶囊，杜绝微斜滑动误触页面纵滚 */
  overscroll-behavior: contain;
  padding-right: 68px; /* 为右侧常驻方形按钮与遮罩预留呼吸安全区，保证最右项滑出完整露出 */
}

.cfb-squad-filter__track::-webkit-scrollbar {
  display: none;
}

/* 右侧常驻方形按钮容器与实色纯白裁剪遮挡层 (100% 实色绝缘，彻底根除文字底层透光叠加) */
.cfb-squad-filter__more-wrap {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 15;
  background-color: #FFFFFF; /* 关键实色：100% 遮挡底层滑动的胶囊卡片与文字 */
  padding-right: 12px;
  padding-left: 4px;
  box-sizing: border-box;
}

/* 按钮左侧外延的渐变柔和消隐遮罩 (位于纯白容器左外侧，平滑渐隐过渡) */
.cfb-squad-filter__fade-mask {
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  width: 28px;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
  pointer-events: none;
}

.cfb-squad-filter__more-btn {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  margin: 0; /* 边距由父级 padding-right: 12px 统一管控，消除缝隙漏光 */
  background: #F1F5F9; /* 实色微底，双重遮挡保障 */
  border: 1px solid rgba(0, 75, 153, 0.16);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 30, 80, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #004B99;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.cfb-squad-filter__more-btn:active,
.cfb-squad-filter__more-btn.is-open {
  background: #004B99;
  border-color: #004B99;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 75, 153, 0.25);
}

.cfb-squad-filter__more-icon {
  display: block;
}

/* 全量梯队弹出矩阵选择器 (Popover Matrix) */
.cfb-squad-popover {
  position: absolute;
  top: calc(100% + 4px);
  right: 12px;
  width: 290px;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 30, 80, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 75, 153, 0.12);
  padding: 14px;
  box-sizing: border-box;
  z-index: 200;
  transform-origin: top right;
  opacity: 0;
  transform: scale(0.92) translateY(-6px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.2, 0.9, 0.3, 1),
              transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.cfb-squad-popover.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.cfb-squad-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cfb-squad-popover__title {
  font-family: var(--cfb-font-main);
  font-size: 13px;
  font-weight: 700;
  color: var(--cfb-text-title, #002855);
}

.cfb-squad-popover__close {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.cfb-squad-popover__close:active {
  color: #002855;
  background: rgba(0, 0, 0, 0.05);
}

.cfb-squad-popover__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.cfb-squad-popover__item {
  background: #F1F5F9;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cfb-squad-popover__item:active {
  background: #E2E8F0;
}

.cfb-squad-popover__item.is-selected {
  background: #004B99;
  color: #FFFFFF;
  font-weight: 700;
  border-color: #004B99;
  box-shadow: 0 2px 6px rgba(0, 75, 153, 0.25);
}

.cfb-squad-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px; /* 从 26px 增大至 32px，大拇指触控命中率与滑动体验显著提升 */
  padding: 0 13px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  background-color: rgba(0, 75, 153, 0.05);
  color: var(--cfb-text-sub);
  border: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
}

.cfb-squad-pill:active {
  transform: scale(0.95);
}

.cfb-squad-pill.is-active {
  background-color: var(--cfb-royal-blue);
  color: #FFFFFF;
  border-color: var(--cfb-royal-blue);
  box-shadow: 0 2px 6px rgba(0, 75, 153, 0.22);
  font-weight: 700;
}

/* 第二排：月份时间刻度导航 (下层：紧贴比赛卡片上方的时间标尺) */
.cfb-month-nav {
  padding: 7px 12px 9px 12px;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

.cfb-month-nav__track {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  touch-action: pan-x; /* 物理绝缘：仅允许横向平移月份标签，绝缘竖向手势干扰 */
  overscroll-behavior: contain;
}

.cfb-month-nav__track::-webkit-scrollbar {
  display: none;
}

.cfb-month-nav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 29px; /* 从 24px 增高至 29px，触控区域更从容 */
  padding: 0 13px;
  border-radius: 999px;
  background: var(--cfb-bg-input);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--cfb-text-sub);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
  box-sizing: border-box;
}

.cfb-month-nav__item:active {
  transform: scale(0.92);
}

/* 激活选中月份态 */
.cfb-month-nav__item.is-active {
  background: var(--cfb-royal-blue);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 75, 153, 0.22);
  font-weight: 800;
  transform: scale(1.02);
}

/* 当月“今”特别标记 */
.cfb-month-nav__item.is-current:not(.is-active) {
  border-color: rgba(0, 75, 153, 0.35);
  color: var(--cfb-royal-blue);
  background: rgba(0, 75, 153, 0.06);
}

.cfb-month-nav__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #22C55E; /* 活跃绿微光点 */
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.8);
}

.cfb-month-nav__item.is-active .cfb-month-nav__dot {
  background-color: #FFFFFF;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* 无赛事实体月份弱化禁用态 (方案 B · 克制置灰防误触) */
.cfb-month-nav__item.is-disabled {
  opacity: 0.38;
  color: #94A3B8 !important;
  background: rgba(0, 30, 80, 0.025) !important;
  border-color: transparent !important;
  cursor: default;
}

.cfb-month-nav__item.is-disabled:active {
  transform: none !important; /* 禁用按压缩放反馈 */
}

/* 赛程专属下拉刷新指示条 (紧贴吸顶月份选择器下方展开) */
.cfb-pull-refresh--fixtures {
  background-color: var(--cfb-bg-page);
  border-bottom: 1px solid rgba(0, 75, 153, 0.06);
}

#pane-fixtures {
  position: relative;
  overflow-x: clip; /* 确保左右推拉列表时横向不溢出，且不阻断吸顶锚点 */
}

/* 2. 单时间轴容器与月份分隔栏 (支持跟手推拉与滑入动效) */
.cfb-timeline-container {
  padding: 0 0 24px 0; /* 左右内边距归零，由内部 match-list 统一掌管 12px，避免外层嵌套叠加导致卡片变窄 */
  box-sizing: border-box;
  will-change: opacity, transform;
}

.cfb-month-section {
  margin-top: 10px;
  scroll-margin-top: 132px; /* 展开态：避开一体化吸顶条(94px)与吸附的月份标题(38px) */
  transition: scroll-margin-top 0.25s ease;
}

.cfb-month-section:first-child {
  margin-top: 0;
}

#pane-fixtures.is-squad-collapsed .cfb-month-section {
  scroll-margin-top: 82px; /* 收拢态：44px + 38px */
}

/* 月份吸顶推顶分割栏 (Sticky Push Header · 方案 B 纯 CSS 变量双向联动咬合)
   展开时精确无缝咬合在 94px；下滑收拢梯队栏时平滑跟随咬合在 44px，1px 负容差重叠彻底根除缝隙漏光 */
.cfb-month-divider {
  position: sticky;
  top: 94px; /* 展开态：精确咬合一体化双层指挥舱底边(95px)，微重叠消除亚像素缝隙 */
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 14px; /* 左右 14px 与卡片 12px 视觉边缘精准齐平 */
  margin-top: 0; /* 归零外边距，彻底杜绝 Sticky 盒模型位移产生的物理空隙 */
  margin-bottom: 6px;
  background-color: rgba(245, 246, 248, 0.94); /* 球场柔白底色 + 高透磨砂质感 */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 75, 153, 0.06);
  box-shadow: 0 4px 10px -2px rgba(0, 30, 80, 0.04);
  transition: top 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

#pane-fixtures.is-squad-collapsed .cfb-month-divider {
  top: 44px; /* 收拢态：精确咬合月份选择器底沿(45px)，无缝贴合在月份选择器正下方 */
}

.cfb-month-divider__title {
  font-family: var(--cfb-font-title);
  font-size: 14px;
  font-weight: 800;
  color: var(--cfb-text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cfb-month-divider__badge {
  font-size: 12px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--cfb-royal-blue);
  color: #FFFFFF;
  letter-spacing: 0.3px;
}

.cfb-month-divider__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--cfb-text-sub);
}

/* 旧版 Swiper 与 Subnav 兼容保留或渐进降级 */
.cfb-subnav {
  display: none;
}

.cfb-schedule-swiper {
  width: 100%;
}

.cfb-schedule-track {
  width: 100%;
}

.cfb-schedule-pane {
  width: 100%;
}

.cfb-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 8px 12px;
}

.cfb-month-header__title {
  font-family: var(--cfb-font-title);
  font-size: 14px;
  color: var(--cfb-text-main);
}

.cfb-month-header__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--cfb-text-sub);
}

