/* AR Hunt — beheerkaart
   Intern gereedschap. Sober, maar in dezelfde stijl als de rest: SF Pro,
   accent in oranje en teal, hiërarchie via schaduw en ruimte in plaats van randen. */

:root {
  --paper: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-faint: #a1a1a6;
  --hairline: rgba(0, 0, 0, 0.08);

  --accent: #ff9500;
  --accent-dark: #e07f00;
  --teal: #14a08c;
  --danger: #d7373f;
  --ok: #2b9348;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.18);

  --radius: 12px;
  --radius-sm: 8px;

  --topbar-h: 56px;
  --panel-w: 380px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 900;
}

.topbar__title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.topbar__title h1 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__count {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ layout */

.layout {
  display: flex;
  height: calc(100% - var(--topbar-h));
}

.mapwrap {
  flex: 1;
  min-width: 0;
  position: relative;
}

.map {
  width: 100%;
  height: 100%;
  background: var(--paper);
}

/* Tijdens het plaatsen krijgt de kaart een kruisdraad, zodat meteen duidelijk
   is dat er iets anders van je verwacht wordt dan gewoon rondkijken. */
.map--plaatsen,
.map--plaatsen .leaflet-grab,
.map--plaatsen .leaflet-interactive {
  cursor: crosshair;
}

.plaatshint {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #ffffff;
  font-size: 14px;
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}

.plaatshint--hidden { display: none; }

.plaatshint .material-symbols-rounded {
  font-size: 20px;
  color: var(--accent);
}

.plaatshint__knop {
  font-family: inherit;
  font-size: 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}

.plaatshint__knop:hover { background: rgba(255, 255, 255, 0.3); }

.panel {
  width: var(--panel-w);
  flex-shrink: 0;
  background: var(--card);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  padding: 20px;
  z-index: 800;
}

.panel__view--hidden { display: none; }

.panel__heading {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.panel__formhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel__formhead .panel__heading { margin-bottom: 0; }

.panel__formhead .btn { flex-shrink: 0; }

/* Elke zin op een eigen regel — leest sneller dan een lopende alinea. */
.hint {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.hint p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
}

/* -------------------------------------------------------------- pinoverzicht */

.pinlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pinlist__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  cursor: pointer;
  border-top: 1px solid var(--hairline);
}

.pinlist__item:hover { background: rgba(0, 0, 0, 0.02); }

.pinlist__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.pinlist__item--inactive .pinlist__dot { background: var(--ink-faint); }
.pinlist__item--inactive .pinlist__name { color: var(--ink-soft); }

.pinlist__body { min-width: 0; flex: 1; }

.pinlist__name {
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinlist__sub {
  display: block;
  font-size: 12px;
  color: var(--ink-faint);
}

.pinlist__points {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  flex-shrink: 0;
}

.pinlist__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
}

.pinlist__edit:hover { background: rgba(0, 0, 0, 0.06); color: var(--ink); }

.pinlist__edit .material-symbols-rounded { font-size: 18px; }

.pinlist__empty {
  padding: 16px 4px;
  color: var(--ink-faint);
  font-size: 13px;
}

/* ---------------------------------------------------------------- formulier */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.field__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}

.field__note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-faint);
  overflow-wrap: anywhere;
}

.field-row {
  display: flex;
  gap: 10px;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 9px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--paper);
  width: 100%;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
textarea:focus {
  outline: none;
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.25);
}

textarea { resize: vertical; }

/* ---------------------------------------------------------------- dropzone */

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease;
}

.dropzone:hover { background: rgba(255, 149, 0, 0.06); }

.dropzone--filled {
  color: var(--ink);
  background: rgba(20, 160, 140, 0.08);
  border-style: solid;
  border-color: rgba(20, 160, 140, 0.35);
}

.dropzone--dragover { background: rgba(255, 149, 0, 0.12); }

.dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone__icon { color: var(--teal); }

.dropzone__text {
  font-size: 13px;
  line-height: 1.3;
}

/* Alleen een gekozen bestandsnaam afkappen; de uitlegtekst mag gewoon
   afbreken, anders verdwijnt de maximale grootte achter de puntjes. */
.dropzone--filled .dropzone__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ switch */

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch input { accent-color: var(--accent); width: 16px; height: 16px; }

.switch__label { font-size: 13px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ knoppen */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn--primary { background: var(--accent); color: #ffffff; }
.btn--primary:hover { background: var(--accent-dark); }

.btn--danger { background: rgba(215, 55, 63, 0.10); color: var(--danger); }
.btn--danger:hover { background: rgba(215, 55, 63, 0.18); }

.btn--ghost { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.btn--ghost:hover { background: rgba(0, 0, 0, 0.09); }

.btn[disabled] { opacity: 0.45; cursor: default; }
.btn--hidden { display: none; }

.btn .material-symbols-rounded { font-size: 18px; }

.iconbtn {
  background: none;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  display: inline-flex;
}

.iconbtn:hover { color: var(--ink); background: rgba(0, 0, 0, 0.05); }

.form__actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* --------------------------------------------------------------- meldingen */

.formerror {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(215, 55, 63, 0.10);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
}

.formerror--hidden { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transition: opacity 0.2s ease;
}

.toast--hidden { opacity: 0; pointer-events: none; }
.toast--error { background: var(--danger); }

/* ----------------------------------------------------------------- modaal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.modal--hidden { display: none; }

.modal__card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* -------------------------------------------------------------- kaartmarkers */

/* Leaflet's standaardmarker is blauw; die vervangen we door een eigen vorm. */
.marker {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  box-shadow: var(--shadow-md);
}

.marker--inactive { background: var(--ink-faint); }

.marker--selected {
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(20, 160, 140, 0.28), var(--shadow-md);
}

.leaflet-container {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* -------------------------------------------------------------- smal scherm */

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .mapwrap { height: 45vh; flex: none; }
  .plaatshint { font-size: 13px; padding: 8px 10px 8px 14px; }
  .panel { width: 100%; flex: 1; }
}

/* ------------------------------------------------------- bezienswaardigheden */

.panel__knoppen { display: flex; gap: 8px; }

.aiwacht {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink-soft);
}
.aiwacht--hidden { display: none; }
.aimaken--hidden { display: none; }

.airij {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}

.airij__kop {
  display: flex;
  align-items: center;
  gap: 8px;
}
.airij__kop input { flex: 1; }

.airij__nummer {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.airij__model {
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

/* Voorlopige marker op de kaart: genummerd, in teal zodat hij zich
   onderscheidt van echte pins. */
.aimarker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  font: 600 12px "SF Pro Text", -apple-system, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

/* ------------------------------------------------------------------ navbar */

.topbar__nav {
  display: flex;
  gap: 4px;
  background: var(--paper);
  border-radius: 999px;
  padding: 4px;
}

.navknop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.navknop:hover { color: var(--ink); }

.navknop--actief {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.navknop .material-symbols-rounded { font-size: 18px; }

/* ------------------------------------------------------------- zoektochten */

.ztrij--actief {
  background: var(--accent-zacht, rgba(255, 149, 0, 0.08));
  border-radius: var(--radius-sm);
}

.ztrij--actief .pinlist__name { color: var(--accent-dark); }

.filterregel {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 149, 0, 0.10);
  color: var(--accent-dark);
  margin-bottom: 12px;
}

.filterregel--hidden { display: none; }

select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 9px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--paper);
  width: 100%;
}

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .topbar__nav { order: 3; width: 100%; justify-content: center; }
}

/* Opslaan-knop op het pinnenscherm */
.bewaartocht {
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
  background: rgba(20, 160, 140, 0.10);
  color: var(--teal);
}
.bewaartocht:hover { background: rgba(20, 160, 140, 0.18); }
.bewaartocht--hidden { display: none; }

/* Onbevestigde AI-posities: oranje marker plus een waarschuwing in de rij. */
.aimarker--twijfel { background: var(--accent); }

.airij__waarschuwing {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 149, 0, 0.12);
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1.35;
}

/* ------------------------------------------------------------ tekstpagina's
   Losse pagina's zoals het privacybeleid: rustige leesbreedte, geen kaart. */

body.tekstpagina {
  height: auto;
  overflow: auto;
  background: var(--paper);
}

.tekstpagina__inhoud {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  background: var(--card);
  min-height: 100vh;
  box-shadow: var(--shadow-sm);
}

.tekstpagina__inhoud h1 {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 28px;
  margin: 0 0 4px;
}

.tekstpagina__inhoud h2 {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 20px;
  margin: 32px 0 8px;
}

.tekstpagina__inhoud h3 {
  font-size: 15px;
  margin: 18px 0 4px;
}

.tekstpagina__inhoud p {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 10px;
  color: var(--ink);
}

.tekstpagina__datum {
  color: var(--ink-soft);
  margin-bottom: 24px;
}


/* ------------------------------------------------------------- spelletjes
   De mini-spelletjes uit de app, hier te bekijken en te testen. */

.spellijst__intro {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  line-height: 1.5;
}

.spellijst {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spelkaart {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.spelkaart:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.spelkaart__icoon {
  font-size: 26px;
  color: var(--accent);
  flex-shrink: 0;
}

.spelkaart__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spelkaart__naam { font-weight: 600; font-size: 14px; }

.spelkaart__uitleg { font-size: 12px; color: var(--ink-soft); }

.spelkaart__speel {
  font-size: 28px;
  color: var(--teal);
  flex-shrink: 0;
}

/* Het speelvenster: telefoonvormig kader midden op het scherm. */
.speloverlay {
  position: fixed;
  inset: 0;
  /* Boven de Leaflet-lagen (die gaan tot z-index 1000). */
  z-index: 2000;
  background: rgba(29, 29, 31, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.speloverlay--hidden { display: none; }

.speloverlay__kader {
  width: min(420px, 100%);
  height: min(860px, 92vh);
  background: #e8dcc0;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.speloverlay__kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card);
  font-weight: 600;
  font-size: 14px;
}

.speloverlay__sluit {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
  display: inline-flex;
  border-radius: 50%;
  padding: 4px;
}

.speloverlay__sluit:hover { background: rgba(0, 0, 0, 0.06); color: var(--ink); }

.speloverlay__frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #e8dcc0;
}
