/* ==========================================================================
   Scooter Speurtocht — stijl
   Wit, strak en app-achtig. Donkerblauw #0b153a, roze #f54384.
   ========================================================================== */

:root {
  --navy: #0b153a;
  --navy-zacht: #1b2b5c;
  --pink: #f54384;
  --pink-donker: #d92f6c;
  --pink-licht: #fff0f5;
  --wit: #ffffff;
  --grijs-50: #f7f8fc;
  --grijs-100: #eef0f7;
  --grijs-200: #e0e4ef;
  --tekst: #0b153a;
  --tekst-zacht: #616c8c;

  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;

  --schaduw-s: 0 1px 2px rgba(11, 21, 58, 0.06), 0 2px 8px rgba(11, 21, 58, 0.06);
  --schaduw-m: 0 4px 16px rgba(11, 21, 58, 0.1);
  --schaduw-l: 0 -8px 40px rgba(11, 21, 58, 0.18);

  --top: env(safe-area-inset-top, 0px);
  --bodem: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--wit);
  color: var(--tekst);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

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

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding-top: var(--top);
  /* Op een groot scherm blijft het een telefoon-app, netjes in het midden. */
  max-width: 540px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px 6px;
}

/* De logo-PNG heeft een net-niet-witte achtergrond (#fcfcfc). Op een witte
   ondergrond laat multiply die volledig wegvallen, zonder de kleuren aan te
   tasten. */
.topbar .logo,
.modal__logo,
.kop img {
  mix-blend-mode: multiply;
}

.topbar .logo {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
}

.voortgang {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 2px 20px 12px;
}

.voortgang__tekst {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tekst-zacht);
}

.voortgang__stippen {
  display: flex;
  gap: 7px;
}

.stip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grijs-200);
  transition: background 0.25s, transform 0.25s;
}

.stip--gevonden {
  background: var(--pink);
}

.stip--actief {
  background: var(--navy);
  transform: scale(1.35);
}

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

.acties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 12px;
}

.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-m);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--wit);
  cursor: pointer;
  box-shadow: var(--schaduw-s);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.knop:active {
  transform: scale(0.97);
}

.knop:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.knop--roze {
  background: var(--pink);
}
.knop--roze:hover {
  background: var(--pink-donker);
}

.knop--navy {
  background: var(--navy);
}
.knop--navy:hover {
  background: var(--navy-zacht);
}

.knop--vol {
  width: 100%;
}

.knop--stil {
  background: var(--grijs-100);
  color: var(--navy);
  box-shadow: none;
}
.knop--stil:hover {
  background: var(--grijs-200);
}

.knop:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ------------------------------------------------------------------ kaart - */

.kaart-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 12px calc(12px + var(--bodem));
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--grijs-50);
  box-shadow: var(--schaduw-m);
}

#kaart {
  position: absolute;
  inset: 0;
}

.leaflet-container {
  font-family: inherit;
  background: var(--grijs-50);
}

.leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--tekst-zacht);
}

.leaflet-control-attribution a {
  color: var(--tekst-zacht);
}

.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: var(--schaduw-s) !important;
  border-radius: var(--r-s) !important;
  overflow: hidden;
  margin: 0 12px 26px 0 !important;
}

.leaflet-control-zoom a {
  color: var(--navy) !important;
  border-color: var(--grijs-100) !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--r-s);
  box-shadow: var(--schaduw-m);
}

.leaflet-popup-content {
  margin: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
}

/* Leaflet geeft een divIcon standaard een witte achtergrond met randje. */
.scooter-marker {
  background: none;
  border: 0;
  filter: drop-shadow(0 3px 6px rgba(11, 21, 58, 0.35));
}

.scooter-marker__img {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: 50% 50%;
  will-change: transform;
}

.pin-icon {
  filter: drop-shadow(0 4px 6px rgba(11, 21, 58, 0.28));
}

.pin-pop {
  animation: pin-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes pin-in {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.6);
  }
}

.nauwkeurigheid {
  stroke: var(--pink);
  stroke-width: 1.5;
  stroke-opacity: 0.5;
  fill: var(--pink);
  fill-opacity: 0.1;
}

/* status-pil over de kaart */
.status-pil {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 96px);
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: var(--schaduw-m);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pil .icon {
  color: var(--tekst-zacht);
}

.status-pil--dichtbij {
  background: var(--pink);
  color: var(--wit);
  animation: puls 1.6s ease-in-out infinite;
}

.status-pil--dichtbij .icon {
  color: var(--wit);
}

@keyframes puls {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 67, 132, 0.45);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(245, 67, 132, 0);
  }
}

.fab {
  position: absolute;
  right: 12px;
  bottom: 92px;
  z-index: 500;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--wit);
  color: var(--navy);
  box-shadow: var(--schaduw-m);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: opacity 0.2s, transform 0.2s;
}

.fab .icon {
  width: 22px;
  height: 22px;
}

.fab.zichtbaar {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* ----------------------------------------------------------------- modals - */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(11, 21, 58, 0.45);
  backdrop-filter: blur(3px);
  animation: fade-in 0.22s ease both;
}

.overlay[hidden] {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--wit);
  border-radius: var(--r-l) var(--r-l) 0 0;
  box-shadow: var(--schaduw-l);
  animation: omhoog 0.32s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  overflow: hidden;
}

@keyframes omhoog {
  from {
    transform: translateY(100%);
  }
}

@media (min-width: 560px) and (min-height: 620px) {
  .overlay {
    align-items: center;
    padding: 24px;
  }
  .modal {
    border-radius: var(--r-l);
  }
  @keyframes omhoog {
    from {
      transform: translateY(24px);
      opacity: 0;
    }
  }
}

.modal__greep {
  flex: none;
  width: 40px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: var(--grijs-200);
}

.modal__sluit {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--grijs-100);
  color: var(--navy);
  cursor: pointer;
}

.modal__sluit:hover {
  background: var(--grijs-200);
}

.modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 22px 6px;
  text-align: center;
}

.modal__voet {
  flex: none;
  padding: 14px 22px calc(18px + var(--bodem));
  background: var(--wit);
  border-top: 1px solid var(--grijs-100);
  display: grid;
  gap: 10px;
}

.modal h1 {
  margin: 0 0 6px;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.modal h2 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.modal p {
  margin: 0 0 12px;
  color: var(--tekst-zacht);
}

.modal p:last-child {
  margin-bottom: 0;
}

.modal__logo {
  width: 100%;
  max-width: 260px;
  margin: 0 auto 14px;
  display: block;
}

/* rond icoon-badge boven de titel */
.badge {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: var(--pink-licht);
  color: var(--pink);
}

.badge .icon {
  width: 30px;
  height: 30px;
}

.badge--navy {
  background: var(--grijs-100);
  color: var(--navy);
}

.oogmerk {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--grijs-100);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tekst-zacht);
}

/* hint-tekst in een rustig kaartje */
.hintkaart {
  margin: 6px 0 4px;
  padding: 18px;
  border-radius: var(--r-m);
  background: var(--grijs-50);
  border: 1px solid var(--grijs-100);
  font-size: 17px;
  line-height: 1.55;
  color: var(--navy);
  white-space: pre-wrap;
}

/* verhaal onder een vondst */
.verhaal {
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
  color: var(--tekst-zacht);
  white-space: pre-wrap;
}

/* cadeau / opdracht */
.cadeau {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  margin: 18px 0 4px;
  padding: 16px;
  border-radius: var(--r-m);
  background: var(--pink-licht);
  border: 1px solid #ffd6e5;
}

.cadeau__icoon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--wit);
}

.cadeau__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink-donker);
}

.cadeau__titel {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}

.cadeau__tekst {
  margin: 4px 0 0;
  font-size: 14.5px;
  color: var(--tekst-zacht);
}

/* fotoraster */
.fotos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 16px 0 4px;
}

.fotos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-s);
  background: var(--grijs-100);
  cursor: zoom-in;
  display: block;
}

.fotos--een {
  grid-template-columns: 1fr;
}

.foto-leeg {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 26px 16px;
  border: 2px dashed var(--grijs-200);
  border-radius: var(--r-m);
  color: var(--tekst-zacht);
  font-size: 13.5px;
  text-align: center;
}

.foto-leeg code {
  font-size: 12px;
  background: var(--grijs-50);
  padding: 2px 6px;
  border-radius: 6px;
}

/* volledige foto bekijken */
.fotoviewer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(11, 21, 58, 0.92);
  cursor: zoom-out;
  animation: fade-in 0.2s ease both;
}

.fotoviewer[hidden] {
  display: none;
}

.fotoviewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--r-s);
}

/* ---------------------------------------------------------------- scanner - */

.scanner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 4px 0 14px;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--navy);
}

.scanner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scanner__kader {
  position: absolute;
  inset: 14%;
  border-radius: 18px;
  box-shadow: 0 0 0 100vmax rgba(11, 21, 58, 0.42);
}

.scanner__kader::before,
.scanner__kader::after,
.scanner__hoek::before,
.scanner__hoek::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border: 4px solid var(--pink);
}

.scanner__kader::before {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 16px 0 0 0;
}
.scanner__kader::after {
  top: -2px;
  right: -2px;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 16px 0 0;
}
.scanner__hoek::before {
  bottom: -2px;
  left: -2px;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 16px;
}
.scanner__hoek::after {
  bottom: -2px;
  right: -2px;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 16px 0;
}

.scanner__hoek {
  position: absolute;
  inset: 14%;
}

.scanner[hidden] {
  display: none;
}

.melding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--r-s);
  font-size: 14.5px;
  font-weight: 600;
}

.melding--fout {
  background: #fff1f3;
  color: #b3204a;
}

.melding--info {
  background: var(--grijs-50);
  color: var(--tekst-zacht);
}

.melding[hidden] {
  display: none;
}

.wisselknop {
  margin-top: 4px;
  background: none;
  border: 0;
  padding: 6px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tekst-zacht);
  text-decoration: underline;
  cursor: pointer;
}

.codeveld {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.codeveld input {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  border: 1.5px solid var(--grijs-200);
  border-radius: var(--r-s);
  font: inherit;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--wit);
}

.codeveld input:focus {
  outline: none;
  border-color: var(--pink);
}

.codeveld button {
  flex: none;
  min-height: 0;
  padding: 0 18px;
}

/* --------------------------------------------------------------- diversen - */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
