/* ==========================================================================
   Boekingsmodule. Gebruikt de tokens van het theme, met terugval zodat het
   blok ook op een andere pagina niet uit elkaar valt.
   ========================================================================== */

.ni-booking {
  --nib-yellow: var(--yellow, #febe14);
  --nib-green: var(--green, #23a455);
  --nib-dark: var(--dark-2, #121212);
  --nib-dark-3: var(--dark-3, #1a1a1a);
  --nib-line: var(--line-dark, #242424);
  --nib-grey: var(--grey, #9a9a96);
  --nib-radius: var(--radius, 14px);
  --nib-radius-lg: var(--radius-lg, 22px);

  padding: clamp(56px, 8vw, 104px) 0;
  background: var(--black, #000);
  color: var(--white, #fff);
}

.ni-booking__head { text-align: center; margin-bottom: 40px; }

/* ---------- Stappenbalk ---------- */
.ni-steps {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 0 0 28px; padding: 0; list-style: none;
}
.ni-steps__item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 9px;
  border: 1px solid var(--nib-line);
  border-radius: 999px;
  color: var(--nib-grey);
  font-size: 14px; font-weight: 500;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.ni-steps__num {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--nib-dark-3); color: var(--nib-grey);
  font-size: 13px; font-weight: 700;
}
.ni-steps__item.is-active { color: #fff; border-color: var(--nib-yellow); background: rgba(254,190,20,.08); }
.ni-steps__item.is-active .ni-steps__num { background: var(--nib-yellow); color: #000; }
.ni-steps__item.is-done .ni-steps__num { background: var(--nib-green); color: #fff; }
.ni-steps__item.is-done { color: #fff; }

/* ---------- Kaart ---------- */
.ni-booking__card {
  background: var(--nib-dark);
  border: 1px solid var(--nib-line);
  border-radius: var(--nib-radius-lg);
  padding: clamp(22px, 4vw, 40px);
}

.ni-panel[hidden] { display: none; }
.ni-panel__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  justify-content: space-between; margin-bottom: 22px;
}
.ni-panel__title { font-size: clamp(20px, 2.4vw, 27px); margin-bottom: 6px; }
.ni-panel__sub { color: var(--nib-grey); margin-bottom: 22px; }

.ni-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--nib-grey); font-size: 14px; font-weight: 500;
  transition: color .2s ease;
}
.ni-back:hover { color: var(--nib-yellow); }
.ni-back svg { transform: rotate(90deg); }

.ni-chosen {
  font-size: 14px; color: #fff;
  background: var(--nib-dark-3); border: 1px solid var(--nib-line);
  padding: 7px 15px; border-radius: 999px;
}
.ni-chosen strong { color: var(--nib-yellow); font-weight: 600; }

/* ---------- Velden ---------- */
.ni-field { display: flex; flex-direction: column; gap: 7px; }
.ni-field label { font-size: 13px; font-weight: 600; color: var(--nib-grey); }
.ni-field select,
.ni-field input,
.ni-field textarea {
  width: 100%;
  background: var(--nib-dark-3);
  border: 1px solid var(--nib-line);
  border-radius: var(--nib-radius);
  color: #fff;
  padding: 14px 16px;
  font-size: 15px;
  transition: border-color .2s ease, background .2s ease;
}
.ni-field select { appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9a96' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.ni-field select:disabled { opacity: .45; cursor: not-allowed; }
.ni-field select:focus, .ni-field input:focus, .ni-field textarea:focus {
  outline: none; border-color: var(--nib-yellow);
}
.ni-field textarea { resize: vertical; min-height: 92px; }
.ni-field.has-error input, .ni-field.has-error select { border-color: #e0564d; }
.ni-field.has-error .ni-datepick__trigger { border-color: #e0564d; }

.ni-hint { font-size: 12.5px; color: var(--nib-grey); margin: 0; }

/* Stap 1 */
.ni-car { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
.ni-car__submit { white-space: nowrap; }
@media (max-width: 900px) {
  .ni-car { grid-template-columns: 1fr 1fr; }
  .ni-car__submit { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 560px) {
  .ni-car { grid-template-columns: 1fr; }
}

/* ---------- Datumkiezer ---------- */
.ni-datepick { position: relative; }

/* Zodra het script draait verdwijnt het native veld: de kalender neemt het over.
   Het veld blijft wel in het formulier staan, want het draagt de waarde. */
.ni-datepick.is-enhanced input[type="date"] {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px; padding: 0; border: 0; margin: 0;
}

.ni-datepick__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--nib-dark-3);
  border: 1px solid var(--nib-line);
  border-radius: var(--nib-radius);
  color: #fff; padding: 14px 16px; font-size: 15px;
  transition: border-color .2s ease;
}
.ni-datepick__trigger::after {
  content: ""; flex: none; width: 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23febe14' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E") no-repeat center / contain;
}
.ni-datepick__trigger:hover,
.ni-datepick__trigger[aria-expanded="true"] { border-color: var(--nib-yellow); }
.ni-datepick__trigger:focus-visible { outline: 2px solid var(--nib-yellow); outline-offset: 2px; }
.ni-datepick__ph { color: var(--nib-grey); }
.ni-datepick__value { color: #fff; font-weight: 600; }

.ni-datepick__pop {
  position: absolute; z-index: 40; top: calc(100% + 8px); left: 0;
  width: min(330px, 100%);
  background: #0d0d0d;
  border: 1px solid var(--nib-line);
  border-radius: var(--nib-radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
  padding: 14px;
}
.ni-datepick__pop[hidden] { display: none; }

.ni-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ni-cal__month { font-size: 14.5px; font-weight: 600; text-transform: capitalize; }
.ni-cal__nav {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--nib-dark-3); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
  border: 1px solid var(--nib-line);
  transition: background .2s ease, color .2s ease;
}
.ni-cal__nav:hover { background: var(--nib-yellow); color: #000; }

.ni-cal__dows,
.ni-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ni-cal__dows {
  margin-bottom: 5px; text-align: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--nib-grey); text-transform: uppercase;
}
.ni-cal__pad { display: block; }
.ni-cal__day {
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid transparent;
  background: var(--nib-dark-3); color: #fff;
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ni-cal__day:hover:not(:disabled) { background: var(--nib-yellow); color: #000; }
.ni-cal__day:disabled { background: transparent; color: #4a4a4a; cursor: not-allowed; }
.ni-cal__day.is-today { border-color: var(--nib-grey); }
.ni-cal__day.is-selected { background: var(--nib-green); color: #fff; border-color: var(--nib-green); }
.ni-cal__day:focus-visible { outline: 2px solid var(--nib-yellow); outline-offset: 1px; }

/* ---------- Resultaten ---------- */
.ni-results__title { font-size: 19px; margin-bottom: 4px; }
.ni-results__sub { color: var(--nib-grey); font-size: 14.5px; margin-bottom: 18px; }
.ni-results__group + .ni-results__group { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--nib-line); }

.ni-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.ni-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--nib-dark-3);
  border: 1.5px solid var(--nib-line);
  border-radius: var(--nib-radius);
  padding: 16px;
  text-align: left;
  transition: border-color .2s ease, transform .2s ease;
}
.ni-card:hover { border-color: rgba(254,190,20,.55); transform: translateY(-2px); }
.ni-card__top { display: flex; gap: 14px; align-items: flex-start; }
.ni-card__img {
  width: 74px; height: 74px; flex: none;
  object-fit: contain; background: #fff; border-radius: 10px; padding: 5px;
}
.ni-card__img--empty { display: grid; place-items: center; background: #000; color: var(--nib-grey); font-size: 11px; }
.ni-card__name { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.ni-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 7px; }
.ni-card__price { font-size: 16px; font-weight: 700; color: var(--nib-yellow); }
.ni-badge {
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px;
}
.ni-badge--in { background: rgba(35,164,85,.16); color: #5ad48b; }
.ni-badge--out { background: rgba(255,255,255,.08); color: var(--nib-grey); }
.ni-card__excerpt { font-size: 13px; color: var(--nib-grey); line-height: 1.55; }
.ni-card__foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; }
.ni-card__pick {
  flex: 1;
  background: var(--nib-green); color: #fff;
  border-radius: 999px; padding: 11px 18px;
  font-size: 14px; font-weight: 600;
  transition: background .2s ease;
}
.ni-card__pick:hover { background: var(--green-deep, #1b8443); }
.ni-card__link { font-size: 13px; color: var(--nib-grey); text-decoration: underline; }
.ni-card__link:hover { color: var(--nib-yellow); }

/* Advieskaart */
.ni-advice {
  margin-top: 20px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: rgba(254,190,20,.07);
  border: 1px dashed rgba(254,190,20,.4);
  border-radius: var(--nib-radius); padding: 18px 20px;
}
.ni-advice__txt strong { display: block; font-size: 15px; margin-bottom: 3px; }
.ni-advice__txt span { font-size: 13.5px; color: var(--nib-grey); }

/* Meldingen */
.ni-alert { border-radius: var(--nib-radius); padding: 16px 18px; font-size: 14.5px; }
.ni-alert--warn { background: rgba(254,190,20,.1); border: 1px solid rgba(254,190,20,.35); margin-bottom: 22px; }
.ni-alert--error { background: rgba(224,86,77,.12); border: 1px solid rgba(224,86,77,.45); color: #ffb3ad; margin-top: 16px; }
.ni-alert--empty { background: var(--nib-dark-3); border: 1px solid var(--nib-line); text-align: center; padding: 30px 22px; }
.ni-alert--empty strong { display: block; font-size: 17px; margin-bottom: 6px; color: #fff; }
.ni-alert--empty p { color: var(--nib-grey); max-width: 46ch; margin: 0 auto; }

.ni-note { margin-top: 20px; font-size: 12.5px; color: var(--nib-grey); }
.ni-note--pay {
  margin-top: 22px; font-size: 13.5px; color: #fff;
  background: rgba(254,190,20,.09);
  border-left: 3px solid var(--nib-yellow);
  border-radius: 0 10px 10px 0;
  padding: 11px 15px;
}
.ni-note--pay + .ni-note { margin-top: 12px; }
.ni-booking__noscript { margin-top: 16px; font-size: 14px; color: var(--nib-grey); }
.ni-booking__noscript a { color: var(--nib-yellow); text-decoration: underline; }

/* ---------- Afrekenen bij navicenter ---------- */
.ni-pay { margin-top: 24px; }
.ni-pay[hidden] { display: none; }

.ni-pay__box {
  background: rgba(254,190,20,.08);
  border: 1px solid rgba(254,190,20,.4);
  border-radius: var(--nib-radius);
  padding: 20px 22px;
  text-align: left;
}
.ni-pay__box--soft {
  background: var(--nib-dark-3);
  border: 1px dashed var(--nib-line);
}
.ni-pay__box--cta {
  background: rgba(35,164,85,.1);
  border-color: rgba(35,164,85,.45);
  max-width: 520px; margin: 26px auto 0;
}
.ni-pay__box.has-error { border-color: #e0564d; background: rgba(224,86,77,.1); }

.ni-pay__title { font-size: 16.5px; font-weight: 700; margin: 0 0 8px; color: #fff; }
.ni-pay__text { font-size: 14px; color: var(--nib-grey); line-height: 1.6; margin: 0; }

.ni-pay__product {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
  margin: 16px 0 0; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 14.5px; font-weight: 600; color: #fff;
}
.ni-pay__price { color: var(--nib-yellow); font-size: 16px; font-weight: 700; margin-left: auto; }

.ni-pay__deposit {
  margin: 14px 0 0; font-size: 13px; line-height: 1.55;
  color: var(--nib-grey);
  background: rgba(255,255,255,.04);
  border-radius: 10px; padding: 11px 14px;
}

.ni-pay__check {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px; font-size: 14px; font-weight: 500; color: #fff;
  cursor: pointer;
}
.ni-pay__check input {
  flex: none; width: 19px; height: 19px; margin-top: 1px;
  accent-color: var(--nib-green); cursor: pointer;
}

.ni-pay__btn { display: inline-block; margin-top: 16px; }

/* ---------- Formulier ---------- */
.ni-form__grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.ni-field--wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .ni-form__grid { grid-template-columns: 1fr; } }

.ni-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.ni-privacy { font-size: 12.5px; color: var(--nib-grey); max-width: 40ch; }
.ni-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button[data-ni-submit].is-busy { opacity: .6; pointer-events: none; }

/* ---------- Bevestiging ---------- */
.ni-done { text-align: center; padding: 24px 0; }
.ni-done__icon {
  display: grid; place-items: center; width: 62px; height: 62px;
  margin: 0 auto 18px; border-radius: 50%;
  background: rgba(35,164,85,.16); color: #5ad48b;
}
.ni-done h3 { font-size: clamp(21px, 2.6vw, 28px); margin-bottom: 10px; }
.ni-done > p { color: var(--nib-grey); max-width: 48ch; margin: 0 auto; }
.ni-done__summary {
  margin: 26px auto 24px; max-width: 430px; text-align: left;
  background: var(--nib-dark-3); border: 1px solid var(--nib-line);
  border-radius: var(--nib-radius); padding: 18px 20px; font-size: 14px;
}
.ni-done__summary div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.ni-done__summary div + div { border-top: 1px solid var(--nib-line); }
.ni-done__summary span:first-child { color: var(--nib-grey); }
.ni-done__summary span:last-child { font-weight: 600; text-align: right; }

/* Laadstatus */
.ni-loading { display: flex; align-items: center; gap: 12px; color: var(--nib-grey); padding: 26px 0; font-size: 14.5px; }
.ni-loading::before {
  content: ""; width: 18px; height: 18px; flex: none;
  border: 2px solid var(--nib-line); border-top-color: var(--nib-yellow);
  border-radius: 50%; animation: ni-spin .7s linear infinite;
}
@keyframes ni-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ni-loading::before { animation: none; } }
