﻿/* ── Root / Variables — Kanoclub De Paddel huisstijl ─────────── */
:root {
  --red:       #E30613;   /* KDP red */
  --red-light: #F53548;
  --red-dark:  #B70510;
  --blue:      #0F3A94;   /* KDP royal blue */
  --blue-light:#2A55B0;
  --blue-dark: #0A2A6E;
  --accent:    #E30613;
  --white:     #ffffff;
  --grey-bg:   #f4f6fa;
  --grey-mid:  #d0d5dd;
  --grey-dark: #444;
  --text:      #1a1a1a;
  --success:   #27ae60;
  --error:     #c0392b;
  --warn:      #e67e22;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(15,58,148,0.10);
  --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', Arial, sans-serif;
  --trans:     all 0.2s ease;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--grey-bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header — KDP red block with wave motif ──────────────────── */
.wz-header {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  position: relative;
  min-height: 60px; /* survive a broken banner img so the block stays visible */
}
/* SVG wave motif at the bottom of the header, always present so the
   red block keeps its identity even if the banner image is missing. */
.wz-header::after {
  content: "";
  display: block;
  height: 42px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'><path d='M0,20 C300,0 600,55 900,20 C1050,3 1150,25 1200,15 L1200,60 L0,60 Z' fill='%23ffffff'/><path d='M0,35 C300,10 600,60 900,32 C1050,18 1150,42 1200,32 L1200,60 L0,60 Z' fill='%230F3A94'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.wz-banner        { line-height: 0; }
.wz-banner img    { width: 100%; display: block; max-height: 220px; object-fit: cover; }
.wz-header-inner {
  padding: 28px 20px 32px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.wz-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5.5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-style: italic;
  text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.wz-subtitle {
  font-family: var(--font-head);
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 600;
  opacity: 0.95;
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Main ─────────────────────────────────────────────────────── */
.wz-main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* ── Card ─────────────────────────────────────────────────────── */
.wz-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 20px;
}
@media (max-width: 600px) {
  .wz-card { padding: 20px 14px; }
}

/* ── Language grid ────────────────────────────────────────────── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 12px;
  border: 2px solid var(--grey-mid);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  color: var(--grey-dark);
  transition: var(--trans);
  text-decoration: none;
}
.lang-btn:hover, .lang-btn:focus {
  border-color: var(--red);
  background: #fff5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(227,6,19,0.15);
  outline: none;
}
.lang-btn:hover .lang-name, .lang-btn:focus .lang-name { color: var(--red); }
.lang-btn .lang-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--text);
  transition: color 0.2s ease;
}
.lang-btn .lang-iso {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
}

/* ── Form elements ────────────────────────────────────────────── */
.wz-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
}
.wz-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--grey-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wz-input, .wz-select {
  padding: 10px 14px;
  border: 1.5px solid var(--grey-mid);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: var(--trans);
  width: 100%;
}
.wz-input:focus, .wz-select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227,6,19,0.1);
}
.wz-input::placeholder { color: #aaa; }
.wz-input.is-invalid { border-color: var(--error); }
.wz-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 580px) {
  .wz-form-row { grid-template-columns: 1fr; }
}
.wz-hint {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2px;
}
.field-error {
  font-size: 0.83rem;
  color: var(--error);
  margin-top: 3px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 11px 24px; border-radius: 6px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: var(--trans); white-space: nowrap; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-light); box-shadow: 0 4px 12px rgba(227,6,19,0.3); }

.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:hover { background: var(--blue-dark); box-shadow: 0 4px 12px rgba(15,58,148,0.3); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #219150; }

.btn-outline { background: transparent; color: var(--red);
  border: 2px solid var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 0.87rem; }
.btn-lg { padding: 14px 32px; font-size: 1.1rem; }

.btn-nav-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 20px 0 8px;
  border-top: 1px solid var(--grey-mid);
  margin-top: 24px;
}

/* ── Verification code ───────────────────────────────────────── */
.code-box {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.code-input {
  font-size: 2rem;
  letter-spacing: 0.3em;
  width: 140px;
  text-align: center;
  padding: 10px;
  border: 2px solid var(--grey-mid);
  border-radius: 6px;
  font-family: monospace;
}
.code-input:focus { border-color: var(--red); outline: none; }

/* ── Alert banners ───────────────────────────────────────────── */
.alert {
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 0.95rem;
  margin-bottom: 16px;
  border-left: 4px solid transparent;
}
.alert-info    { background: #e8f4fd; border-color: #3498db; color: #1a5276; }
.alert-success { background: #eafaf1; border-color: var(--success); color: #1e6b3c; }
.alert-error   { background: #fdedec; border-color: var(--error); color: #922b21; }
.alert-warn    { background: #fef5e7; border-color: var(--warn); color: #784212; }

/* ── Team list ───────────────────────────────────────────────── */
.team-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.team-table th {
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
}
.team-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}
.team-table tr:last-child td { border-bottom: none; }
.team-table tr:hover td { background: #fff8f8; }
.team-table a { color: var(--red); font-weight: 600; text-decoration: none; }
.team-table a:hover { text-decoration: underline; }
.payment-ok  { color: var(--success); font-weight: 600; }
.payment-due { color: var(--error);   font-weight: 600; }

/* ── Player search ───────────────────────────────────────────── */
.player-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.current-players-panel {
  border-top: 1px solid var(--grey-mid);
  padding-top: 18px;
}
.search-area { position: relative; }
.search-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.player-results {
  margin-top: 12px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius);
  overflow: hidden;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  transition: var(--trans);
}
.player-row:last-child { border-bottom: none; }
.player-row:hover { background: #fff5f5; }
/* Whole search-result row is clickable, so make that visible. */
.player-row-clickable { cursor: pointer; user-select: none; }
.player-row-clickable:active { background: #ffe8ea; }
.flag-img { width: 32px; height: 22px; object-fit: cover;
  border-radius: 3px; flex-shrink: 0; }
.player-name { flex: 1; font-weight: 500; }
.btn-add-player {
  width: 34px; height: 34px;
  border: none; background: none; cursor: pointer;
  color: var(--success); font-size: 1.4rem;
  flex-shrink: 0;
  transition: var(--trans);
  display: flex; align-items: center; justify-content: center;
}
.btn-add-player:hover { transform: scale(1.2); }
/* Player-row layout: number, main column (name+roles), stats column, actions */
.player-main {
  flex: 1 1 auto;
  min-width: 0;              /* allow long names to shrink instead of overflow */
}
.player-name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-stats-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
  font-size: 0.72rem;
  color: #666;
  flex-shrink: 0;
}
.player-stats-col .stat-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.player-stats-col .stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  background: #f0f4f9;
  border-radius: 10px;
  white-space: nowrap;
}
.player-stats-col .stat strong { color: var(--blue); font-weight: 700; }
.player-stats-col .stat-flag {
  width: 14px; height: 10px;
  object-fit: cover;
  border-radius: 1px;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,.2);
}
.player-stats-col .first-tournament {
  background: transparent;
  color: #999;
  font-style: italic;
}
.player-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.btn-info-player {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--blue);
  font-size: 1.15rem;
  text-decoration: none;
  transition: var(--trans);
  border-radius: 50%;
}
.btn-info-player:hover { transform: scale(1.2); background: rgba(15,58,148,0.08); }

/* On mobile: stats slide under the name instead of taking a column */
@media (max-width: 640px) {
  .current-player-row { flex-wrap: wrap; }
  .player-main         { flex: 1 1 60%; }
  .player-stats-col    { flex: 1 1 100%; align-items: flex-start; }
  .player-stats-col .stat-row { justify-content: flex-start; }
}

.btn-remove-player, .btn-edit-player {
  width: 34px; height: 34px;
  border: none; background: none; cursor: pointer;
  font-size: 1.4rem;
  transition: var(--trans);
}
.btn-remove-player { color: var(--error); }
.btn-edit-player   { color: var(--blue); font-size: 1.15rem; }
.btn-remove-player:hover, .btn-edit-player:hover { transform: scale(1.2); }

/* Canoe polo player preview (PNG with transparent jacket area over a
   coloured square that shines through — used on the team-details page
   AND on the add-player panel). */
.canoe-player {
  position: relative;
  width: 280px;
  aspect-ratio: 1 / 1;
}
.canoe-jacket-color {
  /* Only cover the vest area of the 1024×1024 canoe-playerX.png sprite,
     otherwise the colour shines through the transparent background as well
     and the whole container turns red/blue/etc. */
  position: absolute;
  left: 41%;
  top: 41%;
  width: 15%;
  height: 21%;
  z-index: 1;
  border-radius: 2px;
}
.canoe-overlay {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 2;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
/* Accessories that appear behind the paddler (keeper goal, referee whistle).
   z-index below the PNG so the player stays in front. */
.canoe-goal,
.canoe-whistle {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
/* Positioned in the transparent parts of the 1024×1024 sprite so the
   paddler himself doesn't hide them. Goal drifts behind him at the
   upper-left, whistle floats to his right at hip-height. */
/* Goal: right-behind the keeper, vertically centred on the container. */
.canoe-goal    { right: -2%; top: 22%;  width: 75%; }
/* Referee kit: whistle+cards, upper-left corner, compact. */
.canoe-whistle { left: 0%;    top: 0%;  width: 22%; }
.canoe-goal svg, .canoe-goal img,
.canoe-whistle svg, .canoe-whistle img { width: 100%; height: auto; display: block; }

/* Add-player form panel */
.add-player-panel {
  margin-top: 16px;
  padding: 16px;
  background: #f2f7ff;             /* very light KDP-blue tint */
  border: 1.5px solid #cddcf3;
  border-radius: var(--radius);
  animation: slideDown 0.2s ease;
}
.add-player-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}
@media (max-width: 520px) {
  .add-player-grid { grid-template-columns: 1fr; }
}
.add-player-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
}
.canoe-preview-tilt {
  /* image itself stays straight; only the overlay content is tilted so it
     visually follows the paddler's lean. */
}
.jacket-overlay {
  /* Tilt the number + flag + name so they lean with the paddler. */
  transform: rotate(8deg);
  transform-origin: center center;
  /* Nudged 1% left vs .canoe-jacket-color for a better visual balance
     — the tilt on its own pushes the top element to the right. */
  position: absolute;
  left: 40%;
  top: 41%;
  width: 15%;
  height: 21%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  pointer-events: none;
  padding: 0;
  justify-content: center;
}
.jkt-num {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.4rem;
  line-height: 1;
  color: #fff;                     /* set by JS to KleurShirt2 hex */
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.jkt-flag {
  width: 45%;
  max-width: 20px;
  height: auto;
  border: 1px solid #fff;          /* fine contour so red-on-red stays visible */
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.35);
  border-radius: 2px;
  object-fit: cover;
}
.jkt-voornaam {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.48rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
@keyframes slideDown {
  from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); }
}
.player-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}
.player-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 4px;
  transition: var(--trans);
}
.player-check-label:hover { background: rgba(227,6,19,0.05); }
.player-check-label input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--red); cursor: pointer;
}

/* Current players list (right panel) */
.current-players-panel h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-dark);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--red);
}
.current-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 5px;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}
.current-player-row:hover { background: #fff5f5; }
.player-num {
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.player-roles {
  font-size: 0.75rem;
  color: #888;
  display: flex; gap: 4px;
}
.role-tag {
  background: #eee;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
}
.role-tag.keeper { background: #d5e8d4; color: #2e6b2e; }
.role-tag.scheids { background: #dae8fc; color: #1a4d7a; }

/* ── Meals ────────────────────────────────────────────────────── */
.meal-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius);
  margin-bottom: 12px;
  align-items: flex-start;
}
.meal-img {
  width: 80px; height: 60px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}
.meal-placeholder-img {
  width: 80px; height: 60px;
  background: linear-gradient(135deg, #eee, #ddd);
  border-radius: 5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.meal-info { flex: 1; }
.meal-title { font-weight: 600; font-size: 0.95rem; }
.meal-desc { font-size: 0.82rem; color: #666; margin-top: 3px; }
.meal-price { font-weight: 700; color: var(--red); font-size: 0.9rem; }
.meal-qty { margin-left: auto; flex-shrink: 0; }
.qty-select { padding: 6px 10px; border-radius: 5px;
  border: 1.5px solid var(--grey-mid); font-size: 1rem;
  width: 68px; text-align: center; background: #fff; }

/* ── Summary / Costs table ───────────────────────────────────── */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.cost-table th {
  background: #f0f0f0;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
}
.cost-table th:last-child { text-align: right; }
.cost-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}
.cost-table td:last-child { text-align: right; font-weight: 500; }
.cost-table tr.total-row td {
  font-weight: 700;
  font-size: 1rem;
  border-top: 2px solid var(--grey-mid);
  border-bottom: none;
}
.cost-table tr.highlight td { background: #f9f9f9; }

/* ── Payment buttons ─────────────────────────────────────────── */
.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

/* ── Steps indicator ─────────────────────────────────────────── */
.wz-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wz-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  flex: 1;
  min-width: 52px;
  max-width: 90px;
}
.wz-step::before {
  content: '';
  position: absolute;
  top: 15px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--grey-mid);
  z-index: 0;
}
.wz-step:first-child::before { display: none; }
.wz-step.done::before { background: var(--red); }
.wz-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--grey-mid);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  transition: var(--trans);
}
.wz-step.active .wz-step-num { background: var(--red); box-shadow: 0 0 0 4px rgba(227,6,19,0.15); }
.wz-step.done .wz-step-num { background: var(--success); }
.wz-step-label {
  font-size: 0.68rem;
  color: #888;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.wz-step.active .wz-step-label { color: var(--red); font-weight: 600; }
.wz-step.done .wz-step-label { color: var(--success); }

/* ── Spinner overlay ─────────────────────────────────────────── */
.spinner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.spinner-overlay.active { display: flex; }
.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--grey-mid);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────────── */

/* Tablet-and-smaller ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .wz-header-inner { padding: 20px 16px 24px; }
  .wz-main         { padding: 20px 12px 36px; }
  .wz-card         { padding: 20px 16px; }
  .section-title   { font-size: 1rem; }

  /* Wizard-step labels smaller so 6 fit on a narrow row */
  .wz-step-label   { font-size: 0.6rem; letter-spacing: 0.02em; }
  .wz-step-num     { width: 28px; height: 28px; font-size: 0.8rem; }
  .wz-step::before { top: 13px; }

  /* Team table: horizontal scroll rather than crushed columns */
  .team-table th, .team-table td { padding: 8px 10px; font-size: 0.9rem; }

  /* Canoe polo preview scales down */
  .canoe-player { width: min(240px, 60vw); }
}

/* Phone ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .wz-main { padding: 16px 8px 32px; }
  .wz-card { padding: 16px 12px; }

  .lang-grid { grid-template-columns: 1fr 1fr; }
  .code-input { font-size: 1.6rem; width: 120px; }
  .payment-actions { flex-direction: column; }
  .payment-actions .btn { width: 100%; }

  /* Wizard-steps: keep the numbered circles, hide the labels
     so 6 stages still fit on a 320-360px screen. */
  .wz-step-label { display: none; }
  .wz-step-num   { width: 26px; height: 26px; font-size: 0.75rem; }
  .wz-step::before { top: 12px; }

  /* Nav-bar buttons stack full-width, no more sideways overflow */
  .btn-nav-bar { flex-direction: column; }
  .btn-nav-bar .btn { width: 100%; }

  /* Card headers a bit tighter */
  .section-title { font-size: 0.95rem; }

  /* Team-table: switch to card-style rows so nothing wraps oddly */
  .team-table thead { display: none; }
  .team-table, .team-table tbody, .team-table tr, .team-table td { display: block; width: 100%; }
  .team-table tr { border: 1px solid var(--grey-mid); border-radius: 6px; margin-bottom: 8px; padding: 6px 10px; }
  .team-table td { border: none; padding: 4px 0; }
  .team-table td:first-child { font-weight: 700; font-size: 1.05rem; }

  /* Cost-table stays a table but with smaller padding */
  .cost-table th, .cost-table td { padding: 8px 10px; font-size: 0.9rem; }

  /* Meal cards stack */
  .meal-card { grid-template-columns: 1fr; }

  /* Canoe polo preview even smaller */
  .canoe-player { width: min(200px, 62vw); }

  /* Add-player grid stacks (already handled at 520px) — make sure
     the preview centres itself when stacked. */
  .add-player-preview { min-width: 0; }

  /* Dropdown panels: never wider than the viewport */
  .fs-panel { max-height: 50vh; }

  /* Prevent iOS zoom-on-focus for inputs — 16px minimum */
  .wz-input, .wz-select, .fs-search { font-size: 16px; }

  /* Reduce main heading sizes so the header doesn't dominate */
  .wz-title    { font-size: 1.5rem; }
  .wz-subtitle { font-size: 0.9rem; }
}

/* Extra-small (very narrow phones) ────────────────────────────── */
@media (max-width: 360px) {
  .wz-step-num { width: 22px; height: 22px; font-size: 0.7rem; }
  .wz-step::before { top: 10px; }
  .lang-grid { grid-template-columns: 1fr; }
}

/* ── Searchable dropdown (flags, colours, etc.) ─────────────── */
.fs { position: relative; }
.fs-trigger {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; cursor: pointer; text-align: left;
    background: #fff; font: inherit;
}
.fs-display { display: inline-flex; align-items: center; gap: 10px; min-height: 20px; }
.fs-placeholder { color: #999; }
.fs-flag {
    width: 24px; height: 16px; object-fit: cover;
    border-radius: 2px; box-shadow: 0 0 1px rgba(0,0,0,.3);
    flex-shrink: 0;
}
.fs-swatch {
    width: 22px; height: 16px; border-radius: 3px;
    border: 1px solid rgba(0,0,0,.15);
    flex-shrink: 0;
}
.fs-caret { color: #999; margin-left: 8px; font-size: .8em; }
.fs-panel {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: #fff; border: 1px solid #ccc; border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    z-index: 100;
    max-height: 320px; display: flex; flex-direction: column;
    overflow: hidden;
}
.fs-panel[hidden] { display: none; }
.fs-search {
    padding: 10px 12px; border: none; border-bottom: 1px solid #eee;
    font: inherit; font-size: .95rem; width: 100%;
    outline: none; box-sizing: border-box;
}
.fs-list {
    list-style: none; padding: 4px 0; margin: 0;
    overflow-y: auto; flex: 1;
}
.fs-option {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; cursor: pointer;
}
.fs-option:hover, .fs-option.fs-hl { background: #f2f6fa; }
.fs-option.fs-hidden { display: none; }
.fs-empty {
    padding: 12px; color: #888; font-style: italic; text-align: center;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom:  8px; }
.mb-16 { margin-bottom: 16px; }
.flex-center { display:flex; align-items:center; justify-content:center; gap:10px; }
.section-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(227,6,19,0.15);
}
