/* ── BetBot CMS – Custom Styles ─────────────────────────────────────────── */

/* ── Blue theme ──────────────────────────────────────────────────────────── */
.navbar { background-color: #0d6efd !important; }
.bg-light { background-color: #e7f1ff !important; }
.btn-outline-primary { color: #0d6efd; border-color: #0d6efd; }
.btn-outline-primary:hover { background-color: #0d6efd; color: #fff; }
.btn-warning { background-color: #0d6efd; border-color: #0d6efd; }
.btn-warning:hover { background-color: #0b5ed7; border-color: #0b5ed7; }

/* ── League search ───────────────────────────────────────────────────────── */
#leagueSearch { background-color: #cfe2ff; color: #084298; }
#leagueSearch::placeholder { color: #6ea8fe; }
#leagueTags .badge { background-color: #0d6efd !important; }
#leagueTags .badge i { margin-left: 0.3rem; }

/* ── Result row colours ──────────────────────────────────────────────────── */
.result-hit  { background-color: #d1e7dd !important; }
.result-hit td { background-color: #d1e7dd !important; }
.result-miss { background-color: #f8d7da !important; }
.result-miss td { background-color: #f8d7da !important; }
.row-finished { background-color: #e9ecef !important; color: #6c757d !important; }
.row-finished td { background-color: #e9ecef !important; color: #6c757d !important; }
.row-finished .rec-row span[style] { opacity: 0.5; }
tr[data-result-checked="true"] { opacity: .65; }

/* ── Confidence badge ────────────────────────────────────────────────────── */
.confidence-badge {
  display: inline-block;
  min-width: 2rem;
  padding: .25em .55em;
  border-radius: 9999px;
  font-weight: 700;
  font-size: .85em;
  color: #fff;
  line-height: 1.3;
}
.conf-low    { background: #dc3545; }
.conf-mid    { background: #fd7e14; }
.conf-high   { background: #198754; }

/* ── Status badges ───────────────────────────────────────────────────────── */
.status-badge {
  font-size: .75em;
  padding: .2em .5em;
  border-radius: 4px;
  font-weight: 600;
}
.status-upcoming  { background: #0dcaf0; color: #000; }
.status-live      { background: #dc3545; color: #fff; animation: pulse 1s infinite; }
.status-halftime  { background: #fd7e14; color: #fff; }
.status-finished  { background: #6c757d; color: #fff; }
.status-postponed { background: #ffc107; color: #000; }
.status-cancelled { background: #343a40; color: #fff; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}

/* ── Mobile card ─────────────────────────────────────────────────────────── */
.match-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: .6rem;
  overflow: hidden;
}

.match-card .col-left {
  background: #f8f9fa;
  padding: .6rem .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  text-align: center;
  border-right: 1px solid #dee2e6;
}

.match-card .col-mid {
  padding: .5rem .6rem;
  font-size: .8rem;
  border-right: 1px solid #dee2e6;
}

.match-card .col-right {
  padding: .5rem .6rem;
  font-size: .78rem;
  text-align: center;
}

.match-card .score-line {
  font-size: 1rem;
  font-weight: 700;
}

.match-card .team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .3rem;
}

.match-card .rec-label {
  color: #6c757d;
  font-size: .7rem;
}

/* ── PC table ────────────────────────────────────────────────────────────── */
#pcTable td, #pcTable th {
  vertical-align: middle;
  white-space: nowrap;
}

/* ── Spinner overlay ─────────────────────────────────────────────────────── */
#loadingBar .progress {
  height: 6px;
}

/* ── Scrollable modal ────────────────────────────────────────────────────── */
.modal-dialog-scrollable .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* ── Tiny button ──────────────────────────────────────────────────────────── */
.btn-xs {
  padding: .15rem .35rem;
  font-size: .75rem;
  line-height: 1.2;
}

/* ── Rec cell (Asia/Euro/Size columns) ───────────────────────────────────── */
.rec-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.rec-row .rec-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── AI分析表格样式 ──────────────────────────────────────────────────────── */
.analysis-table-container {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.25rem;
}

.analysis-table {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.analysis-table td {
  padding: 0.5rem;
  vertical-align: middle;
}

.analysis-table td.fw-bold {
  width: 25%;
}

/* 二级 Tab 样式区分 */
#analysisSubTabs {
  border-bottom: 2px solid #dee2e6;
}

#analysisSubTabs .nav-link {
  color: #495057;
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
}

#analysisSubTabs .nav-link.active {
  color: #0d6efd;
  background-color: transparent;
  border-bottom: 2px solid #0d6efd;
}
.review-badge {
  display: inline-block;
  min-width: 38px;
  text-align: center;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  flex-shrink: 0;
  margin-left: 4px;
}

/* ── Mobile responsive ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .modal-dialog-scrollable .modal-body {
    max-height: 100%;
  }
  #pcTable { display: none; }
  .match-card .col-right { font-size: .72rem; }
  .navbar-brand { font-size: 1rem; }
}
