/* Paridade (pares/ímpares) analysis — padrões + histórico — shares freq-controls/chips/tabs/bar-wrap from mais-sorteados-frequencia.css */

/* Padrões table (modern grid rows, mirrors .freq-row pattern) */
.par-rows { min-width: 640px; display: flex; flex-direction: column; gap: 6px; }
.par-row {
  display: grid;
  grid-template-columns: 150px 1.4fr 80px 90px 150px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}
.par-row-head {
  padding: 0 18px 10px;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}
.par-rows-body .par-row {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.par-rows-body .par-row:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.par-cell { font-size: 14px; color: var(--text-main); }
.hist-cell { font-size: 14px; color: var(--text-main); }

/* Histórico table */
.hist-rows { min-width: 640px; display: flex; flex-direction: column; gap: 6px; }
.hist-row {
  display: grid;
  grid-template-columns: 90px 150px 70px 80px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}
.hist-row-head {
  padding: 0 18px 10px;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}
.hist-rows-body .hist-row {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.hist-rows-body .hist-row:hover { background: #fafafa; }
.hist-cell-contest { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-main); }

/* Pares/Ímpares badge */
.par-badge { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.par-badge-eq  { background: #e8f5e9; color: #2e7d32; }
.par-badge-par { background: #e3f2fd; color: #1565c0; }
.par-badge-imp { background: #fce4ec; color: #ad1457; }

/* Dezenas list (history view) */
.dzn-list { display: flex; flex-wrap: wrap; gap: 4px; max-height: 64px; overflow-y: auto; }
.dzn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.dzn-par { background: #bbdefb; color: #0d47a1; }
.dzn-imp { background: #ffcdd2; color: #b71c1c; }

/* Equilibrium / occurrence bars (generic, used inside par-row cells) */
.par-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 100px; }
.par-bar-bg { flex: 1; height: 7px; background: #eee; border-radius: 4px; overflow: hidden; }
.par-bar-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.3s ease; }
.par-bar-pct { font-size: 12px; color: var(--text-muted); min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }

/* Pagination */
.par-pag-wrap { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 4px; overflow-x: auto; }
.par-pag-btns { display: flex; gap: 4px; flex-shrink: 0; }
.par-pag-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.par-pag-btn:hover:not([disabled]) { border-color: var(--accent); color: var(--accent-dark); background: #ffffff; }
.par-pag-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.par-pag-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.par-pag-active { background: var(--accent) !important; color: #ffffff !important; border-color: var(--accent) !important; font-weight: 700; }
.par-pag-active:hover { background: var(--accent-dark) !important; color: #ffffff !important; border: 1px solid var(--accent-dark) !important; }

@media (max-width: 720px) {
  .par-row { grid-template-columns: 120px 1.2fr 70px 80px 120px; }
  .hist-row { grid-template-columns: 70px 120px 60px 70px 1fr; }
}
