/* form: mode picker */

.radio-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.6rem 0;
}

.radio-field input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.radio-field strong {
  color: var(--text);
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* form: quick-add amount picker */

.preset-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0;
}

.preset-pick-btn.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Medal colors for the top 3 standings, applied to text rather than a
   border so it reads the same in a list row or a table cell. */

:root {
  --medal-gold: #e5c158;
  --medal-silver: #c7cdd6;
  --medal-bronze: #d38a55;
}

.is-rank-1 {
  color: var(--medal-gold);
}

.is-rank-2 {
  color: var(--medal-silver);
}

.is-rank-3 {
  color: var(--medal-bronze);
}

/* Standings: read-only, reorders freely as scores change. */

.score-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.score-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.score-name {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
}

.score-total {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Standings round table. Player name pinned left, total pinned right;
   only the round columns in between scroll horizontally, and JS keeps that
   scroll position pinned to the newest round after every poll refresh. */

.table-scroll {
  overflow-x: auto;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.score-table th,
.score-table td {
  padding: 0.5rem 0.6rem;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.score-table th {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.score-table-name-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
  font-weight: 600;
}

.score-table-total-col {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--surface);
}

.score-table-total {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* recent activity log */

.score-activity {
  margin-top: 1.5rem;
}

.score-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.score-activity-time {
  margin-left: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Score entry: a live-refreshed list, with the number inputs marked
   hx-preserve so an in-progress amount never gets wiped by the poll. */

.entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.1rem 1.25rem;
  margin-top: 1.5rem;
}

.entry-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.entry-card-head .section-title {
  margin: 0;
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entry-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.entry-row + .entry-row {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.entry-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Big touch targets: this gets tapped mid-game, on phones. */

.entry-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.entry-controls form {
  display: contents;
}

.score-btn {
  min-width: 3rem;
  min-height: 2.6rem;
  font-size: 1rem;
  font-weight: 700;
}

/* Joined into a single input+button control (shared border, no gap) so it
   reads as one interactive unit rather than two separate pieces. */

.entry-custom-form {
  display: flex !important;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}

.entry-custom-form:focus-within {
  border-color: var(--accent);
}

.entry-custom-input {
  width: 4rem;
  min-height: 2.6rem;
  background: var(--bg);
  border: none;
  border-radius: 0;
  padding: 0 0.5rem;
  color: var(--text);
  font: inherit;
  text-align: center;
}

.entry-custom-input:focus {
  outline: none;
}

.entry-custom-form .btn {
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--border);
}

/* round entry form */

.round-entry-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.round-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.round-entry-row label {
  font-weight: 600;
  font-size: 0.95rem;
}

.round-entry-row input {
  width: 5.5rem;
  min-height: 2.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 0.6rem;
  color: var(--text);
  font: inherit;
  text-align: center;
}

.round-entry-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.round-entry-form .btn-block {
  margin-top: 0.4rem;
}
