* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; color: #111; background:#fafafa; }
a { color: #0a58ca; text-decoration: none; }
.site-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:#004aad; color:#fff; }
.logo-wrap { display:flex; align-items:center; gap:10px; }
.logo { width:32px; height:32px; }
.top-nav a { color:#fff; margin-left:14px; font-weight:600; }
.layout { display:flex; min-height: calc(100vh - 120px); }
.sidebar { width:320px; background:#f2f4f8; padding:16px; border-right:1px solid #e5e7eb; }
.content { flex:1; padding:16px 20px; }
.site-footer { text-align:center; padding:12px; background:#eef2ff; color:#333; }

.map { position: relative; width:100%; height: 520px; border:1px solid #ddd; border-radius:12px; overflow:hidden; }
.map-control { position:absolute; top:10px; right:10px; z-index:1000; background:#fff; border:1px solid #cbd5e1; border-radius:8px; padding:6px 10px; cursor:pointer; box-shadow:0 1px 2px rgba(0,0,0,.08); }

.event-list { margin-top:16px; display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap:12px; }
.event { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:10px 12px; }
.event h3 { margin:0 0 6px; font-size:16px; }
.muted { color:#666; font-size:12px; }

/* ... dina befintliga deklarationer överst ... */

/* Tight list */
.event-list {
  margin-top: 8px;
  display: block;          /* en kolumn = tight */
}
.event-row {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 6px 0;
  cursor: pointer;
  display: block;
}
.event-row:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.event-row.active {
  background: #eef2ff;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15) inset;
}
.event-heading {
  font-size: 14px;
  line-height: 1.25;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Kartkontroll för "Min position" – redan tillagd i v5, sparas här för tydlighet */
.map { position: relative; width:100%; height: 520px; border:1px solid #ddd; border-radius:12px; overflow:hidden; }
.map-control { position:absolute; top:10px; right:10px; z-index:1000; background:#fff; border:1px solid #cbd5e1; border-radius:8px; padding:6px 10px; cursor:pointer; box-shadow:0 1px 2px rgba(0,0,0,.08); }


.search-form { display:flex; flex-direction:column; gap:8px; }
.search-form .row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.search-form input, .search-form select, .search-form button { padding:8px; font-size:14px; }
.search-form .btn-row { display:flex; gap:8px; margin-top:6px; flex-wrap:wrap; }
.search-form button { background:#004aad; color:#fff; border:0; border-radius:8px; cursor:pointer; }
.btn-more { background:#e2e8f0; border:1px solid #cbd5e1; padding:10px 14px; border-radius:10px; cursor:pointer; }

.legend { margin-top:18px; }
.legend .dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; }
.dot-police { background:#1d4ed8; }
.dot-traffic { background:#dc2626; }
.dot-rescue { background:#16a34a; }

/* Autocomplete-lista */
.suggest-list {
  position: relative;
  margin-top: 2px;
}
.suggest-list .suggest-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: 0;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Autocomplete-lista */
.suggest-list { position: relative; margin-top: 2px; }
.suggest-list .suggest-item {
  background:#fff; border:1px solid #e5e7eb; border-top:0;
  padding:6px 8px; cursor:pointer; font-size:14px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.suggest-list .suggest-item:first-child { border-top:1px solid #e5e7eb; border-radius:8px 8px 0 0; }
.suggest-list .suggest-item:last-child  { border-radius:0 0 8px 8px; }
.suggest-list .suggest-item:hover,
.suggest-list .suggest-item.active { background:#eef2ff; }

/* Valda platser (chips) */
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 10px; }
.chip {
  display:inline-flex; align-items:center; gap:6px;
  background:#eef2ff; color:#1e3a8a; border:1px solid #c7d2fe;
  border-radius:999px; padding:4px 8px; font-size:13px;
}
.chip .chip-x {
  appearance:none; border:0; background:#dbeafe; color:#1e3a8a; cursor:pointer;
  width:18px; height:18px; line-height:18px; border-radius:50%;
}
.chip .chip-x:hover { background:#bfdbfe; }
/* layout för checkboxarna med prickar */
.checks.sources label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 14px;
  user-select: none;
  cursor: pointer;
}
.checks.sources input {
  margin: 0;
}

/* prickar (samma färger som på kartan) */
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; }
.dot-police { background:#1d4ed8; }     /* blå */
.dot-traffic { background:#dc2626; }    /* röd */
.dot-rescue { background:#16a34a; }     /* grön */

/* valfritt: tajta till legendlistan */
.legend ul { list-style: none; padding-left: 0; margin: 6px 0 0; }
.legend li { display: flex; align-items: center; gap: 8px; margin: 4px 0; }

/* Lista: kompakt rad med liten färgprick */
#event-list .event-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}
#event-list .event-row:hover { background: #f8fafc; }

#event-list .event-heading {
  flex: 1;
  font-size: 14px;
  line-height: 1.3;
}

.list-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;      /* fin alignment mot text */
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15); /* tunn kant för kontrast */
}


@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width:100%; border-right:0; border-bottom:1px solid #e5e7eb; }
}
