/* ── All-Predictions page-specific overrides ── */

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0 6px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border, #e2e6f0);
  background: var(--card-bg, #fff);
  color: var(--text-secondary, #64748b);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  text-decoration: none;
}
.filter-btn:hover,
.filter-btn.active {
  background: #3a55de;
  border-color: #3a55de;
  color: #fff;
}
.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-right: 4px;
}

/* Stats bar — always one horizontal row */
.stats-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e6f0);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 22px;
}
.stats-bar-item {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 10px;
  text-align: center;
  border-right: 1px solid var(--border, #e2e6f0);
}
.stats-bar-item:last-child { border-right: none; }
.sbi-val {
  font-size: 22px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  color: #3a55de;
  line-height: 1;
}
.sbi-val.green { color: #16a34a; }
.sbi-val.orange { color: #f59e0b; }
.sbi-label {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-top: 4px;
  font-weight: 500;
}

/* Predictions table — uses table.tips from style.css (same mobile fit as yesterday) */
.pred-section {
  margin-bottom: 32px;
}
.pred-tips-table {
  margin-bottom: 0;
}
.pred-section .tips-table-wrap {
  border-radius: 14px;
}
tr.pred-row {
  cursor: pointer;
}
tr.pred-row:hover td {
  background: var(--surface);
}
tr.pred-preview-row {
  display: none;
}
tr.pred-preview-row.open {
  display: table-row;
}
tr.pred-preview-row td {
  padding: 0;
  background: var(--bg-subtle, #f8fafc);
  border-bottom: 1px solid var(--border, #e2e6f0);
}
tr.pred-preview-row.open + tr.pred-row td,
tr.pred-row:has(+ tr.pred-preview-row.open) td {
  border-bottom-color: transparent;
}
.pred-conf-inline {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

/* Expandable preview panel */
.pred-preview-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 14px 16px 16px;
}
@media (max-width: 640px) {
  .pred-preview-inner { grid-template-columns: 1fr; }
}
.pred-preview-analysis {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary, #475569);
}
.pred-preview-stats {
  display: flex;
  gap: 10px;
}
.pps-box {
  flex: 1;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e6f0);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.pps-val {
  font-size: 17px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  color: #3a55de;
}
.pps-val.green { color: #16a34a; }
.pps-val.orange { color: #f59e0b; }
.pps-label {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  margin-top: 3px;
  font-weight: 500;
}

/* Expand toggle icon in table */
.pred-toggle-icon {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  transition: transform .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pred-toggle-icon.open { transform: rotate(180deg); }

/* Confidence tier badge (header of section) */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.tier-badge.elite   { background: #dcfce7; color: #16a34a; }
.tier-badge.high    { background: #eff2ff; color: #3a55de; }
.tier-badge.medium  { background: #fef3c7; color: #d97706; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px 0 16px;
}
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border, #e2e6f0);
  background: var(--card-bg, #fff);
  color: var(--text-secondary, #64748b);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: #3a55de;
  border-color: #3a55de;
  color: #fff;
}

.seo-section {
  max-width: 860px;
  margin: 0 auto 40px;
  padding: 32px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e6f0);
  border-radius: 14px;
  line-height: 1.8;
}
.seo-section p,
.seo-section li {
  max-width: 72ch;
  color: var(--text-secondary, #475569);
  font-size: 14px;
}
.seo-section h2 {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  color: var(--text-primary, #1e293b);
  margin: 24px 0 8px;
}
.seo-section h3 {
  font-size: 15px;
  font-weight: 600;
  font-family: 'Sora', sans-serif;
  color: var(--text-primary, #1e293b);
  margin: 20px 0 6px;
}

.tg-cta {
  max-width: 860px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #2196c9, #1a7aad);
  border-radius: 14px;
  padding: 20px 28px;
}

.result-win    { background: #dcfce7 !important; color: #16a34a !important; }
.result-loss   { background: #fee2e2 !important; color: #dc2626 !important; }
.result-void   { background: #f1f5f9 !important; color: #94a3b8 !important; }

.pred-result-score {
  font-family: 'Sora', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.pred-result-score.result-win { color: #16a34a; }
.pred-result-score.result-loss { color: #dc2626; }
.pred-tip-badge.result-pending {
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 11px;
}

/* Tablet / mobile section tweaks */
@media (max-width: 900px) {
  .section-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .section-title {
    font-size: 14px;
  }
  .tg-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px;
  }
}

@media (max-width: 720px) {
  .stats-bar-item {
    padding: 10px 4px;
  }
  .sbi-val {
    font-size: 14px;
  }
  .sbi-label {
    font-size: 8.5px;
    line-height: 1.25;
  }
  .filter-bar {
    gap: 6px;
    padding: 12px 0 8px;
  }
  .filter-btn {
    font-size: 12px;
    padding: 5px 10px;
  }
  .seo-section {
    padding: 20px 16px;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-stat-divider {
    display: none;
  }
  .stats-bar-item {
    padding: 8px 3px;
  }
  .sbi-val {
    font-size: 12px;
  }
  .sbi-label {
    font-size: 7.5px;
  }
}