/* ── races.css ─────────────────────────────────────────────────*/

.races-section { margin-bottom: 28px; }
.races-section-label {
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.races-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.races-grid-past { opacity: 0.65; }

.race-card {
  background: var(--surface);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.race-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.race-card-date { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.race-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.race-card-name { font-size: 15px; font-weight: 600; color: var(--text); }
.race-venue { font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; }
.race-deadline { font-size: 12px; color: var(--text-tertiary); }

.race-card-actions { margin-top: 10px; }
.race-card-actions .cp-btn { flex: none; padding: 6px 12px; font-size: 12px; }

.race-badge {
  font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 8px;
  background: rgba(217,119,6,0.16);
  color: #92400e;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
[data-theme="dark"] .race-badge { background: rgba(217,119,6,0.22); color: #fdba74; }

.race-entries-subhead {
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.race-entries-subhead-divider {
  margin-top: 20px; padding-top: 16px;
  border-top: 0.5px solid var(--border);
}

.race-entries-list { display: flex; flex-direction: column; gap: 6px; }
.race-entry-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.race-entry-squad {
  font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 8px;
  flex-shrink: 0;
}
.race-entry-status { font-size: 13px; color: var(--text-secondary); flex: 1; }
.race-entry-remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-tertiary); font-size: 15px; line-height: 1;
  padding: 4px;
}
.race-entry-remove:hover { color: #b91c1c; }
.race-entries-empty { font-size: 13px; color: var(--text-secondary); padding: 4px 0 10px; }

.race-entry-paid {
  font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 8px;
  background: rgba(22,163,74,0.16);
  color: #15803d;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
[data-theme="dark"] .race-entry-paid { background: rgba(22,163,74,0.22); color: #86efac; }

.br-warning { color: #dc2626; margin-left: 5px; }

/* ── Race entry: multi-day tabs ──────────────────────────────────────────── */
.race-day-tabs {
  display: flex; flex-wrap: wrap; gap: 0;
  list-style: none; margin: 14px 0 0; padding: 0;
  border-bottom: 1px solid var(--border);
}
.race-day-tab {
  padding: 7px 14px; font-size: 13px; font-weight: 500;
  cursor: pointer; color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  white-space: nowrap;
}
.race-day-tab:hover { color: var(--text); }
.race-day-tab.active { color: var(--navy-dark); border-bottom-color: var(--navy-dark); font-weight: 600; }
.race-day-tab-add { color: var(--text-tertiary); font-weight: 600; }
.race-day-tab-add:hover { color: var(--navy-dark); }

.re-boating-container { padding-top:14px; }
.re-copy-prev-day-btn { width: 100%; margin-bottom: 14px; font-weight: 600; }

/* ── Race entry: boating two-column layout (pickers + crew preview) ───────── */
.re-boating-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.re-boating-pickers { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.re-boating-preview {
  border: 0.5px solid var(--border-strong); border-radius: var(--radius);
  padding: 12px 14px; background: var(--bg);
}
.re-crew-preview-list { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.re-crew-preview-item {
  font-size: 13px; color: var(--text); padding: 4px 2px;
  border-bottom: 0.5px solid var(--border);
}
.re-crew-preview-item:last-child { border-bottom: none; }
.re-crew-preview-empty { font-size: 12px; color: var(--text-tertiary); font-style: italic; padding: 4px 2px; }
.re-publish-day-btn { width: 100%; font-weight: 600; }
.re-publish-day-btn.published { background: rgba(22,163,74,0.16); color: #15803d; border-color: rgba(22,163,74,0.35); }
.re-publish-day-btn.published:hover { background: rgba(22,163,74,0.24); }
[data-theme="dark"] .re-publish-day-btn.published { background: rgba(22,163,74,0.22); color: #86efac; border-color: rgba(22,163,74,0.4); }

@media (max-width: 640px) {
  .re-boating-cols { grid-template-columns: 1fr; }
}

/* ── Race panel: BR license toggle, alongside Duration (days) ─────────────── */
.race-br-toggle-field { display: flex; align-items: flex-end; }
.race-br-toggle-label {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; user-select: none;
  padding-bottom: 9px; /* aligns the checkbox with the Duration input's baseline */
}
.race-br-toggle-label span { font-size: 13px; font-weight: 600; color: var(--text-primary); }
