/* =====================================================================
   SVYC Regatta — regatta.css
   Minimal, clean styling for race list, forms, and tiny buttons
   ===================================================================== */

/* ---------- Variables ---------- */
:root{
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2a37;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #0e7490;

.status-scheduled {
  background:#e5e7eb;
  color:#1f2937;
  border-color:#d1d5db;
}

.status-course {
  background:#dbeafe;
  color:#1e3a8a;
  border-color:#bfdbfe;
}

.status-started {
  background:#fde68a;
  color:#78350f;
  border-color:#facc15;
}

.status-finished {
  background:#bbf7d0;
  color:#14532d;
  border-color:#86efac;
}

.status-postponed {
  background:#e9d5ff;
  color:#4c1d95;
  border-color:#d8b4fe;
}

.status-abandoned {
  background:#fecaca;
  color:#7f1d1d;
  border-color:#fca5a5;
}

.status-recall {
  background:#fee2e2;
  color:#7f1d1d;
  border-color:#fecaca;
}

.status-provisional {
  background:#cffafe;
  color:#164e63;
  border-color:#67e8f9;
}

.status-validated {
  background:#86efac;
  color:#14532d;
  border-color:#4ade80;
}

.status-cancelled {
  background:#fecaca;
  color:#7f1d1d;
  border-color:#f87171;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box; }
body{
  margin:0;
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:linear-gradient(180deg, #f7fbff 0%, var(--bg) 200px);
}

/* Brand stripe */
.brand-top{
  height:4px;
  background: linear-gradient(90deg, #0e7490, #1d4ed8, #16a34a);
  border-radius: 0 0 6px 6px;
  margin-bottom: 8px;
}

/* Layout */
.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.header{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-bottom: 12px;
}
.subhead{ color:var(--muted); font-size:.9rem; }
.header-actions .btn{ margin-left:6px; }

/* New: event section heading (subheading per event) */
.event-heading{
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.25rem; /* 20px */
  line-height: 1.4;
  margin: 24px 0 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,.08);
  color: #111827;
}

/* Grid of race cards */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap:16px;
  margin-top: 12px;
}

.race-card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  padding:16px;
  box-shadow: var(--shadow-1);
}

.race-title{
  margin:6px 0 4px;
  font-size:1.05rem;
  font-weight:800;
}

.race-meta{
  font-size:.9rem;
  color:var(--muted);
  margin-bottom:10px;
}

.status-chip{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;          /* ↓ tighter vertically */
  border-radius:999px;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.02em;
  border:1px solid transparent;
  margin-bottom:6px;
  white-space:nowrap;
  line-height:1.2;
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius: var(--radius-sm);
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  font-weight:600;
  font-size: 1.0rem;   /* ~19px */

}
.btn.ghost{ background:transparent; }
.btn.small{ padding:6px 10px; font-size:.9rem; }
.btn.primary{ border-color:transparent; background:var(--brand); color:#fff; }
.btn.primary:hover{ filter:brightness(0.95); }

.btn-row.tiny{ display:flex; gap:6px; }
.btn-row.tiny .inline{ display:inline; margin:0; }
.btn-row.tiny .btn{ padding:6px 8px; font-size:.82rem; }
.btn-row .btn{ width:auto; }

/* Sections / tables */
.section{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg);
  padding:16px; box-shadow:var(--shadow-1);
}

/* Footer */
footer{
  color:var(--muted); font-size:.9rem; text-align:center; padding:28px 0 36px;
}

/* ---------- Forms ---------- */
label{ display:block; margin:8px 0 6px; font-weight:600; }
input[type="text"], input[type="email"], input[type="number"], input[type="time"], select, textarea{
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px;
  background:#fff; color:var(--text);
}
input:focus, select:focus, textarea:focus{
  outline:none; border-color:#b6ccf7; box-shadow:0 0 0 3px rgba(29,78,216,.12);
}

/* Nicer select with custom chevrons */
select, .select-box {
  width: 100%;
  padding: 10px 36px 10px 12px; /* room for arrow */
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fff;
  color: var(--text);
  font-size: 0.95rem;
  appearance: none; /* remove native arrow */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select:focus, .select-box:focus {
  border-color: #b6ccf7;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
  outline: none;
}
select:disabled, .select-box:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  background-image: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px){
  .header{ flex-wrap:wrap; }
  .grid{ grid-template-columns: 1fr; } /* single-column on mobile */
  .container { padding: 12px; }
  .race-card { padding: 18px 16px; border-radius: 16px; }
  .race-title { font-size: 1.15rem; }
  .race-meta  { font-size: 1rem; }
  .status-chip { font-size: .9rem; padding: 6px 10px; }
  .btn-row.tiny .btn { padding: 10px 12px; font-size: .95rem; }
  .header-actions { display:flex; gap:8px; flex-wrap:wrap; }
  .header-actions .btn { padding: 8px 10px; font-size: .95rem; }
}

.promo-card {
  border: 3px dashed rgba(255,0,0,1);
}
