/* ============================================================
   Nautische Nomade — Reserveren (modal + plattegrond + slot)
   Donker thema, aansluitend op het kaartpaneel.
   ============================================================ */

/* ---- Slot in de detailkaart ---- */

.nn-res-slot { margin-top: 10px; }
.nn-res-slot .nn-btn { margin-top: 0; }

/* Websitelink onder de reserveerknop: gedempte variant */
.nn-btn--stil {
  background: transparent;
  border: 1px solid rgba(239, 230, 214, 0.22);
  color: rgba(239, 230, 214, 0.85);
}
.nn-btn--stil:hover {
  background: transparent;
  border-color: var(--terracotta-400);
  color: var(--terracotta-400);
}

.nn-res-btn {
  background: var(--olive-500);
  gap: 9px;
}
.nn-res-btn:hover { background: var(--olive-600); }
.nn-res-btn svg { flex: none; }

.nn-res-card {
  border: 1px solid rgba(194, 90, 61, 0.45);
  background: rgba(194, 90, 61, 0.12);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.nn-res-card__info { display: flex; flex-direction: column; gap: 2px; }
.nn-res-card__info small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239, 230, 214, 0.55);
}
.nn-res-card__info strong {
  font-family: var(--font-display);
  font-size: 17px;
  color: #F7F1E5;
  letter-spacing: -0.02em;
}
.nn-res-card__info span { font-size: 12.5px; color: rgba(239, 230, 214, 0.75); }

.nn-res-card__acties { display: flex; gap: 8px; margin-top: 10px; }
.nn-res-card__btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(239, 230, 214, 0.22);
  background: transparent;
  color: #F4EEE2;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.nn-res-card__btn:hover { border-color: var(--terracotta-400); color: var(--terracotta-400); }
.nn-res-card__btn.is-stil { flex: 0 0 auto; color: rgba(239, 230, 214, 0.55); }
.nn-res-card__btn.is-stil:hover { border-color: rgba(239, 230, 214, 0.4); color: #F4EEE2; }

/* ---- Modal ---- */

.nn-res {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 20px;
  color-scheme: dark; /* native date/number-controls in donker */
}
.nn-res[hidden] { display: none; }
body.nn-res-open { overflow: hidden; }

.nn-res__scrim {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 7, 0.62);
  backdrop-filter: blur(6px);
  animation: nn-res-fade 0.25s var(--ease-out);
}
@keyframes nn-res-fade { from { opacity: 0; } }

.nn-res__dialog {
  position: relative;
  width: min(480px, 100%);
  max-height: min(86svh, 780px);
  display: flex;
  flex-direction: column;
  background: #211C15;
  border: 1px solid rgba(239, 230, 214, 0.14);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.65);
  animation: nn-res-in 0.32s var(--ease-out);
}
@keyframes nn-res-in {
  from { transform: translateY(22px) scale(0.985); opacity: 0; }
}

.nn-res__close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(239, 230, 214, 0.2);
  background: rgba(20, 17, 12, 0.7);
  color: #F4EEE2;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nn-res__close:hover { border-color: var(--terracotta-400); color: var(--terracotta-400); }

.nn-res__head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(239, 230, 214, 0.1);
}
.nn-res__head .nn-kicker { color: rgba(239, 230, 214, 0.75); font-size: 10.5px; }
.nn-res__head h2 {
  margin-top: 6px;
  color: #F7F1E5;
  font-size: var(--step-1);
  padding-right: 36px;
}

.nn-res__steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.nn-res__stap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(239, 230, 214, 0.42);
}
.nn-res__stap i {
  font-style: normal;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  border: 1px solid rgba(239, 230, 214, 0.28);
}
.nn-res__stap.is-actief { color: #F7F1E5; }
.nn-res__stap.is-actief i {
  background: var(--terracotta-500);
  border-color: var(--terracotta-500);
  color: #FBF3EC;
}
.nn-res__stap.is-klaar { color: var(--olive-300); }
.nn-res__stap.is-klaar i {
  background: rgba(94, 100, 67, 0.5);
  border-color: transparent;
  color: #E4E5D2;
}
.nn-res__stapstreep {
  flex: 1;
  height: 1px;
  background: rgba(239, 230, 214, 0.14);
}

.nn-res__body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 230, 214, 0.16) transparent;
}
.nn-res__body > * { animation: nn-res-fade 0.3s var(--ease-out); }
.nn-res__body .nn-btn { margin-top: 14px; }

/* ---- Stap 1: verblijf ---- */

.nn-res__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nn-res__veld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nn-res__veld > span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239, 230, 214, 0.55);
}
.nn-res__veld input {
  width: 100%;
  min-width: 0; /* mag krimpen binnen de gridkolom (datumvelden hebben anders een brede intrinsieke breedte) */
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(239, 230, 214, 0.2);
  background: rgba(239, 230, 214, 0.05);
  color: #F4EEE2;
  font: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}
/* iOS: datumwaarde links uitlijnen en hoogte gelijk aan de tekstvelden */
.nn-res__veld input[type="date"] {
  min-height: 41px;
  text-align: left;
}
.nn-res__veld input::-webkit-date-and-time-value { text-align: left; }
.nn-res__veld input:focus-visible {
  outline: 2px solid var(--terracotta-500);
  outline-offset: 0;
  border-color: transparent;
}

.nn-res__stepper {
  display: flex;
  align-items: center;
  border: 1px solid rgba(239, 230, 214, 0.2);
  border-radius: var(--r-sm);
  background: rgba(239, 230, 214, 0.05);
  overflow: hidden;
}
.nn-res__stepper button {
  width: 40px;
  align-self: stretch;
  border: none;
  background: transparent;
  color: #F4EEE2;
  font-size: 17px;
  cursor: pointer;
}
.nn-res__stepper button:hover { background: rgba(239, 230, 214, 0.08); }
.nn-res__stepper b {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: #F7F1E5;
}

.nn-res__avail {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: rgba(94, 100, 67, 0.22);
  border: 1px solid rgba(154, 160, 127, 0.3);
  font-size: 13px;
  color: rgba(239, 230, 214, 0.85);
}
.nn-res__avail svg { flex: none; color: var(--olive-300); margin-top: 2px; }
.nn-res__avail strong { color: #F7F1E5; }
.nn-res__avail em { color: var(--terracotta-200); font-style: normal; }

/* ---- Stap 2: betaling ---- */

.nn-res__overzicht {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(239, 230, 214, 0.12);
  border-radius: var(--r-md);
  overflow: hidden;
}
.nn-res__overzicht div {
  display: flex;
  flex-wrap: wrap; /* lange prijsregels breken netjes op smalle schermen */
  justify-content: space-between;
  align-items: baseline;
  gap: 2px 14px;
  padding: 9px 13px;
  font-size: 13px;
  color: rgba(239, 230, 214, 0.88);
}
.nn-res__overzicht div + div { border-top: 1px solid rgba(239, 230, 214, 0.08); }
.nn-res__overzicht small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(239, 230, 214, 0.5);
}
.nn-res__overzicht .is-totaal {
  background: rgba(239, 230, 214, 0.06);
  font-weight: 700;
  color: #F7F1E5;
  font-size: 14.5px;
}
.nn-res__overzicht--na { margin-top: 16px; }

.nn-res__betaal {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.nn-res__optie {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px 12px 42px;
  border: 1px solid rgba(239, 230, 214, 0.16);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.nn-res__optie:hover { border-color: rgba(239, 230, 214, 0.35); }
.nn-res__optie.is-actief {
  border-color: var(--terracotta-500);
  background: rgba(194, 90, 61, 0.12);
}
.nn-res__optie input {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  accent-color: var(--terracotta-500);
}
.nn-res__optie strong { font-size: 14px; color: #F7F1E5; }
.nn-res__optie span { font-size: 12px; color: rgba(239, 230, 214, 0.6); }

.nn-res__terug {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 9px;
  border: none;
  background: none;
  color: rgba(239, 230, 214, 0.6);
  font-size: 12.5px;
  cursor: pointer;
}
.nn-res__terug:hover { color: var(--terracotta-400); }

/* ---- Stap 3: verwerken + resultaat ---- */

.nn-res__wachten {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 46px 0 40px;
}
.nn-res__wachten p {
  font-size: 13.5px;
  color: rgba(239, 230, 214, 0.8);
  font-family: var(--font-mono);
}
.nn-res__spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(239, 230, 214, 0.15);
  border-top-color: var(--terracotta-500);
  animation: nn-res-spin 0.85s linear infinite;
}
@keyframes nn-res-spin { to { transform: rotate(360deg); } }

.nn-res__done {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nn-res__vink {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(94, 100, 67, 0.55);
  border: 1px solid var(--olive-300);
  color: #E4E5D2;
  font-size: 16px;
}
.nn-res__done strong { display: block; color: #F7F1E5; font-size: 15px; }
.nn-res__done small {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(239, 230, 214, 0.55);
}

.nn-res__toewijzing {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: radial-gradient(120% 160% at 15% -20%, rgba(210, 122, 94, 0.35), rgba(143, 58, 36, 0.2));
  border: 1px solid rgba(194, 90, 61, 0.55);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
}
.nn-res__toewijzing small {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(239, 230, 214, 0.6);
  margin-bottom: 3px;
}
.nn-res__toewijzing strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #F7F1E5;
}
.nn-res__toewijzing span { font-size: 12.5px; color: rgba(239, 230, 214, 0.78); }

/* ---- Plattegrond ---- */

.nn-resmap {
  display: block;
  width: 100%;
  margin-top: 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(239, 230, 214, 0.14);
}
.nn-resmap__kade, .nn-resmap__invaart, .nn-resmap__letter, .nn-resmap__label {
  font-family: var(--font-mono);
  fill: rgba(239, 230, 214, 0.55);
}
.nn-resmap__kade { font-size: 4.6px; letter-spacing: 0.18em; }
.nn-resmap__invaart { font-size: 4.6px; letter-spacing: 0.1em; fill: rgba(239, 230, 214, 0.4); }
.nn-resmap__letter { font-size: 5px; fill: #F4EEE2; }
.nn-resmap__label { font-size: 5.4px; font-weight: 700; fill: #F7F1E5; }

.nn-resmap__box rect { transition: opacity var(--dur-fast); }
.nn-resmap__box.is-vrij rect {
  fill: rgba(94, 100, 67, 0.32);
  stroke: rgba(154, 160, 127, 0.75);
  stroke-width: 0.35;
  stroke-dasharray: 1.1 0.8;
}
.nn-resmap__box.is-bezet rect {
  fill: rgba(239, 230, 214, 0.13);
  stroke: rgba(239, 230, 214, 0.1);
  stroke-width: 0.3;
}
.nn-resmap__box.is-jouw rect:first-of-type {
  fill: var(--terracotta-500);
  stroke: var(--terracotta-200);
  stroke-width: 0.5;
}
.nn-resmap__boot { fill: #FBF7EE; opacity: 0.95; }
.nn-resmap__pulse {
  fill: none;
  stroke: var(--terracotta-400);
  stroke-width: 0.7;
  animation: nn-res-puls 1.9s var(--ease-in-out) infinite;
}
@keyframes nn-res-puls {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.15; }
}
@media (prefers-reduced-motion: reduce) {
  .nn-resmap__pulse { animation: none; }
}

.nn-res__legenda {
  display: flex;
  gap: 16px;
  margin-top: 9px;
  font-size: 11px;
  color: rgba(239, 230, 214, 0.65);
}
.nn-res__legenda span { display: inline-flex; align-items: center; gap: 6px; }
.nn-res__legenda i {
  width: 12px; height: 8px;
  border-radius: 2px;
}
.nn-res__legenda i.is-vrij {
  background: rgba(94, 100, 67, 0.4);
  border: 1px dashed rgba(154, 160, 127, 0.85);
}
.nn-res__legenda i.is-bezet { background: rgba(239, 230, 214, 0.16); }
.nn-res__legenda i.is-jouw { background: var(--terracotta-500); }

.nn-res__demo {
  margin-top: 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: rgba(239, 230, 214, 0.42);
  text-align: center;
}

/* ---- Mobiel ---- */

@media (max-width: 640px) {
  .nn-res { padding: 0; align-items: end; }
  .nn-res__dialog {
    width: 100%;
    max-height: 94svh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-bottom: none;
    animation: nn-res-in-mobiel 0.34s var(--ease-out);
  }
  @keyframes nn-res-in-mobiel {
    from { transform: translateY(48px); opacity: 0.4; }
  }
  .nn-res__head { padding: 18px 16px 13px; }
  .nn-res__body { padding: 16px 16px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .nn-res__form { grid-template-columns: 1fr 1fr; gap: 10px; }
  /* 16px voorkomt dat iOS inzoomt op het veld (en zo de layout breekt) */
  .nn-res__veld input { font-size: 16px; }
  .nn-res__stepper b { font-size: 16px; }
}

/* Heel smalle schermen: velden onder elkaar, dan kan er niets overlappen */
@media (max-width: 360px) {
  .nn-res__form { grid-template-columns: 1fr; }
}
