/* ==========================================================================
   Befair Shared Match Detail Panel (bf-match-detail.css)
   四页（home / prediction / team / tournament）共用的中间比赛详情面板样式
   ========================================================================== */

/* ---------- 1. H2H / 统计次级按钮与子选项卡 ---------- */
.h2h-tab-btn {
  font-family: var(--bf-font-sans);
  min-width: 70px;
  padding: 0 14px;
  margin: 0 4px;
  height: 35px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

.h2h-tab-btn:hover,
.h2h-tab-btn.active {
  color: #FF7B54 !important;
  background: rgba(255, 123, 84, 0.08) !important;
}

.bf-subtabs {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 10px;
  font-family: var(--bf-font-sans);
}

.bf-subtab-item {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.bf-subtab-item:hover {
  color: #FF7B54;
}

.bf-subtab-item.is-active {
  color: #2c2c3c;
  font-weight: 600;
}

.bf-subtab-item.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 30px;
  height: 2.5px;
  border-radius: 2.5px 2.5px 0 0;
  background: #FF7B54;
}

/* ---------- 2. 比赛数量选择下拉框 ---------- */
.bf-vol-dropdown {
  position: relative;
  display: inline-block;
}

.bf-vol-dropdown .dropdown-toggle {
  background: #f4f6f8 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  line-height: 1.4 !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.bf-vol-dropdown .dropdown-toggle:hover,
.bf-vol-dropdown.open .dropdown-toggle {
  background: #FFF3EB !important;
  border-color: #FF8E4D !important;
  color: #EA580C !important;
}

.bf-vol-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  z-index: 1000;
  list-style: none !important;
  margin: 6px 0 0 !important;
  padding: 4px !important;
  min-width: 72px !important;
  width: auto !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
  left: auto !important;
  right: 0 !important;
}

.bf-vol-dropdown.open .dropdown-menu {
  display: block !important;
}

.bf-vol-dropdown .dropdown-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bf-vol-dropdown .dropdown-menu li::before {
  display: none !important;
  content: none !important;
}

.bf-vol-dropdown .dropdown-menu li a {
  display: block !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  text-align: center !important;
  text-decoration: none !important;
  background: transparent !important;
  transition: all 0.15s ease;
}

.bf-vol-dropdown .dropdown-menu li a:hover {
  background: #FFF3EB !important;
  color: #EA580C !important;
  font-weight: 600 !important;
}

/* ---------- 3. 战绩表格、胜负圆点、加时药丸 ---------- */
.selectedGameTable {
  background: #f2f4f7;
}

.teamMatchTable tbody:hover {
  background: #f2f4f7;
}

.isLoseTeam {
  color: #9b9b9d;
}

.bf-wdl-cell {
  cursor: pointer;
  width: 34px !important;
  padding-right: 6px !important;
  box-sizing: border-box;
}

.prediction-buttons .prediction-btn {
  font-family: var(--bf-font-sans);
  padding: 8px 16px !important;
  border-radius: var(--bf-radius-sm, 8px) !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease-in-out !important;
  user-select: none;
  border: none !important;
}

.prediction-buttons .prediction-btn.active {
  color: var(--bf-brand-primary, #FF7B54) !important;
  background: var(--bf-brand-tint, rgba(255, 123, 84, 0.1)) !important;
  border: none !important;
}

.prediction-buttons .prediction-btn.inactive {
  background-color: transparent !important;
  color: var(--bf-text-muted, #94a3b8) !important;
  border: none !important;
}

.prediction-buttons .prediction-btn.inactive:hover {
  color: var(--bf-brand-primary, #FF7B54) !important;
  background: var(--bf-brand-tint, rgba(255, 123, 84, 0.1)) !important;
}

.bf-wdl-cell > span {
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.bf-wdl-cell:hover > span {
  transform: scale(1.15);
  background-color: #6AC8D2 !important;
  box-shadow: 0 2px 6px rgba(106, 200, 210, 0.45);
}

.ot-pill {
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ot-pill:hover {
  transform: scale(1.08);
  background-color: #EA580C !important;
  box-shadow: 0 2px 8px rgba(255, 123, 84, 0.45) !important;
}

.el-progress__text {
  display: none !important;
}

.el-progress-bar {
  padding: 0 !important;
  margin: 0 !important;
}

.el-progress-bar__outer {
  background: #000 !important;
}

#app span.score {
  color: #a0ce4e;
  font-size: 16px;
  font-weight: bold;
}

#app span.halfscore {
  color: #969696;
  font-size: 14px;
}

#app .teamIcon {
  width: 25px;
  margin-right: 5px;
}

/* ---------- 4. 比赛事件竖向时间轴 ---------- */
.timeline {
  position: relative;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  width: 1px;
  background: #ccc;
}

.timeline-item {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  height: 35px;
}

.timeline-item.info {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: auto;
  min-height: auto;
  margin: 0 !important;
  padding-top: 27px !important;
  padding-bottom: 2px !important;
  clear: both;
  z-index: 2;
}

.timeline-item.info .timeline-info-badge {
  display: inline-block;
  padding: 4px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
  white-space: nowrap;
  line-height: 1.4;
}

.timeline-marker {
  position: absolute;
  top: 21px;
  left: calc(50% - 3px);
  width: 34px;
  height: 34px;
  margin-left: -17px;
  border-radius: 50%;
  background: #f0ad4e;
  border: 2px solid #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  font-weight: bold;
  color: white;
  box-sizing: border-box;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.3px;
  z-index: 1;
}

.timeline-content {
  position: relative;
  padding: 0.5rem;
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
  word-wrap: break-word;
  word-break: normal;
}

.timeline-content.left {
  text-align: right;
  margin-right: calc(50% + 25px);
  float: right;
  margin-top: 10px;
}

.timeline-content.right {
  text-align: left;
  margin-left: calc(50% + 19px);
  float: left;
  margin-top: 10px;
}

.timeline-content p {
  margin-top: 0.5rem;
}

.home-team .timeline-marker {
  background-color: #9CC3CC;
}

.away-team .timeline-marker {
  background-color: #e08766;
}

.home-team .timeline-content p,
.away-team .timeline-content p {
  font-weight: bold;
}

/* ---------- 5. Bet365 技术统计面板 ---------- */
.b365-stats-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 4px 12px;
  color: #222;
}

.b365-xg-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #222;
}

.b365-xg-label {
  font-size: 12px;
  font-weight: 500;
  color: #666;
}

.b365-xg-dot {
  width: 6px;
  height: 12px;
  display: inline-block;
}

.b365-xg-dot--home {
  background: #EE825E;
  border-radius: 0 12px 12px 0;
}

.b365-xg-dot--away {
  background: #82C6D0;
  border-radius: 12px 0 0 12px;
}

.b365-rings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  text-align: center;
}

.b365-ring-title {
  font-size: 12px;
  color: #555;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.b365-ring-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.b365-ring-val {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  min-width: 20px;
}

.b365-ring-svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
}

.b365-cards-shots-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 4px 0;
}

.b365-cards-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.b365-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 16px;
}

.b365-card-num {
  font-size: 12px;
  font-weight: 700;
  color: #222;
  line-height: 1;
}

.b365-shots-center {
  text-align: center;
  min-width: 0;
}

.b365-shots-title {
  font-size: 12px;
  color: #555;
  margin-bottom: 6px;
}

.b365-shots-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.b365-shots-val {
  font-size: 12px;
  font-weight: 700;
  color: #222;
  white-space: nowrap;
}

.b365-shots-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.b365-dual-bar {
  display: flex;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef1f5;
  gap: 2px;
}

.b365-dual-bar--sub {
  width: 56%;
  margin: 0 auto;
  height: 3px;
}

.b365-bar-home {
  background: #EE825E;
  height: 100%;
  border-radius: 999px 0 0 999px;
}

.b365-bar-away {
  background: #82C6D0;
  height: 100%;
  border-radius: 0 999px 999px 0;
}

.b365-action-areas {
  margin-bottom: 16px;
}

.b365-action-title {
  text-align: center;
  font-size: 12px;
  color: #555;
  margin-bottom: 8px;
}

.b365-pitch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 60px;
  border: 1px solid #d9dee6;
  border-radius: 4px;
  background: #fafbfc;
  align-items: center;
  text-align: center;
}

.b365-pitch-center-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d9dee6;
  pointer-events: none;
}

.b365-pitch-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border: 1px solid #d9dee6;
  border-radius: 50%;
  pointer-events: none;
}

.b365-pitch-box-left,
.b365-pitch-box-right {
  position: absolute;
  top: 14px;
  bottom: 14px;
  width: 14px;
  border: 1px solid #d9dee6;
  pointer-events: none;
}

.b365-pitch-box-left {
  left: 0;
  border-left: none;
}

.b365-pitch-box-right {
  right: 0;
  border-right: none;
}

.b365-pitch-val {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: #222;
}

.b365-compare-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.b365-compare-title {
  text-align: center;
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}

.b365-compare-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.b365-compare-val-home {
  font-size: 12px;
  font-weight: 700;
  color: #222;
  text-align: right;
}

.b365-compare-val-away {
  font-size: 12px;
  font-weight: 700;
  color: #222;
  text-align: left;
}

@media (max-width: 420px) {
  .b365-ring-svg {
    width: 32px;
    height: 32px;
  }
  .b365-ring-val {
    font-size: 12px;
    min-width: 16px;
  }
  .b365-cards-shots-row {
    gap: 6px;
  }
  .b365-cards-group {
    gap: 6px;
  }
}

/* ---------- 6. 赔率走势图卡片及图例样式 ---------- */
.odds-chart-card {
  margin-bottom: 12px;
  background: #fff;
  border-radius: 6px;
  padding: 8px 0;
}

.odds-chart-title {
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
}

.odds-chart-legend {
  display: flex !important;
  justify-content: space-around !important;
  align-items: flex-start !important;
  padding: 0 4px 4px 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.odds-legend-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

.odds-legend-top {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  font-size: 12.5px !important;
  font-weight: bold !important;
  color: #333 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.odds-legend-icon {
  display: inline-block !important;
  width: 16px !important;
  height: 8px !important;
  position: relative !important;
  flex-shrink: 0 !important;
}

.odds-legend-icon::before {
  content: '' !important;
  position: absolute !important;
  top: 3.5px !important;
  left: 0 !important;
  width: 16px !important;
  height: 1.5px !important;
  background: currentColor !important;
}

.odds-legend-icon.dashed::before {
  border-top: 1.5px dashed currentColor !important;
  background: transparent !important;
  height: 0 !important;
}

.odds-legend-icon::after {
  content: '' !important;
  position: absolute !important;
  top: 1px !important;
  left: 5px !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #fff !important;
  border: 1.5px solid currentColor !important;
}

.odds-legend-val {
  font-size: 11px !important;
  color: #555 !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

@media (max-width: 600px) {
  .odds-legend-top {
    font-size: 11.5px !important;
    gap: 3px !important;
  }
  .odds-legend-icon {
    width: 13px !important;
  }
  .odds-legend-icon::before {
    width: 13px !important;
  }
  .odds-legend-icon::after {
    left: 4px !important;
    width: 5px !important;
    height: 5px !important;
  }
  .odds-legend-val {
    font-size: 10.5px !important;
  }
}

@media (max-width: 991px) {
  .bf-app .bf-tab-pane[data-tab="odds_more"] .odds-more-inner,
  #home-detail-app .bf-tab-pane[data-tab="odds_more"] .odds-more-inner {
    padding: 8px 18px !important;
    box-sizing: border-box !important;
  }
}

.bf-chart-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  box-sizing: border-box;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.bf-chart-dot.is-active {
  transform: translate(-50%, -50%) scale(1.45);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  z-index: 6;
}

.bf-wdl-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 3;
  box-sizing: border-box;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.bf-wdl-dot:hover,
.bf-wdl-dot.is-active {
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  z-index: 6;
}

/* HTML+CSS 数学公式样式（自动换行，避免横向滚动条） */
.latex-box {
  overflow-x: hidden !important;
  word-break: break-word;
}

.bf-formula {
  display: block;
  margin: 8px 0;
  padding: 8px 10px;
  background: #f8fafc;
  border-left: 3px solid #6bc7d1;
  border-radius: 4px;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 13.5px;
  line-height: 1.85;
  color: #1e293b;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bf-formula sub,
.bf-formula sup {
  font-size: 0.76em;
  line-height: 0;
}

.bf-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 3px;
  font-size: 0.92em;
  line-height: 1.15;
}

.bf-frac-num {
  border-bottom: 1px solid #334155;
  padding: 0 4px 2px;
  text-align: center;
}

.bf-frac-den {
  padding: 2px 4px 0;
  text-align: center;
}

.bf-sum {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 3px;
  line-height: 1;
}

.bf-sum-top,
.bf-sum-bot {
  font-size: 0.68em;
  color: #475569;
}

.bf-sum-sym {
  font-size: 1.25em;
  line-height: 1;
}



/* ---------- 足球现场动画球场与时钟（原 soccerStylesEssential） ---------- */
#pitchWrapper,
.pitchWrapper,
#teamPitchContent,
#mobileTeamPitchContent,
.teamPitchContent,
.ml1-MatchLiveSoccerModule_PitchContainer {
  border-radius: 6px !important;
  overflow: hidden !important;
}

.ml1-SoccerClock {
  opacity: 1 !important;
  display: flex !important;
  width: 100% !important;
  top: 0 !important;
  position: absolute !important;
  z-index: 50 !important;
  pointer-events: none !important;
}

.ml1-SoccerClock_Timer {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  line-height: 18px !important;
  padding: 0 8px !important;
  border-radius: 0 0 3px 3px !important;
  background-color: #165031 !important;
  color: #12e096 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

.ml1-SoccerClock_InjuryTime {
  margin-left: 4px !important;
  color: #ffeb3b !important;
  font-size: 10.5px !important;
}
