    body, html {
      margin: 0;
      padding: 0;
      height: 100%;
      font-family: sans-serif;
    }
    nav {
      background: none;
      background-color: transparent;
      color: white;
      padding: 1rem;
      font-size: 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
    }
    nav .title {
      font-size: 1.2rem;
      flex-grow: 1;
    }
    nav input[type="time"] {
      background: #393939;
      border: none;
      color: white;
      padding: 0.5rem;
      border-radius: 5px;
      font-size: 1rem;
      flex-shrink: 0;
      text-shadow:
  1px 1px 0 #363636,
 -1px 1px 0 #363636,
  1px -1px 0 #363636,
 -1px -1px 0 #363636;
    }


    .leaflet-control-zoom {
  display: none !important;
}
.bottom-nav {
  position: fixed;
  bottom: 30px; /* Flyter upp lite */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 65px;
  background: #1a2b4a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 25px;
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
  z-index: 20000;
  padding: 0 10px;
  opacity: 80%;
  border: 1px solid rgba(219, 219, 219, 0.21); /* Subtil outline */
  backdrop-filter: blur(10px);
}

  /* Knappar */
.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  flex: 0 0 2%;
  display: flex;
  flex-direction: column; /* ikon överst, text under */
  justify-content: center;
  align-items: center;
}

/* Ikon-storlek */
.nav-btn .icon,
.home-btn .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;   /* matcha tidigare ikon-storlek */
  height: 30px;
}

/* nolla text-storlek så inga emoji-rester påverkar */
.nav-btn .icon { font-size: 0; }

/* Gör all knapptext i bottenmenyn lite mindre och snyggare */
.bottom-nav .label {
  white-space: nowrap;   /* hindrar texten från att brytas till ny rad */
  font-size: 12px;          /* mindre text */
  font-weight: 600;         /* lite tunnare men fortfarande läsbar */
  margin-top: 4px;          /* luft mellan ikon och text */
  opacity: 0.85;            /* lite mjukare färg */
  line-height: 1;
  text-align: center;
  letter-spacing: 0.3px;    /* ger lite elegans */
}

/* alla svg ska ärva färg och storlek */
.nav-btn .icon svg,
.home-btn .icon svg {
  width: 28px;
  height: 28px;
  display: block;
  color: currentColor;
}

/* Hem-knappen (ikon lite större nu) */
.home-btn .icon {
  font-size: 32px;

}

.spacer {
  flex: 0 0 74px;
}
/* Tryck-effekt */
.nav-btn:active {
  background: rgba(0,0,0,0.05);
}

/* Hem-knappen */
.home-btn {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -35%); /* Flytta upp lite över baren */
  background: #007bff;
  color: white;
  width: 70px;      /* Du kan ändra denna fritt nu */
  height: 70px;     /* Samma här */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 2px solid #ffffff43;
  cursor: pointer;
  z-index: 10000;
}
.home-btn .icon {
  font-size: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;       /* viktig */
  transform: translateY(-2px); /* finjustering om behövs */
}

.nav-btn,
.nav-dropdown-wrapper {
  flex: 1 1 0;
  justify-content: center;
  align-items: center;
}
.nav-btn, .home-btn {
  text-decoration: none;
  color: inherit;
}
.dropdown-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.dropdown-menu {
  position: absolute;
  bottom: 70px; /* ovanför bottenbaren */
  right: 0;
  display: none; /* göms som default */
  flex-direction: column;
  background: #253c6dc2;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  overflow: hidden;
  z-index: 99999;
  min-width: 180px;
}

.dropdown-menu a {
  padding: 12px 16px;
  color: #eeeeee;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: #f0f0f0;
}
    .hamburger {
    display: none;

    }
    .menu {
      display: none;
      position: absolute;
      top: 60px;
      left: 10px;
      background-color: #444;
      border-radius: 5px;
      overflow: hidden;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
      z-index: 1001;
    }
    .menu a {
      display: block;
      padding: 0.75rem 1rem;
      color: white;
      text-decoration: none;
      border-bottom: 1px solid #ebebeb;
    }
    .menu a:last-child {
      border-bottom: none;
    }
    .menu a:hover {
      background-color: #555;
    }
    #map {
      height: calc(100%);
      width: 100%;
    }
    .leaflet-popup-content {
      font-size: 14px;
    }
    .price-marker .price-circle {
      color: white;
      border-radius: 50%;
      text-align: center;
      line-height: 30px;
      width: 30px;
      height: 30px;
      font-weight: bold;
      font-size: 14px;
      box-shadow: 0 0 4px rgba(0,0,0,0.3);
      text-shadow:
        1px 1px 0 #000,
       -1px 1px 0 #000,
        1px -1px 0 #000,
       -1px -1px 0 #000,
        0px 1px 0 #000,
        0px -1px 0 #000,
        1px 0px 0 #000,
       -1px 0px 0 #000;
    }

    .price-marker .price-circle.closed {
      opacity: 0.40;
    }
    
    :root {
  --bg-color: white;
  --text-color: black;
  --nav-color: #6d6a6a;
}
body.dark {
  --bg-color: #121212;
  --text-color: #f0f0f0;
  --nav-color: #222222;
}
body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

nav .title {
  font-size: 1.2rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.search-wrap,
#timePicker,
.settings-btn,
.hamburger {
  flex: 0 0 auto;
}

#timeHint {
  font-size: 13px;
  color: #ccc;
  margin-bottom: -4px; /* Finjustering: drar texten lite närmare */
  text-shadow:
    1px 1px 0 #3f3f3f,
   -1px 1px 0 #3f3f3f,
    1px -1px 0 #3f3f3f,
   -1px -1px 0 #3f3f3f;
  animation: hintGlow 2.5s ease-in-out infinite;
}

#locateIcon {
position: fixed;
top: 750px;
left: 20px;
background: #ffffff;
border-radius: 50%;
width: 40px;
height: 40px;
cursor: pointer;
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
transition: background-color 0.3s ease;
}

    #locateIcon:hover,
    #locateIcon:focus {
      background: #ffffff;
      outline: none;
    }

#timePicker {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20000;

  /*background: rgba(50, 50, 50, 0.9);*/
  background: linear-gradient(to bottom, rgba(172, 172, 172, 0.6), rgba(54, 54, 54, 0.733));

  color: white;
  font-size: 20px;
  font-weight: 600;
  text-align: center;

  padding: 12px 10px;
  border: 2px solid #888;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);

  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  width: 115px;

  /* animation */
  animation: pulseOutline 5s infinite;
}

@keyframes pulseOutline {
  0% {
    box-shadow: 0 0 5px rgba(255, 153, 0, 0.3);
    border-color: #888;
  }
  50% {
    box-shadow: 0 0 15px rgba(255, 174, 0, 0.7);
    border-color: rgb(255, 153, 0);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 136, 0, 0.3);
    border-color: #888;
  }
}

/* Tryck-feedback */
#timePicker:active {
  transform: translateX(-50%) scale(0.96);
  background: rgba(70, 70, 70, 0.95);
}


#timePicker.pulse {
  animation: pulse 1.3s ease-in-out 2;
  transform-origin: center;
}
.settings-panel{
  position: fixed;            /* ⬅ byter från absolute */
  inset: auto auto auto auto; /* vi sätter exakt pos i JS */
  display: none;
  max-width: min(92vw, 320px);
  max-height: min(60vh, 440px);
  overflow: auto;
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  z-index: 15000;             /* under bottom-nav (20000), över allt annat */
}
.settings-panel.open { display: block; }
.settings-panel label {
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
}
.settings-panel select {
  padding: 0.3rem;
}


.search-wrap button {
  background: #ffffff;
  border: 1px solid rgba(42, 42, 42, 0.15);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
}

.search-btn {
  background: #444;
  border: none;
  color: #fff;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
body.dark .search-btn { background: #333; }

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#page-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #121212;
  color: white;
  display: none;
  z-index: 3000;
  overflow-y: auto;
  padding: 20px;
  transform: translateY(100%); /* startposition */
  transition: transform 0.5s ease, opacity 0.4s ease;
}

/*.search-panel {
  position: fixed;
  top: 150px;
  right: 0;
  left: auto;
  max-width: 360px;
  width: 80vw;
  box-sizing: border-box;
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding: 0.6rem;
  display: none;
  z-index: 1004;
  transform: translateY(70px); /* flyttar ner hela panelen */
.search-panel.open { display: block; }

.search-inner { display: flex; flex-direction: column; gap: 0.5rem; }

.search-inner input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid #666;
  background: transparent;
  color: inherit;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  width: 100%;
}
body.dark .search-inner input { 
  border-color: #888;
}

.results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 45vh;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(128,128,128,0.4);
  overscroll-behavior: contain;
}
.results li {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(128,128,128,0.25);
  cursor: pointer;
}
.results li:last-child { border-bottom: none; }
.results li:hover, .results li:focus { background: rgba(128,128,128,0.15); }

.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;
}

.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1003;
  display: none;
}
.search-backdrop.open { display: block; }

@media (max-width: 600px) {
  .search-panel {
    position: fixed;
    top: 58px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: 60vh;
    padding: 0.7rem;
    border-radius: 14px;
    z-index: 1004;
  }

  body.search-open { overflow: hidden; }
}

/* badge i sök */
.price-green  { background: limegreen; color: white; }
.price-orange { background: orange;    color: white; }
.price-red    { background: red;       color: white; }
.price-gray   { background: gray;      color: white; }

.price-badge {
  float: right;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 40px;
  text-align: center;
  text-shadow:
    -1px -1px 0 black,
     1px -1px 0 black,
    -1px  1px 0 black,
     1px  1px 0 black;
}



/* === Trendigaste bar: kompakt i sökpanelen === */
.search-panel .tw {
  background: transparent;
  border: 0;
  padding: 6px 0 0;
  margin-top: 6px;
  box-shadow: none;
  color: inherit;
}

.search-panel .tw-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px 0;
}

.search-panel .tw-header .tw-icon {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px;
  display: inline-block;
  fill: #00c46a;
}

/* Om du har någon global regel som gör svg 100% — neutralisera den här */
.search-panel .tw-header svg {
  width: 14px !important;
  height: 14px !important;
}

.search-panel .tw-title {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .2px;
  opacity: .9;
}

.search-panel .tw-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.search-panel .tw-badge {
  background: #1b1d20;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}
.search-panel .tw-badge:hover { background: #2a2d31; }

/* Dölj hela widgeten om det inte finns något att visa */
#trending-widget[hidden] { display: none !important; }

/* VKÖ – egen attribution */
.vko-attr { position: relative; }
.vko-attr-btn {
  border: 0; border-radius: 999px; padding: 8px 10px;
  font-size: 14px; line-height: 1; cursor: pointer;
  background: rgba(0,0,0,0.7); color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
body.dark .vko-attr-btn { background: rgba(255,255,255,0.12); color: #fff; }
.vko-attr-panel {
  position: absolute; right: 0; bottom: 44px;
  max-width: 78vw; width: 280px;
  background: rgba(20,20,20,0.95); color: #fff;
  border-radius: 10px; padding: 10px 12px; font-size: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
body:not(.dark) .vko-attr-panel { background: rgba(255,255,255,0.98); color: #222; }
.vko-attr-panel a { color: inherit; text-decoration: underline; }
.vko-attr-panel[hidden] { display: none; }
.vko-attr-panel strong { display:block; margin-bottom: 6px; font-size: 12px; }

/* ====== Aktiviteter: ikonknapp i navbar ====== */
.icon-btn {
  appearance: none;
  background: linear-gradient(145deg, #2b2b2b, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.15),
    0 2px 6px rgba(0,0,0,0.4);
  transition: all 0.25s ease;
}
.icon-btn:active { transform: scale(0.96); }
.icon { width: 22px; height: 22px; display: block; }

/* ====== Modal/backdrop ====== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 2400;
}
.modal-card {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 420px;
  background: #fff; color: #111;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
  z-index: 99999999;
  padding: 12px;
}
body.dark .modal-card {
  background: #16181b; color: #eee;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 4px 10px;
}
.close-btn {
  appearance: none; border: 0; background: transparent; color: inherit;
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  font-size: 18px; line-height: 1;
}
.close-btn:active { transform: scale(0.95); }

/* Lista & val */
.activities-list { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(0,0,0,.05);
}
body.dark .option { background: rgba(255,255,255,.06); }

.option input { display: none; }
.option .check {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid currentColor; display: inline-block;
  position: relative; flex: 0 0 20px;
}
.option input:checked + .check::after {
  content: ""; position: absolute; inset: 3px; border-radius: 4px;
  background: currentColor;
}

/* Knappar i foten */
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-start; margin-top: 8px;
}
.modal-actions .primary,
.modal-actions .secondary {
  appearance: none; border: 0; cursor: pointer; border-radius: 10px;
  padding: 10px 14px; font-weight: 600;
}
.modal-actions .primary {
  background: #4caf50; color: #fff;
}
.modal-actions .secondary {
  background: transparent; color: inherit; outline: 1px solid currentColor;
}

/* Mindre skärmar: bottensheet-känsla */
@media (max-width: 520px) {
  .modal-card {
    top: auto; bottom: 0; transform: translateX(-50%);
    border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

.form-error {
  margin: 6px 4px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffe8e8;
  color: #a40000;
  font-size: 0.95rem;
}
body.dark .form-error {
  background: rgba(255, 80, 80, 0.12);
  color: #ff8080;
}

/* Knappen med emoji */
#filterBtn {
  position: fixed;
  right: 8px;
  top: 100px;
   background: linear-gradient(to bottom, rgba(112, 112, 112, 0.692), rgba(58, 58, 58, 0.9));
  border: none;
  color: #fff;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 6px;
  font-size: 1rem;
}


#filterMenu {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background: var(--bg-color);
  border: 1px solid #888;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  padding: 0.5rem 0;
  z-index: 1005;
}


#filterMenu div {
  padding: 0.5rem 1rem;
  cursor: pointer;
}


#filterMenu div:hover {
  background: rgba(0,0,0,0.1);
}


#filterMenu .active {
  font-weight: bold;
  background: rgba(0,0,0,0.2);
}

/* === Puls-animering för aktiv filterknapp === */
@keyframes pulseFilter {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    background-color: #4caf50;
  }
  70% {
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    background-color: #45a049;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    background-color: #4caf50;
  }
}

#filterBtn.active {
  animation: pulseFilter 1.6s infinite;
  border: none;
  color: #fff;
}

/* === Neonrullning runt aktivitetsknappen (ny funktion 15–22 okt) === */
#filterBtn.neon {
  position: relative;
  z-index: 2;
  background: #111;
  color: #fff;
  border: none;
  overflow: hidden;
  border-radius: 8px;
}

/* Det animerade neonspåret */
#filterBtn.neon::before,
#filterBtn.neon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 2px;
  background: linear-gradient(
    90deg,
    #39ff14,
    #00ffff,
    #ff00ff,
    #39ff14
  );
  background-size: 300% 300%;
  animation: borderRun 3s linear infinite;
  mask: 
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}

/* Andra linjen rör sig i motsatt riktning */
#filterBtn.neon::after {
  animation-direction: reverse;
  opacity: 0.7;
}

/* Rörelse-animationen */
@keyframes borderRun {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.pulse-btn {
  position: relative;
  animation: pulseGlow 1.5s infinite ease-in-out;
  color: #ffffff !important; /* så att texten syns */
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0px rgba(6, 238, 255, 0.589);
    background-color: rgba(74, 154, 228, 0.5);
  }
  50% {
    box-shadow: 0 0 10px 4px rgba(6, 238, 255, 0.589);
    background-color: rgba(74, 154, 228, 0.5);
  }
  100% {
    box-shadow: 0 0 0px rgba(6, 238, 255, 0.589);
    background-color: rgba(74, 154, 228, 0.5);
  }
}


/* ── Färgförklaring: knapp + panel uppe till vänster ───────────────── */
#legendControl {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: calc(env(safe-area-inset-left, 0px) + 12px);
  z-index: 20050; /* över kartan, under ev. overlays om du vill */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* chip-lik knapp */
#legendToggle {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;

  /* följer ditt tema */
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
body:not(.dark) #legendToggle{
  background: rgba(0,0,0,.06);
  color: #111;
  border-color: rgba(0,0,0,.12);
}

/* panelen */
#legendPanel {
  background: rgba(20,20,20,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 8px;
  width: 260px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
body:not(.dark) #legendPanel{
  background: rgba(255,255,255,.96);
  color: #111;
  border-color: rgba(0,0,0,.08);
}

#legendPanel .row{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
}
#legendPanel .dot{
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.25);
  flex: 0 0 14px;
}
#legendPanel .txt{
  font-size: .9rem; line-height: 1.2;
}
#legendPanel .hint{
  margin-top: 6px; font-size: .75rem; opacity: .8;
}
/* Övre sticky bar */
.topbar {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px));
  z-index: 20050;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(to bottom, rgba(18,18,18,0.9), rgba(18,18,18,0.55));
  backdrop-filter: blur(8px);
}

/* Sektioner */
.topbar .nav-left { justify-self: start; }
.topbar .nav-center{
  position: relative;
  width: max-content;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.topbar .nav-right { justify-self: end; display: flex; align-items: center; gap: 8px; position: relative; }
/* Lägg texten över och centrerad mot timepickern */
#timeHint{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 6px);
  margin: 0;
  white-space: nowrap;   /* <- stoppar radbrytning */
  line-height: 1;
}

/* Ikonknappar (återanvänder din stil) */
.icon-btn {
  appearance: none;
  background: #2b2b2b;
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1), 0 2px 6px rgba(0,0,0,0.4);
  font-size: 18px;
}
.icon-btn:active { transform: scale(0.96); }

/* TimePicker i mitten */
.topbar #timePicker{
  background: linear-gradient(to bottom, rgba(172,172,172,0.6), rgba(54,54,54,0.78));
  color: #fff;
  font-size: 16px; font-weight: 600;
  border: 1px solid #888;
  padding: 8px 10px;
  border-radius: 999px;
  width: 120px;
}
.topbar #timeHint{
  font-size: 11px; color: #ccc; margin-top: 2px;
  text-shadow: 1px 1px 0 #3f3f3f, -1px 1px 0 #3f3f3f, 1px -1px 0 #3f3f3f, -1px -1px 0 #3f3f3f;
}

/* Settings-panel: dropdown under kugghjulet */
.settings-panel{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  min-width: 230px;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.settings-panel.open { display: block; }
.settings-panel label{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin:8px 0; }

/* Sökpanel: anpassa för att öppna under topbar på mobil */
.search-panel{
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 56px);
  left: 8px; right: 8px;
  width: auto; max-width: 560px; margin: 0 auto;
  transform: none;
  z-index: 2400;
}
@media (max-width: 600px){
  .topbar{ grid-template-columns: auto 1fr auto; }
  .topbar #timePicker{ width: 100px; font-size: 15px; }
  .topbar #timeHint{ font-size: 10px; }
}
.nav-center {
  display: flex;
  flex-direction: column; /* Gör att texten hamnar ovanför */
  align-items: center;
  gap: 4px; /* Avstånd mellan text och input */
}

.topbar #timeHint{
  order: 0;    /* text först */
  margin: 0 0 2px 0;
}
.topbar #timePicker{
  order: 1;    /* input under */
}
/* --- TOPBAR: centrera "Ändra tid" ovanför timepickern på alla skärmar --- */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* håller mitten centrerad */
  align-items: center;
}

.topbar .nav-center{
  justify-self: center;           /* säker centrering i gridkolumnen */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: auto;
}

.topbar #timeHint{
  position: static !important;    /* stänger av absolute-varianten */
  transform: none !important;
  margin: 0 0 4px 0;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.topbar #timePicker{
  position: static !important;    /* stänger av global fixed */
  top: auto; left: auto;
  transform: none !important;
  width: 120px;
  border-radius: 999px;
}

@media (max-width: 600px){
  .topbar .nav-center{ min-width: 0; }
  .topbar #timeHint{ font-size: 10.5px; }
  .topbar #timePicker{ width: 90px; font-size: 15px; }
}
/* Säkerställ att div-markörer syns framför tiles/overlays */
.leaflet-pane.leaflet-marker-pane .leaflet-marker-icon {
  z-index: 600;
}
/* Ta bort vit bakgrund runt våra pris-markörer */
.leaflet-div-icon,
.leaflet-marker-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* valfritt: specifikt för våra egna */
.leaflet-div-icon.price-marker,
.leaflet-marker-icon.price-marker {
  background: transparent !important;
  border: none !important;
}
/* === VKÖ Search – canonical styles === */
#searchPanel.search-panel{
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 56px);
  left: 8px;
  right: 8px;
  width: auto;
  max-width: 560px;
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding: 0.6rem;
  display: none;
  z-index: 2400;
  transform: none;
}
#searchPanel.open{ display:block; }

#searchPanel .search-header input{
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid #666;
  background: transparent;
  color: inherit;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
}
body.dark #searchPanel .search-header input{ border-color:#888; }

#searchResults{
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 45vh;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(128,128,128,0.4);
}
#searchResults li{
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(128,128,128,0.25);
  cursor: pointer;
}
#searchResults li:last-child{ border-bottom:none; }
#searchResults li:hover, #searchResults li:focus{
  background: rgba(128,128,128,0.15);
}

/* Trending badges inside panel */
#trending-widget{ margin-top:6px; }
#trending-widget .tw-badge{
  background:#1b1d20;
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  padding:4px 8px;
  font-size:13px;
  font-weight:500;
  color:#fff;
  line-height:1;
  white-space:nowrap;
}
/* ——— Dölj själva topbaren men behåll innehållet ——— */
.topbar{
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: 0 !important;
  border: 0 !important;
}

/* Centrera tidväljaren + texten ovanför som fristående element */
#timePicker{
  position: fixed !important;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20050;
}
#timeHint{
  position: fixed !important;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20050;
}

/* Flytta upp sök- och inställningsknapparna till övre högra hörnet */
#openSearch{
  position: fixed;
  top: 16px;
  right: 68px;            /* lite vänster om kugghjulet */
  z-index: 20050;
}
#settingsToggle{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20050;
}

/* Se till att sökpanel & inställningspanel ritas ovanpå kartan */
#searchPanel{ z-index: 2400; }
.settings-panel{
  position: fixed !important;
  z-index: 2500 !important;
}
