/* ═══════════════════════════════════════════════════════════
   shared.css — PadelConnects gedeelde stijlen
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0A0F1E;
  --bg2:      #0D1428;
  --bg3:      #111827;
  --card:     rgba(255,255,255,0.04);
  --card-hov: rgba(255,255,255,0.07);
  --border:   rgba(255,255,255,0.08);
  --orange:   #FF6B00;
  --blue:     #0057A8;
  --blue-lt:  #1E88E5;
  --text:     #FFFFFF;
  --text2:    rgba(255,255,255,0.65);
  --text3:    rgba(255,255,255,0.38);
  --grad:     linear-gradient(135deg, #FF6B00 0%, #0057A8 100%);
  --radius:   14px;
  --green:    #22c55e;
  --red:      #ef4444;
  --yellow:   #f59e0b;
  --t1: #FFD700;
  --t2: #C0C0C0;
  --t3: #CD7F32;
  --t4: #22C55E;
  --t5: #F97316;
  --t6: #A855F7;
  --t7: #3B82F6;
  --t8: #FB7185;
  --t9: #EC4899;
  --input-bg:  rgba(255,255,255,0.05);
  --input-bdr: rgba(255,255,255,0.12);
  --input-foc: rgba(255,107,0,0.5);
  /* Semantic tokens (dark defaults) */
  --navbar-bg:    rgba(10,15,30,0.92);
  --dropdown-bg:  #1a2540;
  --panel-bg:     rgba(255,255,255,0.04);
  --modal-bg:     #0D1428;
  --modal-overlay: rgba(0,0,0,0.65);
  --toast-bg:     rgba(10,15,30,0.95);
  --shadow:       rgba(0,0,0,0.5);
  --shadow-heavy: rgba(0,0,0,0.6);
  --option-bg:    #0D1428;
  --fab-label-bg: rgba(10,15,30,0.92);
}

/* ─── LIGHT MODE ──────────────────────────────────────── */
[data-theme="light"] {
  --bg:       #F5F7FA;
  --bg2:      #FFFFFF;
  --bg3:      #EDF0F4;
  --card:     #FFFFFF;
  --card-hov: #F0F2F5;
  --border:   rgba(0,0,0,0.10);
  --orange:   #E85D00;
  --text:     #1A2B4A;
  --text2:    rgba(26,43,74,0.65);
  --text3:    rgba(26,43,74,0.45);
  --input-bg:  #FFFFFF;
  --input-bdr: rgba(0,0,0,0.14);
  --input-foc: rgba(232,93,0,0.45);
  --navbar-bg:    rgba(255,255,255,0.92);
  --dropdown-bg:  #FFFFFF;
  --panel-bg:     #FFFFFF;
  --modal-bg:     #FFFFFF;
  --modal-overlay: rgba(0,0,0,0.35);
  --toast-bg:     #FFFFFF;
  --shadow:       rgba(26,43,74,0.10);
  --shadow-heavy: rgba(26,43,74,0.16);
  --option-bg:    #FFFFFF;
  --fab-label-bg: rgba(255,255,255,0.95);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ─── NAV ─────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 5%; height: 70px; display: flex; align-items: center;
  background: var(--navbar-bg); backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  width: 100%; max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
}
.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px; font-weight: 800;
  color: var(--text); text-decoration: none;
}
.nav-logo span {
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex; gap: 24px;
  margin-left: auto; margin-right: 16px;
}
.nav-link {
  font-size: 14px; font-weight: 500;
  color: var(--text2); text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--orange); }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; font-weight: 700;
  text-decoration: none; color: #fff; flex-shrink: 0;
  border: none; cursor: pointer; padding: 0;
}
.nav-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text2); text-decoration: none;
  background: var(--card); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 8px; transition: 0.2s;
}
.nav-back:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.nav-cta {
  padding: 9px 20px; border-radius: 8px;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.88; }
.nav-auth { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-auth-link { padding: 9px 20px; border-radius: 8px; background: var(--grad); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav-auth-cta { font-size: 14px; font-weight: 500; color: var(--text2); text-decoration: none; transition: color 0.2s; }
.nav-auth-cta:hover { color: var(--text); }
.nav-avatar-wrap { position: relative; display: none; }
.nav-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 6px; min-width: 168px; z-index: 300; box-shadow: 0 8px 30px var(--shadow); }
.nav-dropdown-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; color: var(--text2); text-decoration: none; font-size: 14px; font-family: 'Inter', sans-serif; }
.nav-dropdown-item:hover { background: rgba(255,255,255,0.06); }
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.nav-dropdown-logout { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; color: #f87171; font-size: 14px; font-family: 'Inter', sans-serif; background: transparent; border: none; cursor: pointer; }
.nav-dropdown-logout:hover { background: rgba(239,68,68,0.08); }

@media (max-width: 768px) { .nav-links { display: none; } .lang-toggle { margin-left: auto; } }
@media (min-width: 769px) { .nav-dropdown-mobile-only { display: none !important; } }

/* ─── LANG TOGGLE ──────────────────────────────────────── */
.lang-toggle {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 8px; padding: 3px; flex-shrink: 0;
}
.lang-btn {
  padding: 4px 9px; border: none; border-radius: 5px;
  background: transparent; color: var(--text3);
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: 0.2s;
}
.lang-btn.active { background: rgba(255,255,255,0.1); color: var(--text); }
.lang-btn:hover:not(.active) { color: var(--text2); }

/* ─── FLAG ICONS (cross-platform, no emoji) ──────────── */
.fi { display: inline-block; width: 1.1em; height: 0.8em; vertical-align: -0.05em; background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 2px; }
.fi-nl { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Crect width='9' height='2' fill='%23AE1C28'/%3E%3Crect y='2' width='9' height='2' fill='%23FFF'/%3E%3Crect y='4' width='9' height='2' fill='%2321468B'/%3E%3C/svg%3E"); }
.fi-be { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Crect width='3' height='6' fill='%23000'/%3E%3Crect x='3' width='3' height='6' fill='%23FAE042'/%3E%3Crect x='6' width='3' height='6' fill='%23ED2939'/%3E%3C/svg%3E"); }
.fi-gb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Crect width='60' height='30' fill='%23012169'/%3E%3Cpath d='M0 0l60 30M60 0L0 30' stroke='%23FFF' stroke-width='6'/%3E%3Cpath d='M0 0l60 30M60 0L0 30' stroke='%23C8102E' stroke-width='4' clip-path='polygon(30 15,60 30,60 0)' /%3E%3Cpath d='M0 0l60 30' stroke='%23C8102E' stroke-width='2'/%3E%3Cpath d='M60 0L0 30' stroke='%23C8102E' stroke-width='2'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23FFF' stroke-width='10'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E"); }
.fi-lg { width: 1.6em; height: 1.15em; border-radius: 3px; }

/* ─── CUSTOM SELECT DROPDOWN ─────────────────────────── */
.cs-wrap { position: relative; }
.cs-trigger {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 13px 40px 13px 16px; color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 15px; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.cs-trigger.placeholder { color: var(--text3); }
.cs-wrap.open .cs-trigger {
  border-radius: 10px 10px 0 0;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}
.cs-dropdown {
  position: absolute; z-index: 200; left: 0; right: 0;
  background: var(--dropdown-bg); border: 1px solid var(--orange); border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 200px; overflow-y: auto; display: none;
}
.cs-wrap.open .cs-dropdown { display: block; }
.cs-item {
  padding: 10px 16px; cursor: pointer; font-size: 14px;
  color: var(--text); display: flex; justify-content: space-between;
  align-items: center; gap: 8px; transition: background 0.12s;
}
.cs-item:hover { background: rgba(255,255,255,0.06); }
.cs-item.selected { color: var(--orange); }
.cs-group-label {
  padding: 8px 16px 4px; font-size: 11px; font-weight: 600;
  letter-spacing: 1px; color: var(--text3); text-transform: uppercase;
}
.cs-search {
  width: 100%; background: rgba(255,255,255,0.05); border: none; border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px 16px; color: var(--text); font-family: 'Inter', sans-serif; font-size: 14px; outline: none;
}
.cs-search::placeholder { color: var(--text3); }
.cs-empty { padding: 10px 16px; font-size: 13px; color: var(--text3); font-style: italic; }
.cs-dropdown::-webkit-scrollbar { width: 4px; }
.cs-dropdown::-webkit-scrollbar-track { background: transparent; }
.cs-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

/* ─── TOAST ───────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 300; background: var(--toast-bg);
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 12px; padding: 14px 22px;
  font-size: 14px; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 30px var(--shadow);
  transition: transform 0.35s, opacity 0.35s;
  opacity: 0; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-icon { font-size: 20px; }

/* ─── BG ORBS (decorative blurred circles) ────────────── */
.bg-orb {
  position: fixed; border-radius: 50%;
  filter: blur(100px); pointer-events: none; z-index: 0;
}
.bg-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,107,0,0.06) 0%, transparent 70%);
  top: -120px; right: -120px;
}
.bg-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,87,168,0.07) 0%, transparent 70%);
  bottom: -80px; left: -80px;
}

/* ─── PAGE / FORM HEADER ──────────────────────────────── */
.page-eyebrow, .form-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 3px; color: var(--orange);
  text-transform: uppercase; margin-bottom: 10px;
}
.page-title, .form-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 40px; font-weight: 900;
  line-height: 1.05; margin-bottom: 6px;
}
.page-sub, .form-sub {
  font-size: 15px; color: var(--text2);
  line-height: 1.5; margin-bottom: 32px;
}

/* ─── FORM CARD ───────────────────────────────────────── */
.form-card {
  width: 100%; max-width: 440px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 22px; padding: 42px 40px 36px;
  backdrop-filter: blur(20px);
}

/* ─── FORM FIELDS ─────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text2); margin-bottom: 7px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--input-bg); border: 1px solid var(--input-bdr);
  border-radius: 10px; padding: 13px 16px; color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 15px; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text3); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(255,107,0,0.55); background: rgba(255,255,255,0.07);
}

/* ─── FORM ERROR ──────────────────────────────────────── */
.form-error {
  display: none; background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 10px; padding: 11px 14px;
  font-size: 13px; color: #f87171;
  margin-bottom: 18px; line-height: 1.45;
}
.form-error.visible { display: block; }

/* ─── SUBMIT BUTTON ───────────────────────────────────── */
.btn-submit {
  width: 100%; padding: 15px; border-radius: 12px; border: none;
  background: var(--grad); color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 19px; font-weight: 700;
  letter-spacing: 0.5px; cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── TAP FEEDBACK (all platforms) ─────────────────────── */
button:active, .toggle-btn:active, .pos-chip:active, .level-chip:active,
.tier-pill:active, .pref-btn:active, .dur-chip:active, .time-chip:active,
.tog-btn:active, .country-btn:active, .lang-btn:active,
.nav-dropdown-item:active, .nav-dropdown-logout:active,
.btn-primary:active, .btn-ghost:active, .btn-submit:active,
.btn-confirm:active, .btn-send:active,
.club-action-btn:active, .woon-save:active, .avail-item:active,
.poule-option:active, .reason-chip:active {
  opacity: 0.75;
  transform: scale(0.97);
  transition: opacity 0.05s, transform 0.05s;
}

/* ─── GUEST POLICY TAG ───────────────────────────────── */
.guest-policy { display:inline-flex; align-items:center; gap:3px; font-size:12px; font-weight:600; white-space:nowrap; }
.guest-club-only { color:#fbbf24; }
.guest-open { color:#4ade80; }

/* ─── FIREFOX SCROLLBAR ───────────────────────────────── */
.gem-list, .tier-legend { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }

/* ─── THEME TOGGLE ───────────────────────────────────── */
.theme-toggle {
  width: 34px; height: 34px; border: none; border-radius: 8px;
  background: transparent; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: color 0.2s;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ─── LIGHT MODE OVERRIDES ───────────────────────────── */
/* Navbar */
[data-theme="light"] .lang-toggle { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.10); }
[data-theme="light"] .lang-btn.active { background: rgba(0,0,0,0.08); }
[data-theme="light"] .navbar { box-shadow: 0 1px 3px rgba(26,43,74,0.08); }
[data-theme="light"] .nav-dropdown { box-shadow: 0 8px 30px rgba(26,43,74,0.14); }
[data-theme="light"] .nav-dropdown-item:hover { background: rgba(0,0,0,0.05); }
[data-theme="light"] .nav-dropdown-logout:hover { background: rgba(239,68,68,0.06); }
[data-theme="light"] .nav-back { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.10); }
[data-theme="light"] .nav-back:hover { border-color: rgba(0,0,0,0.20); }
/* Orbs */
[data-theme="light"] .bg-orb { opacity: 0.35; }
/* Cards & form-card: solid white with subtle navy-tinted shadow */
[data-theme="light"] .form-card {
  backdrop-filter: none; border-color: rgba(0,0,0,0.08);
  box-shadow: 0 4px 24px rgba(26,43,74,0.08), 0 1px 3px rgba(0,0,0,0.04);
}
/* Custom-select */
[data-theme="light"] .cs-item:hover { background: rgba(0,0,0,0.05); }
[data-theme="light"] .cs-search { background: rgba(0,0,0,0.03); border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .cs-trigger {
  background: #FFFFFF; border-color: rgba(0,0,0,0.14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='rgba(0,0,0,0.35)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
[data-theme="light"] .cs-dropdown { box-shadow: 0 8px 24px rgba(26,43,74,0.12); }
/* Inputs */
[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea { box-shadow: 0 1px 3px rgba(26,43,74,0.06); }
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus { background: #FFFFFF; }
/* Toast: solid white with shadow */
[data-theme="light"] .toast { box-shadow: 0 4px 20px rgba(26,43,74,0.12); }
/* Scrollbars */
[data-theme="light"] .gem-list,
[data-theme="light"] .tier-legend { scrollbar-color: rgba(0,0,0,0.15) transparent; }
[data-theme="light"] .cs-dropdown::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }

/* ─── MOBILE RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
  .nav-dropdown { right: 0; left: auto; min-width: 200px; max-width: calc(100vw - 24px); }
}
@media (max-width: 600px) {
  html { overflow-x: hidden; }
  .bg-orb { display: none; }
  .navbar { height: 60px; padding: 0 4%; }
  .nav-inner { gap: 12px; }
  .nav-logo { font-size: 22px; }
  .nav-auth { gap: 6px; }
  .nav-auth-link { padding: 7px 14px; font-size: 13px; }
  .nav-cta { padding: 7px 14px; font-size: 13px; }
  .nav-dropdown { min-width: 180px; }
  .nav-dropdown-item { padding: 12px 14px; font-size: 14px; }
  .nav-dropdown-logout { padding: 12px 14px; font-size: 14px; }
  .toast { white-space: normal; max-width: calc(100vw - 32px); padding: 12px 16px; font-size: 13px; bottom: 16px; }
  .lang-toggle { padding: 2px; }
  .lang-btn { padding: 3px 7px; font-size: 11px; }
  .page-title, .form-title { font-size: 32px; }
  .form-card { padding: 32px 22px 28px; }
}
