/* ============================================================
   HUISSTIJL — Componenten
   Van der Valk Luxembourg · Biometha · CALM
   Vereist tokens.css.
   ============================================================ */

/* ---- Basis -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body.hs {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

.hs h1, .hs h2, .hs h3, .hs h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
  color: var(--text);
}

/* ---- Typografie-helpers ------------------------------------ */
.t-display { font-family: var(--font-display); font-size: var(--text-5xl); font-weight: 600; line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.t-h1 { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 600; line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.t-h2 { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 600; line-height: var(--leading-snug); }
.t-h3 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; }
.t-h4 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; }
.t-lead { font-size: var(--text-lg); color: var(--text-muted); line-height: var(--leading-normal); }
.t-body { font-size: var(--text-base); }
.t-small { font-size: var(--text-sm); color: var(--text-muted); }
.t-eyebrow {
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--accent);
}
.t-mono { font-family: var(--font-mono); font-size: var(--text-sm); }

/* ============================================================
   KNOPPEN
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600;
  line-height: 1; white-space: nowrap;
  padding: 0 var(--space-5); height: 42px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; user-select: none;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(0.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--text-subtle); }

.btn--soft { background: var(--accent-soft); color: var(--accent); }
.btn--soft:hover:not(:disabled) { background: color-mix(in oklch, var(--accent) 22%, var(--surface)); }

.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn--danger { background: var(--danger); color: var(--n-0); }
.btn--danger:hover:not(:disabled) { background: color-mix(in oklch, var(--danger) 85%, black); }

.btn--sm { height: 34px; padding: 0 var(--space-4); font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn--lg { height: 50px; padding: 0 var(--space-6); font-size: var(--text-base); }
.btn--icon { padding: 0; width: 42px; }
.btn--block { display: flex; width: 100%; }

/* ============================================================
   FORMULIEREN
   ============================================================ */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.label { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.hint { font-size: var(--text-xs); color: var(--text-subtle); }

.input, .select, .textarea {
  width: 100%; font-family: var(--font-sans); font-size: var(--text-sm);
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  padding: 0 var(--space-3); height: 42px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.textarea { height: auto; padding: var(--space-3); min-height: 96px; resize: vertical; line-height: var(--leading-normal); }
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
.input:disabled { background: var(--surface-2); color: var(--text-subtle); cursor: not-allowed; }
.input--error { border-color: var(--danger); }
.input--error:focus { box-shadow: 0 0 0 3px color-mix(in oklch, var(--danger) 30%, transparent); }
.error-text { font-size: var(--text-xs); color: var(--danger); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

/* Checkbox / radio */
.check { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: var(--text-sm); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .track {
  position: absolute; inset: 0; background: var(--surface-3);
  border-radius: var(--radius-full); transition: background var(--transition);
}
.toggle .track::before {
  content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
  background: var(--n-0); border-radius: 50%; box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::before { transform: translateX(18px); }
.toggle input:focus-visible + .track { box-shadow: var(--ring); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card__body { padding: var(--space-6); }
.card__header { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border); }
.card__footer { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); background: var(--surface-2); }
.card--hover { transition: box-shadow var(--transition), transform var(--transition); }
.card--hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); font-weight: 600; line-height: 1;
  padding: var(--space-1) var(--space-3); height: 24px;
  border-radius: var(--radius-full);
}
.badge--accent  { background: var(--accent-soft); color: var(--accent); }
.badge--neutral { background: var(--surface-2); color: var(--text-muted); }
.badge--success { background: var(--success-soft); color: color-mix(in oklch, var(--success) 75%, var(--text)); }
.badge--warning { background: var(--warning-soft); color: color-mix(in oklch, var(--warning) 60%, var(--text)); }
.badge--danger  { background: var(--danger-soft); color: color-mix(in oklch, var(--danger) 80%, var(--text)); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4); border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface);
  font-size: var(--text-sm);
}
.alert__icon { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--n-0); }
.alert--success { background: var(--success-soft); border-color: color-mix(in oklch, var(--success) 30%, transparent); }
.alert--success .alert__icon { background: var(--success); }
.alert--warning { background: var(--warning-soft); border-color: color-mix(in oklch, var(--warning) 35%, transparent); }
.alert--warning .alert__icon { background: var(--warning); }
.alert--danger { background: var(--danger-soft); border-color: color-mix(in oklch, var(--danger) 30%, transparent); }
.alert--danger .alert__icon { background: var(--danger); }
.alert--info { background: var(--info-soft); border-color: color-mix(in oklch, var(--info) 30%, transparent); }
.alert--info .alert__icon { background: var(--info); }

/* ============================================================
   TABEL
   ============================================================ */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table thead th {
  text-align: left; font-weight: 600; color: var(--text-muted);
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-4); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.table tbody td { padding: var(--space-4); border-bottom: 1px solid var(--border); color: var(--text); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: var(--accent-softer); }

/* ============================================================
   NAVIGATIE
   ============================================================ */
.topnav {
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-3) var(--space-5);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topnav__links { display: flex; gap: var(--space-1); margin-left: var(--space-4); }
.navlink {
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  text-decoration: none; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition);
}
.navlink:hover { background: var(--surface-2); color: var(--text); }
.navlink--active { color: var(--accent); background: var(--accent-soft); }

.sidebar { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.sideitem {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-3); border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  text-decoration: none; cursor: pointer; transition: background var(--transition), color var(--transition);
}
.sideitem:hover { background: var(--surface-2); color: var(--text); }
.sideitem--active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sideitem .ico { width: 18px; height: 18px; flex: none; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: oklch(0.15 0.01 75 / 0.45);
  backdrop-filter: blur(3px); display: grid; place-items: center;
  padding: var(--space-6); z-index: 50;
}
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 440px; overflow: hidden;
  max-height: calc(100vh - 2 * var(--space-6));
  display: flex; flex-direction: column;
}
.modal > .card__header { flex: 0 0 auto; }
.modal__body { padding: var(--space-6); overflow-y: auto; flex: 1 1 auto; min-height: 0; }
/* Body kan zelf een flex-kolom zijn (.stack); voorkom dat lange inhoud (bv. een
   splitsings­tabel) wordt platgedrukt — kinderen houden hun hoogte, body scrollt. */
.modal__body > * { flex-shrink: 0; }
.modal__footer { display: flex; gap: var(--space-3); justify-content: flex-end; padding: var(--space-4) var(--space-6) var(--space-6); flex: 0 0 auto; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-4); font-size: var(--text-sm);
  min-width: 280px;
}
.toast__bar { width: 4px; align-self: stretch; border-radius: var(--radius-full); background: var(--accent); }
.toast--success .toast__bar { background: var(--success); }
.toast--danger .toast__bar { background: var(--danger); }

/* ============================================================
   HOSPITALITY-EXTRA'S (Van der Valk)
   ============================================================ */
.badge--gold { background: var(--accent-2-soft); color: color-mix(in oklch, var(--accent-2) 55%, var(--text)); }

/* Beoordeling — Van der Valk toont scores als "8,6 / fantastisch" */
.rating { display: inline-flex; align-items: center; gap: var(--space-3); }
.rating__score {
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl);
  color: var(--accent-contrast); background: var(--accent);
  border-radius: var(--radius-md); padding: var(--space-1) var(--space-3); line-height: 1.2;
}
.rating__label b { display: block; font-size: var(--text-sm); }
.rating__label span { font-size: var(--text-xs); color: var(--text-subtle); }

/* Prijslabel */
.price { display: inline-flex; align-items: baseline; gap: var(--space-1); }
.price b { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; }
.price span { font-size: var(--text-sm); color: var(--text-muted); }

/* Fotoplaceholder — fotografie-gedreven, vul met echte beelden */
.img-ph {
  border-radius: var(--radius-lg); overflow: hidden;
  background-color: var(--surface-2);
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, color-mix(in oklch, var(--text) 5%, transparent) 11px 12px);
  display: grid; place-items: center; color: var(--text-subtle);
  font-family: var(--font-mono); font-size: var(--text-xs); text-align: center; padding: var(--space-4);
}

/* Boekingsbalk — de kern van elke Van der Valk-pagina */
.bookingbar {
  display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-4);
}
.bookingbar .field { flex: 1 1 140px; gap: var(--space-1); }
.bookingbar .label { font-size: var(--text-xs); color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Utility ------------------------------------------------ */
.swatch { border-radius: var(--radius-md); border: 1px solid var(--border); }
.divider { height: 1px; background: var(--border); border: none; margin: 0; }
