/* Nagebouwd op de Moneybird-checkout (mnbrd.com/o/…), kleuren en maten uit de computed styles. */
:root {
  --bg: #fafaf9;
  --surface: #fdfdfd;
  --white: #fff;
  --text: #292524;
  --text-strong: #0c0a09;
  --muted: #776f69;
  --subtle: #a6a09b;
  --border: rgba(12, 10, 9, 0.1);
  --separator: #e7e5e4;
  --hover: #f5f5f4;
  --primary: #0073e6;
  --primary-hover: #0067cf;
  --danger: #dc2626;
  --success: #15803d;
  --radius: 8px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); font-family: var(--font); }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 21px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }

/* Layout */
.checkout { display: flex; min-height: 100vh; }
.column { flex: 1 1 50%; display: flex; padding: 32px 32px 0; }
.column--left { justify-content: flex-end; }
.column--right {
  justify-content: flex-start;
  background: var(--white);
  border-left: 1px solid #f5f5f4;
  box-shadow: 0 0 16px rgba(41, 37, 36, 0.05);
}
.column__content { width: 100%; max-width: 432px; }
.column--left .column__content { padding-bottom: 32px; }

/* Links: logo + productkaart */
.header { display: flex; align-items: center; height: 48px; padding: 8px 64px; margin-bottom: 32px; }
.header__logo { height: 38px; width: auto; }

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border: 1px solid rgba(12, 10, 9, 0.08);
  border-radius: 12px;
}
.card__image { display: flex; justify-content: center; padding-bottom: 16px; border-bottom: 1px solid var(--separator); }
.card__image img { width: 300px; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.card__pricing { display: flex; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--separator); }
.card__price { font-weight: 700; }
.card__price-note { color: var(--muted); }
.card__content { display: flex; flex-direction: column; gap: 4px; }
.card__title { font-size: 16px; font-weight: 600; line-height: 20px; color: var(--text-strong); }

/* Rechts: formulier */
.page-title { padding: 8px 16px; margin-bottom: 24px; }
.page-subtitle { padding: 0 16px 16px; }
.page-title h1,
.page-subtitle h2 { margin: 6px 0; font-size: 16px; font-weight: 600; line-height: 20px; color: var(--text-strong); }

.form-section + .form-section,
.form-section--company { margin-top: 16px; }
.form-section__label { display: block; padding: 8px 16px; font-weight: 500; }
.form-section__help { padding: 6px 16px 0; font-size: 12px; line-height: 18px; color: var(--muted); }

/* Gegroepeerde velden: de 1px gap toont de achtergrond als scheidingslijn. */
.group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  background-clip: padding-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.group > * { grid-column: 1 / -1; }
.group > .half { grid-column: auto; }

.field {
  display: block;
  width: 100%;
  height: 36px;
  padding: 4px 16px 5px;
  border: 0;
  background: var(--white);
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.field::placeholder { color: var(--subtle); opacity: 1; }
.field:focus { box-shadow: inset 0 0 0 1px var(--primary); }
.field[aria-invalid='true'],
.select__inner[aria-invalid='true'] { box-shadow: inset 0 0 0 1px var(--danger); }
.field--code { font-weight: 500; letter-spacing: 0.08em; }
.field--code::placeholder { font-weight: 400; }

.phone { display: flex; gap: 1px; }
.phone .field { flex: 1; min-width: 0; }

.field-with-action { position: relative; }
.field-with-action .field { padding-right: 44px; }
.field-action {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #57534e;
  cursor: pointer;
  transform: translateY(-50%);
}
.field-action:hover { background: var(--hover); }

/* Landkeuze */
.select__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 4px 16px 5px;
  border: 0;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  outline: none;
}
.select__inner:focus-visible { box-shadow: inset 0 0 0 1px var(--primary); }
.select__text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.select__caret { flex: none; margin-left: auto; color: #57534e; }
.select__flag {
  flex: none;
  width: 21px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(12, 10, 9, 0.06);
}
.select__flag.is-missing { visibility: hidden; }
.select--compact .select__inner { width: 56px; gap: 3px; padding: 0 10px 0 16px; }
.select--compact .select__flag { width: 15px; height: 10px; }
.select--compact .select__caret { margin-left: 0; width: 8px; }

.select__dropdown {
  position: absolute;
  z-index: 50;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px -8px rgba(12, 10, 9, 0.18), 0 2px 4px rgba(12, 10, 9, 0.04);
}
.select__search {
  display: block;
  width: 100%;
  height: 36px;
  padding: 4px 16px;
  border: 0;
  border-bottom: 1px solid var(--separator);
  outline: none;
}
.select__search::placeholder { color: var(--subtle); }
.select__list { max-height: 280px; margin: 0; padding: 4px; overflow-y: auto; list-style: none; }
.select__option { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.select__option.is-active { background: var(--hover); }
.select__option[aria-selected='true'] { font-weight: 600; }
.select__empty { padding: 10px 16px; color: var(--muted); }

/* Zakelijke aankoop */
.checkbox { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding-top: 4px; cursor: pointer; }
.checkbox input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.checkbox__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: 2px 0 0 16px;
  border: 1px solid #d6d3d1;
  border-radius: 4px;
  background: var(--white);
  color: var(--white);
}
.checkbox__box svg { opacity: 0; }
.checkbox input:checked + .checkbox__box { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked + .checkbox__box svg { opacity: 1; }
.checkbox input:focus-visible + .checkbox__box { outline: 2px solid rgba(0, 115, 230, 0.4); outline-offset: 2px; }

.separator { height: 0; margin: 30px 0; border: 0; border-top: 1px solid var(--border); }

/* Vergrendelde vouchersectie, zoals Moneybird's betaalmethodes */
.voucher-lock { position: relative; padding: 16px; cursor: pointer; outline: none; }
.voucher-lock__skeleton { display: flex; flex-direction: column; gap: 8px; filter: blur(4px); opacity: 0.8; }
.skeleton { display: flex; gap: 12px; padding: 12px 16px; }
.skeleton__icon { width: 32px; height: 32px; border-radius: 12px; background: var(--separator); }
.skeleton__title { width: 80px; height: 16px; border-radius: 4px; background: var(--separator); }
.skeleton__subtitle { width: 120px; height: 8px; margin-top: 8px; border-radius: 4px; background: var(--separator); }
.voucher-lock__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}
.voucher-lock__text { max-width: 201px; }
.voucher-lock:focus-visible .voucher-lock__text { text-decoration: underline; }

/* Meldingen */
.messages { display: flex; flex-direction: column; gap: 2px; padding: 6px 16px 0; }
.messages:empty { display: none; }
.message { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 18px; }
.message svg { flex: none; margin-top: 4px; }
.message--error { color: var(--danger); }
.message--success { color: var(--success); }

/* Knop */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(12, 10, 9, 0.25);
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 4px -2px rgba(12, 10, 9, 0.03), 0 1px 1px rgba(12, 10, 9, 0.03);
}
.btn--primary { width: 100%; margin-top: 16px; background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-hover); }
.btn:disabled { opacity: 0.65; cursor: default; }
.btn__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Bevestiging */
.success { display: flex; flex-direction: column; gap: 16px; padding: 0 16px; }
.success__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #dcfce7; color: var(--success); }

.footer {
  margin-top: 64px;
  padding: 16px 0;
  border-top: 1px solid var(--separator);
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}

@media (min-width: 1200px) {
  .column--left { padding-right: 96px; }
  .column--right { padding-left: 96px; }
  .header { padding: 8px 16px; }
}

@media (max-width: 767px) {
  .checkout { flex-direction: column; }
  .column { flex: none; justify-content: center; }
  .column--left { padding: 16px 16px 0; }
  .column--right { padding: 32px 32px 0; border-left: 0; }
  .column__content { max-width: none; }
  .header { justify-content: center; padding: 8px 0; margin-bottom: 24px; }
}
