/* Systeemthema: donker als voorkeur */
:root {
  color-scheme: light dark;
  --brand: #0b5fff;
  --bg: #0e0f12;
  --fg: #f5f7fa;
  --muted: #DA33BF;
  --surface: #DA33BF;
  --border: #1e2230;
  --link: #4ea1ff;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --fg: #12141a;
//    --muted: #5b6573; old surface #f3f5f8

    --muted: #DA33BF;

    --surface: #DA33BF;

    --border: #d9dee6;
    --link: #0b5fff;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--fg);
}

.app-header {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border);
}
h1 { margin: 0; }
#installBtn {
  background: var(--brand); color: white; border: 0; padding: 0.45rem 0.8rem;
  border-radius: 8px; font-weight: 600; cursor: pointer;
}

main { min-height: calc(100% - 56px); display: flex; flex-direction: column; gap: 0.5rem; }
#map { height: 46vh; min-height: 280px; }

/* Status + help */
#statusArea { padding: 0 1rem; color: var(--muted); }
.help { padding: 0 1rem 1rem; color: var(--muted); }

/* iOS install hint */
.install-hint {
  margin: 0 1rem; padding: 0.6rem 0.8rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--fg);
}

/* Lijstweergave */
#listSection { padding: 0 1rem 1rem; }
#listSection h2 { font-size: 1rem; margin: 0.4rem 0 0.6rem; color: var(--fg); }
.stop-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: white;}
.stop-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.stop-meta { display: flex; flex-direction: column; }
.stop-name { font-weight: 650; }
.stop-actions { display: flex; gap: 6px; }
.stop-actions button, .stop-actions a {
  appearance: none; border: 0; border-radius: 10px; padding: 6px 10px;
  font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-zoom { background: var(--border); color: var(--fg); }
.btn-open { background: var(--brand); color: white; }
.leaflet-popup-content a { color: white; font-weight: 600; }
.leaflet-popup-content-wrapper {background-color: #DA33BF; color: #FFF5EE;}
.leaflet-popup-content p {color: white;}