/* Resekartan Karta. Alla regler ligger under .rkk så att temat inte påverkas och tvärtom. */

.rkk {
  --rkk-text: #0f172a;
  --rkk-muted: #64748b;
  --rkk-line: #e2e8f0;
  --rkk-soft: #f1f5f9;
  --rkk-primary: #8a3484;
  --rkk-primary-soft: #f4eaf3;
  --rkk-danger: #b91c1c;
  --rkk-radius: 10px;
  --rkk-side: 380px;
  --rkk-h: clamp(368px, calc((100vh - 130px) * 0.8), 720px);
  position: relative;
  scroll-margin-top: var(--rkk-top, 0px);
  color: var(--rkk-text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: left;
}

/* Samma bredd som "Senaste resetips" (temats alignwide, 1280 px), centrerad. */
html body div.rkk[data-rkk] {
  width: min(100%, var(--wp--style--global--wide-size, 1280px)) !important;
  max-width: var(--wp--style--global--wide-size, 1280px) !important;
  margin-top: 1.5rem !important;
  margin-bottom: 2rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html body div.rkk[data-rkk]:fullscreen,
html body div.rkk[data-rkk]:-webkit-full-screen {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.rkk *,
.rkk *::before,
.rkk *::after {
  box-sizing: border-box;
}

.rkk button {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  min-height: 0;
  min-width: 0;
  cursor: pointer;
}

.rkk button:disabled {
  cursor: default;
  opacity: 0.45;
}

.rkk select,
.rkk input[type="text"],
.rkk input[type="search"] {
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--rkk-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: var(--rkk-text);
  font: inherit;
  font-size: 14px;
}

.rkk select:focus,
.rkk input[type="text"]:focus,
.rkk input[type="search"]:focus {
  outline: 2px solid rgba(138, 52, 132, 0.35);
  outline-offset: 0;
  border-color: var(--rkk-primary);
}

.rkk select:disabled {
  background: var(--rkk-soft);
  color: var(--rkk-muted);
}

.rkk ul,
.rkk ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rkk img {
  max-width: none;
}

.rkk h3,
.rkk h2,
.rkk h4,
.rkk p {
  margin: 0;
}

.rkk a {
  color: var(--rkk-primary);
}

/* --- Ramar ----------------------------------------------------------------- */

.rkk .rkk-shell {
  display: grid;
  grid-template-columns: var(--rkk-side) 1fr;
  height: var(--rkk-h);
  border-top: 1px solid var(--rkk-line);
  border-bottom: 1px solid var(--rkk-line);
  background: #fff;
}

.rkk .rkk-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--rkk-line);
  background: #fff;
  z-index: 2;
}

.rkk .rkk-mapwrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #dfe7ee;
}

.rkk .rkk-map {
  position: absolute;
  inset: 0;
}

.rkk:fullscreen {
  width: 100vw;
  max-width: none;
  margin: 0;
  background: #fff;
}

.rkk:fullscreen .rkk-shell {
  height: 100vh;
  height: 100dvh;
}

/* Loggan behövs bara i helskärm; på sidan syns temats header direkt ovanför. */
.rkk .rkk-brand {
  display: none;
}

.rkk:fullscreen .rkk-brand {
  display: flex;
  justify-content: center;
  padding: 16px 16px 2px;
}

.rkk:-webkit-full-screen .rkk-brand {
  display: flex;
  justify-content: center;
  padding: 16px 16px 2px;
}

.rkk .rkk-brand-img {
  display: block;
  width: auto;
  max-width: 220px;
  height: 42px;
  object-fit: contain;
}

/* --- Sök ------------------------------------------------------------------- */

.rkk .rkk-search {
  position: relative;
  padding: 14px 12px 18px;
}

.rkk .rkk-search-icon {
  position: absolute;
  left: 25px;
  top: 24px;
  color: var(--rkk-muted);
  pointer-events: none;
}

.rkk .rkk-search .rkk-q {
  height: 36px;
  padding: 0 38px 0 38px;
  border-radius: 999px;
  background: var(--rkk-soft);
  border-color: transparent;
  font-size: 15px;
}

.rkk .rkk-search .rkk-q:focus {
  background: #fff;
}

.rkk .rkk-search .rkk-q::-webkit-search-cancel-button {
  display: none;
}

.rkk .rkk-q-clear {
  position: absolute;
  right: 20px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--rkk-muted);
}

.rkk .rkk-q-clear:hover {
  background: var(--rkk-line);
}

.rkk .rkk-results {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% - 4px);
  z-index: 30;
  max-height: min(420px, 60vh);
  overflow: auto;
  overflow-anchor: none;
  border: 1px solid var(--rkk-line);
  border-radius: var(--rkk-radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.rkk .rkk-res-group {
  padding: 10px 12px 4px;
  color: var(--rkk-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rkk .rkk-res,
.rkk .rkk-list button {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}

.rkk .rkk-res i,
.rkk .rkk-list button i {
  width: 18px;
  margin-top: 2px;
  text-align: center;
}

.rkk .rkk-res b,
.rkk .rkk-list b {
  display: block;
  font-weight: 600;
}

.rkk .rkk-res-off {
  margin-left: 4px;
  color: #94a3b8;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.rkk .rkk-res small,
.rkk .rkk-list small {
  display: block;
  color: var(--rkk-muted);
  font-size: 12px;
}

.rkk .rkk-res:hover,
.rkk .rkk-res.is-active,
.rkk .rkk-list button:hover {
  background: var(--rkk-soft);
}

.rkk .rkk-res-empty,
.rkk .rkk-res-wait {
  padding: 12px;
  color: var(--rkk-muted);
}

/* --- Flikar och paneler ------------------------------------------------------ */

.rkk .rkk-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rkk-line);
}

.rkk .rkk-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px 5px;
  border-bottom: 2px solid transparent;
  color: var(--rkk-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.rkk .rkk-tab i {
  font-size: 16px;
}

.rkk .rkk-tab:hover {
  color: var(--rkk-text);
}

.rkk .rkk-tab.is-active {
  border-bottom-color: var(--rkk-primary);
  color: var(--rkk-primary);
}

.rkk .rkk-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--rkk-primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.rkk .rkk-tab .rkk-badge {
  position: absolute;
  top: 4px;
  left: calc(50% + 6px);
}

.rkk .rkk-badge[hidden] {
  display: none;
}

.rkk .rkk-panes {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 12px 10px;
}

.rkk .rkk-sheet-head {
  display: none;
}

.rkk .rkk-pane h2 {
  margin: 14px 0 6px;
  color: var(--rkk-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rkk .rkk-muted {
  color: var(--rkk-muted);
  font-size: 12.5px;
}

.rkk .rkk-pane > .rkk-muted,
.rkk .rkk-route-out > .rkk-muted {
  margin: 8px 0;
}

.rkk .rkk-error-text {
  margin: 8px 0;
  color: var(--rkk-danger);
}

/* --- Knappar ----------------------------------------------------------------- */

.rkk .rkk-btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.rkk .rkk-trip-actions {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}

.rkk .rkk-trip-actions .rkk-btn {
  gap: 4px;
  padding: 6px 5px;
  font-size: 12px;
  white-space: nowrap;
}

.rkk .rkk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--rkk-line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
}

.rkk .rkk-btn[hidden] {
  display: none;
}

.rkk .rkk-btn:hover {
  background: var(--rkk-soft);
}

.rkk .rkk-btn-primary {
  border-color: var(--rkk-primary);
  background: var(--rkk-primary);
  color: #fff;
}

.rkk .rkk-btn-primary:hover {
  background: #6e2468;
}

.rkk .rkk-btn-danger {
  color: var(--rkk-danger);
}

.rkk .rkk-iconbtn {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rkk-line);
  border-radius: 8px;
  background: #fff;
  color: var(--rkk-muted);
}

.rkk .rkk-iconbtn:hover {
  color: var(--rkk-primary);
}

.rkk .rkk-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 13.5px;
  cursor: pointer;
}

.rkk .rkk-switch input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--rkk-primary);
}

.rkk .rkk-switchrow {
  display: flex;
  gap: 6px;
  margin: 14px 0 4px;
}

.rkk .rkk-switchrow .rkk-switch {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--rkk-line);
  border-radius: 8px;
  background: #fff;
  white-space: nowrap;
}

.rkk .rkk-switchrow .rkk-switch span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rkk .rkk-switchrow .rkk-private-switch {
  border: 1px dashed #94a3b8;
  background: #f8fafc;
}

.rkk .rkk-switchrow .rkk-reset-switch {
  justify-content: center;
  color: inherit;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
}

.rkk .rkk-switchrow .rkk-reset-switch:hover {
  border-color: var(--rkk-primary);
  color: var(--rkk-primary);
}

.rkk .rkk-switchrow.is-tight {
  gap: 6px;
}

.rkk .rkk-switchrow.is-tight .rkk-switch {
  flex: 1 1 auto;
  gap: 5px;
  padding: 5px 6px;
  font-size: 12.5px;
}

.rkk .rkk-switchrow.is-tight .rkk-switch input {
  width: 16px;
  height: 16px;
}

/* --- Filter ------------------------------------------------------------------- */

.rkk .rkk-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 0;
  padding: 3px;
  border-radius: 10px;
  background: var(--rkk-soft);
}

.rkk .rkk-switchrow + h2 {
  margin-top: 18px;
}

.rkk .rkk-pane h2.rkk-sech {
  margin-top: 22px;
}

.rkk .rkk-seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #475569;
  font-weight: 600;
}

.rkk .rkk-seg button.is-active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  color: var(--rkk-text);
}

.rkk .rkk-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.rkk .rkk-cat-all {
  grid-column: 1 / -1;
}

.rkk .rkk-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border: 1px solid var(--rkk-line);
  border-radius: var(--rkk-radius);
  background: #fff;
  font-size: 12.5px;
  text-align: left;
}

.rkk .rkk-cat:hover {
  border-color: #cbd5e1;
}

.rkk .rkk-cat-ico {
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c, #334155);
  color: #fff;
  font-size: 12px;
}

.rkk .rkk-cat-num {
  font-size: 12px;
  font-weight: 700;
}

.rkk .rkk-cat.is-on {
  border-color: var(--c, var(--rkk-primary));
  background: color-mix(in srgb, var(--c, #8a3484) 10%, #fff);
  box-shadow: inset 0 0 0 1px var(--c, var(--rkk-primary));
  font-weight: 600;
}

.rkk .rkk-cat small {
  color: var(--rkk-muted);
  font-weight: 400;
}

.rkk .rkk-rate {
  margin: 8px 0 6px;
  padding: 8px 10px 8px;
  border: 1px solid var(--rkk-line);
  border-radius: 12px;
  background: var(--rkk-soft);
}

.rkk .rkk-rate hr {
  height: 0;
  margin: 12px 0 10px;
  border: 0;
  border-top: 1px solid #d5dde6;
}

.rkk .rkk-rate .rkk-field {
  margin: 0;
}

.rkk .rkk-ratelead {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
}

/* Betygsreglage: eget spår med två bollar. Spårets ändar ligger rakt ovanför första och sista steget. */
.rkk .rkk-rs {
  --rkk-thumb: 22px;
  position: relative;
  height: 34px;
  margin: 0 11px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.rkk .rkk-rs-rail,
.rkk .rkk-rs-fill {
  position: absolute;
  top: 14px;
  height: 6px;
  border-radius: 999px;
  pointer-events: none;
}

.rkk .rkk-rs-rail {
  left: 0;
  right: 0;
  background: #cbd5e1;
}

.rkk .rkk-rs-fill {
  left: var(--a);
  width: calc(var(--b) - var(--a));
  background: var(--rkk-primary);
  transition: left 0.12s ease, width 0.12s ease;
}

.rkk .rkk-rs-tick {
  position: absolute;
  top: 15px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
  pointer-events: none;
}

.rkk .rkk-rs-thumb {
  position: absolute;
  top: calc(17px - var(--rkk-thumb) / 2);
  left: var(--a);
  z-index: 2;
  box-sizing: border-box;
  width: var(--rkk-thumb);
  height: var(--rkk-thumb);
  margin-left: calc(var(--rkk-thumb) / -2);
  border: 2px solid var(--rkk-primary);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
  cursor: grab;
  outline: none;
  transition: left 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.rkk .rkk-rs-thumb[data-span-thumb="max"] {
  left: var(--b);
  z-index: 3;
}

.rkk .rkk-rs-thumb:hover,
.rkk .rkk-rs-thumb.is-active {
  box-shadow: 0 0 0 6px rgba(138, 52, 132, 0.14), 0 1px 3px rgba(15, 23, 42, 0.28);
}

.rkk .rkk-rs-thumb:focus-visible {
  box-shadow: 0 0 0 4px rgba(138, 52, 132, 0.3), 0 1px 3px rgba(15, 23, 42, 0.28);
}

.rkk .rkk-rs.is-dragging,
.rkk .rkk-rs.is-dragging .rkk-rs-thumb {
  cursor: grabbing;
}

.rkk .rkk-rs-thumb.is-active {
  transform: scale(1.08);
}

/* Båda på samma steg: en boll syns, med en prick som visar att det är ett enda steg. */
.rkk .rkk-rs.is-stacked .rkk-rs-thumb[data-span-thumb="max"]::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--rkk-primary);
}

/* Siffran står rakt under sitt steg, ordet under siffran. Ändarna linjeras mot rutans kanter. */
.rkk .rkk-ratestops {
  position: relative;
  height: 40px;
  margin: 4px 11px 0;
}

.rkk .rkk-ratestops button {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  max-width: 70px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  line-height: 1.12;
  text-align: center;
  cursor: pointer;
  transform: translateX(-50%);
  -webkit-tap-highlight-color: transparent;
}

.rkk .rkk-ratestops button:nth-child(1) { left: -11px; align-items: flex-start; text-align: left; transform: none; }
.rkk .rkk-ratestops button:nth-child(2) { left: 20%; }
.rkk .rkk-ratestops button:nth-child(3) { left: 43.333%; }
.rkk .rkk-ratestops button:nth-child(4) { left: 70%; }
.rkk .rkk-ratestops button:nth-child(5) { right: -11px; align-items: flex-end; text-align: right; transform: none; }

.rkk .rkk-ratestops.is-even button:nth-child(2) { left: 25%; }
.rkk .rkk-ratestops.is-even button:nth-child(3) { left: 50%; }
.rkk .rkk-ratestops.is-even button:nth-child(4) { left: 75%; }
.rkk .rkk-ratestops button small {
  white-space: nowrap;
}

/* Ändarnas siffror ska stå under bollens mitt, inte vid rutans kant. */
.rkk .rkk-ratestops button:nth-child(1) b { margin-left: 7px; }
.rkk .rkk-ratestops button:nth-child(5) b { margin-right: 7px; }

.rkk .rkk-ratestops b {
  display: block;
  min-width: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.rkk .rkk-ratestops small {
  display: block;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  hyphens: manual;
}

.rkk .rkk-ratestops button.is-on b,
.rkk .rkk-ratestops button.is-on small {
  color: var(--rkk-primary);
}

.rkk .rkk-ratestops button:hover small {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rkk .rkk-ratestops button:focus-visible {
  outline: 2px solid var(--rkk-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.rkk .rkk-ratehint {
  margin: 6px 0 0;
  color: var(--rkk-text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.rkk .rkk-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.rkk .rkk-quick button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 3px;
  border: 1px solid var(--rkk-line);
  border-radius: var(--rkk-radius);
  background: #fff;
  font-size: 12.5px;
  white-space: nowrap;
}

.rkk .rkk-quick button.is-on {
  border-color: var(--rkk-primary);
  background: var(--rkk-primary-soft);
  color: var(--rkk-primary);
  font-weight: 600;
}

.rkk .rkk-field {
  margin-bottom: 10px;
}

.rkk .rkk-field > label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
}

.rkk .rkk-range-val {
  color: var(--rkk-primary);
}

.rkk .rkk-hint {
  margin-left: auto;
  color: #94a3b8;
  cursor: help;
}

.rkk .rkk-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 8px;
}

.rkk .rkk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.rkk .rkk-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 2px 9px;
  border-radius: 999px;
  background: #f3e8f1;
  color: #6b2466;
  font-size: 12.5px;
}

.rkk .rkk-chip button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}

.rkk .rkk-chip button:hover {
  background: #e4cfe2;
}

.rkk .rkk-taginput {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 6px;
  border: 1px solid var(--rkk-line);
  border-radius: 8px;
  background: #fff;
}

.rkk .rkk-taginput input[type="text"] {
  flex: 1 1 120px;
  width: auto;
  height: 28px;
  padding: 0 4px;
  border: 0;
  outline: 0;
}

/* Dubbelreglage: två range-fält ovanpå varandra */
.rkk .rkk-dual {
  position: relative;
  height: 28px;
}

.rkk .rkk-dual::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 12px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--rkk-line) var(--a), var(--rkk-primary) var(--a), var(--rkk-primary) var(--b), var(--rkk-line) var(--b));
}

.rkk .rkk-dual input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.rkk .rkk-dual input[type="range"]::-webkit-slider-runnable-track {
  height: 28px;
  background: transparent;
}

.rkk .rkk-dual input[type="range"]::-moz-range-track {
  height: 28px;
  background: transparent;
}

.rkk .rkk-dual input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: 5px;
  border: 2px solid var(--rkk-primary);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  pointer-events: auto;
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
}

.rkk .rkk-dual input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--rkk-primary);
  border-radius: 50%;
  background: #fff;
  pointer-events: auto;
  cursor: grab;
}

.rkk .rkk-dual-scale {
  display: flex;
  justify-content: space-between;
  padding: 0 5px;
  color: #94a3b8;
  font-size: 11px;
}

.rkk input[type="range"][data-radius] {
  width: 100%;
  accent-color: var(--rkk-primary);
}

.rkk .rkk-filter-foot {
  justify-content: center;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--rkk-line);
}

/* --- Reseplan ------------------------------------------------------------------ */

.rkk .rkk-empty {
  padding: 28px 10px;
  color: var(--rkk-muted);
  text-align: center;
}

.rkk .rkk-empty > i {
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 34px;
}

.rkk .rkk-empty p + p {
  margin-top: 6px;
}

.rkk .rkk-trip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.rkk .rkk-trip-head p,
.rkk .rkk-trip-head .rkk-switch {
  margin: 0;
  margin-block: 0;
  line-height: 1.3;
}

.rkk .rkk-trip-rule {
  height: 0;
  margin: 16px 0 16px;
  border: 0;
  background: none;
  border-top: 1px solid var(--rkk-line);
}

.rkk .rkk-trip-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rkk-line);
}

.rkk .rkk-trip-n {
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  height: 24px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.rkk .rkk-trip-name {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  text-align: left;
}

.rkk .rkk-trip-name i {
  margin-top: 3px;
}

.rkk .rkk-trip-name span {
  min-width: 0;
}

.rkk .rkk-trip-name b {
  display: block;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rkk .rkk-trip-name small {
  display: block;
  color: var(--rkk-muted);
  font-size: 12px;
}

.rkk .rkk-trip-tools {
  display: flex;
  gap: 2px;
}

.rkk .rkk-trip-tools button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--rkk-muted);
}

.rkk .rkk-trip-tools button:hover {
  background: var(--rkk-soft);
  color: var(--rkk-text);
}

/* --- Rutter --------------------------------------------------------------------- */

.rkk .rkk-route-end {
  position: relative;
}

.rkk .rkk-route-end > .rkk-inputrow {
  align-items: center;
}

.rkk .rkk-route-end .rkk-inputrow > label {
  flex: 0 0 46px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.rkk .rkk-route-end .rkk-route-box {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.rkk .rkk-route-end .rkk-route-box > input {
  width: 100%;
  padding-right: 32px;
}

.rkk .rkk-route-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  color: var(--rkk-muted);
}

.rkk .rkk-route-clear[hidden] {
  display: none;
}

.rkk .rkk-route-clear:hover {
  color: var(--rkk-text);
  background: var(--rkk-soft);
}

.rkk .rkk-pane > .rkk-route-lead {
  margin-bottom: 20px;
  text-align: center;
}

.rkk .rkk-route-radius {
  margin-top: 22px;
}

.rkk .rkk-route-actions {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
}

.rkk .rkk-route-actions .rkk-btn {
  gap: 4px;
  padding: 6px 6px;
  font-size: 12px;
  white-space: nowrap;
}

.rkk .rkk-route-out > .rkk-route-count {
  margin: 0 0 18px;
  text-align: center;
}

.rkk .rkk-route-count b {
  font-weight: 700;
}

.rkk .rkk-route-out > .rkk-alts + .rkk-route-count {
  margin-top: 16px;
}

.rkk .rkk-route-out button.rkk-inline {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rkk-primary);
  font: inherit;
  line-height: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.rkk .rkk-route-out button.rkk-inline:hover {
  color: #6e2468;
}

.rkk .rkk-route-out > .rkk-error-text {
  text-align: center;
}

.rkk .rkk-route-out > .rkk-route-warn {
  font-size: 12px;
  line-height: 1.35;
}

.rkk .rkk-em {
  font-style: italic;
}

.rkk .rkk-inputrow {
  display: flex;
  gap: 6px;
}

.rkk .rkk-suggest {
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--rkk-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.rkk .rkk-suggest button {
  display: block;
  width: 100%;
  padding: 7px 10px;
  text-align: left;
}

.rkk .rkk-suggest button:hover {
  background: var(--rkk-soft);
}

.rkk .rkk-suggest small {
  display: block;
  color: var(--rkk-muted);
  font-size: 12px;
}

.rkk .rkk-alts {
  display: grid;
  gap: 6px;
  margin-top: 26px;
}

.rkk .rkk-alt {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--rkk-line);
  border-radius: 8px;
  text-align: left;
}

.rkk .rkk-alt.is-on {
  border-color: #0c284d;
  background: #eef3f9;
}

.rkk .rkk-alt span {
  color: var(--rkk-muted);
}

.rkk .rkk-list {
  margin: 4px -12px 0;
}

/* --- Kartlager ovanpå kartan ---------------------------------------------------- */

.rkk .rkk-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transform: translate(-50%, -50%);
}

.rkk .rkk-loading[hidden],
.rkk .rkk-error[hidden],
.rkk .rkk-distance[hidden],
.rkk .rkk-toast[hidden] {
  display: none;
}

.rkk .rkk-error {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: #f8fafc;
  text-align: center;
}

.rkk .rkk-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--rkk-primary);
  border-radius: 50%;
  vertical-align: -2px;
  animation: rkk-spin 0.8s linear infinite;
}

@keyframes rkk-spin {
  to {
    transform: rotate(360deg);
  }
}

.rkk .rkk-distance {
  position: absolute;
  left: 50%;
  top: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 6px 6px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
  transform: translateX(-50%);
}

.rkk .rkk-distance div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 180px;
  height: 40px;
  margin-right: 6px;
}

.rkk .rkk-distance b,
.rkk .rkk-distance small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rkk .rkk-distance b {
  display: block;
  font-size: 15px;
}

.rkk .rkk-distance small {
  display: block;
  color: var(--rkk-muted);
  font-size: 11.5px;
}

.rkk .rkk-distance button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--rkk-muted);
}

.rkk .rkk-distance button:hover {
  background: var(--rkk-soft);
}

.rkk .rkk-toast {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 40;
  max-width: min(92vw, 520px);
  padding: 10px 16px;
  border-radius: 10px;
  background: #0f172a;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
  color: #fff;
  font-size: 13.5px;
  transform: translateX(-50%);
  word-break: break-word;
}

.rkk .rkk-toast.is-error {
  background: var(--rkk-danger);
}

.rkk .rkk-enlarge {
  display: none;
}

html.rkk-noscroll,
html.rkk-noscroll body {
  overflow: hidden;
}

html.rkk-noscroll body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

/* Telefon: kartan fyller skärmen så den går att navigera på. */
html body div.rkk[data-rkk].is-enlarged {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  height: 100dvh;
  margin: 0 !important;
  background: #fff;
}

.rkk.is-enlarged .rkk-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rkk.is-enlarged .rkk-search,
.rkk.is-enlarged .rkk-brand {
  display: none;
}

.rkk.is-enlarged .rkk-tabs {
  display: grid;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  background: #fff;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--rkk-line);
}

.rkk.is-enlarged .rkk-side {
  height: 0;
  min-height: 0;
  border: 0;
}

.rkk.is-enlarged .rkk-mapwrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.rkk.is-enlarged .mapboxgl-ctrl-top-right {
  top: calc(env(safe-area-inset-top) + 64px);
  right: env(safe-area-inset-right);
}

.rkk.is-enlarged .rkk-enlarge {
  top: calc(env(safe-area-inset-top) + 64px);
  margin-top: 0;
}

/* Mapbox-kontroller: återställ det som knappåterställningen ovan tar bort */
.rkk .mapboxgl-ctrl-group button {
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  background-color: transparent;
}

.rkk .mapboxgl-ctrl-group button + button {
  border-top: 1px solid #ddd;
}

.rkk .mapboxgl-ctrl-group button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.rkk .rkk-ctrl button {
  color: #333;
  font-size: 14px;
}

.rkk .rkk-ctrl button.rkk-sat {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rkk .rkk-ctrl button.rkk-sat svg {
  display: block;
  width: 18px;
  height: 18px;
}

.rkk .rkk-ctrl button.is-active {
  background-color: var(--rkk-primary-soft);
  color: var(--rkk-primary);
}

.rkk .rkk-ctrl button.is-busy i {
  animation: rkk-spin 0.6s linear infinite;
}

/* --- Popup (samma mått och färger som den gamla kartan) --------------------------- */

.rkk .rkk-popup {
  z-index: 6;
  max-width: 300px;
}

.rkk .rkk-popup .mapboxgl-popup-content {
  position: relative;
  width: 300px;
  max-width: 300px;
  padding: 0 0 6px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  color: #0f172a;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.rkk .rkk-pc {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.rkk .rkk-pbtn {
  position: absolute;
  top: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  color: #fff;
  transition: all 0.15s ease;
}

.rkk .rkk-pbtn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.75);
}

.rkk .rkk-pbtn i {
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.rkk .rkk-pclose {
  right: 8px;
}

.rkk .rkk-pinfo {
  left: 8px;
  z-index: 12;
  width: 18px;
  height: 18px;
}

.rkk .rkk-pinfo i {
  font-size: 10px;
}

.rkk .rkk-pimg {
  position: relative;
  height: 168px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #e2e8f0;
}

.rkk .rkk-pimg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
  cursor: zoom-in;
  touch-action: manipulation;
  transition: transform 0.12s ease;
}

.rkk .rkk-pimg img:active {
  transform: scale(0.985);
}

.rkk .rkk-credit {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 11;
  display: none;
  width: 248px;
  max-width: min(78vw, 248px);
  padding: 11px 12px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.38);
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.42;
  transform: translate(-50%, -50%);
}

.rkk .rkk-credit.is-open {
  display: block;
}

.rkk .rkk-credit a {
  color: #93c5fd;
  text-decoration: none;
}

.rkk .rkk-credit a:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

.rkk .rkk-credit-title {
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rkk .rkk-credit-main {
  color: #f8fafc;
  font-size: 11.5px;
  line-height: 1.45;
  word-break: break-word;
}

.rkk .rkk-credit-empty {
  color: #cbd5e1;
  font-size: 11px;
}

.rkk .rkk-pp-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  padding: 8px 10px 6px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

.rkk .rkk-pp-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.rkk .rkk-pp {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

.rkk .rkk-pp i {
  font-size: 10px;
}

.rkk .rkk-pbody {
  padding: 10px 12px 2px;
  text-align: left;
}

.rkk .rkk-ptitle {
  margin-bottom: 2px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.3;
}

.rkk .rkk-ploc {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 11px;
}

.rkk .rkk-ploc:empty {
  display: none;
}

.rkk .rkk-pmeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.rkk .rkk-pmore {
  display: none;
}

.rkk .rkk-pmorewrap {
  display: block;
}

.rkk .rkk-ptw {
  display: block;
  margin: 6px 0 10px;
  text-align: left;
}

.rkk .rkk-ptoggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.rkk .rkk-ptoggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  user-select: none;
}

.rkk .rkk-ptoggle i {
  color: #94a3b8;
  font-size: 1em;
}

.rkk .rkk-palias i {
  color: #ef4444;
}

.rkk .rkk-ptags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.rkk .rkk-ptags.is-open {
  max-height: 120px;
  margin-top: 6px;
  padding-bottom: 4px;
  overflow-y: auto;
}

.rkk .rkk-ptag {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--rkk-line);
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  cursor: default;
}

.rkk .rkk-pdesc {
  margin: 2px 0 16px;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.rkk .rkk-pspacer {
  margin-bottom: 12px;
}

.rkk .rkk-pacts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 8px;
}

.rkk .rkk-pi {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  transition: all 0.15s ease;
}

.rkk .rkk-pi:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: scale(1.05);
}

.rkk .rkk-pi.is-on {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.rkk .rkk-pi.is-on:hover {
  border-color: #1e293b;
  background: #1e293b;
}

.rkk .rkk-pi i {
  font-size: 18px;
}

.rkk .rkk-pi-svg {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.rkk .rkk-pi-lens {
  width: 28px;
  height: 28px;
}

.rkk .rkk-pi-g {
  width: 22px;
  height: 22px;
}

/* Bild i helskärm och val av navigeringsapp (ligger utanför popupen) */
.rkk .rkk-lightbox {
  position: absolute;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overscroll-behavior: contain;
}

.rkk .rkk-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.rkk .rkk-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 18px;
}

.rkk .rkk-navdlg {
  position: absolute;
  inset: 0;
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
}

.rkk .rkk-navbox {
  width: 90%;
  max-width: 300px;
  padding: 20px;
  border-radius: 6px;
  background: #2d333b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.rkk .rkk-navbox h3 {
  margin: 0 0 15px;
  font-family: inherit;
  line-height: 1.3;
  color: #fffafa;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.rkk .rkk-navbox a,
.rkk .rkk-navbox button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #444c56;
  border-radius: 6px;
  background: #22272e;
  color: #adbac7;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.rkk .rkk-navbox a:hover {
  border-color: #bc0ab9;
  background: #bc0ab9;
  color: #fff;
}

.rkk .rkk-navbox a:hover svg path {
  fill: #fff;
}

.rkk .rkk-navbox a:active,
.rkk .rkk-navbox button:active {
  transform: scale(0.98);
}

.rkk .rkk-navbox .rkk-navcancel {
  margin-top: 16px;
  background: #2d333b;
  color: #fffafa;
}

.rkk .rkk-navbox .rkk-navcancel:hover {
  border-color: #444c56;
  background: #444c56;
  color: #fff;
}

.rkk .rkk-navico {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

@media (min-width: 769px) {
  .rkk .rkk-popup {
    max-width: 345px;
  }

  .rkk .rkk-popup .mapboxgl-popup-content {
    width: 345px;
    max-width: 345px;
    padding: 0 0 8px;
  }

  .rkk .rkk-pimg {
    height: 193px;
  }

  .rkk .rkk-pp {
    gap: 4px;
    padding: 4px 7px;
    font-size: 11px;
    cursor: help;
  }

  .rkk .rkk-pp i {
    font-size: 11px;
  }

  .rkk .rkk-pp-bar {
    padding: 10px 12px 8px;
  }

  .rkk .rkk-pp-row {
    gap: 6px;
  }

  .rkk .rkk-pbody {
    padding: 10px 14px 2px;
  }

  .rkk .rkk-ptitle {
    font-size: 17px;
  }

  .rkk .rkk-ploc {
    font-size: 13px;
  }

  .rkk .rkk-pmeta {
    font-size: 12px;
  }

  .rkk .rkk-ptag {
    padding: 3px 7px;
    font-size: 11px;
  }

  .rkk .rkk-ptags.is-open {
    max-height: 130px;
  }

  .rkk .rkk-pdesc {
    font-size: 14px;
    max-height: 7em;
    overflow: auto;
  }

  .rkk .rkk-credit {
    max-width: 300px;
    padding: 12px 14px;
    font-size: 12px;
  }

  .rkk .rkk-pi {
    width: 44px;
    height: 44px;
  }

  .rkk .rkk-pi i {
    font-size: 18px;
  }

  .rkk .rkk-pbtn {
    width: 26px;
    height: 26px;
  }

  .rkk .rkk-pbtn i {
    font-size: 14px;
  }

  .rkk .rkk-pinfo {
    width: 20px;
    height: 20px;
  }

  .rkk .rkk-pinfo i {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .rkk .rkk-popup {
    max-width: 230px;
  }

  .rkk .rkk-popup .mapboxgl-popup-content {
    width: 230px;
    max-width: 230px;
    padding: 0 0 8px;
    font-size: 12px;
  }

  .rkk .rkk-pimg {
    height: 137px;
  }

  .rkk .rkk-pp {
    gap: 2px;
    padding: 2px 5px;
    font-size: 8px;
  }

  .rkk .rkk-pp i {
    font-size: 8px;
  }

  .rkk .rkk-pp-bar {
    padding: 5px 6px 3px;
  }

  .rkk .rkk-pp-row {
    gap: 2px;
  }

  .rkk .rkk-pbody {
    padding: 10px 8px 2px;
  }

  .rkk .rkk-ptitle {
    font-size: 13px;
  }

  .rkk .rkk-ploc {
    font-size: 10px;
  }

  .rkk .rkk-pmeta,
  .rkk .rkk-ptoggle {
    font-size: 10px;
  }

  .rkk .rkk-ptag {
    padding: 2px 5px;
    font-size: 9px;
  }

  .rkk .rkk-ptags.is-open {
    max-height: 92px;
  }

  .rkk .rkk-ptw {
    margin-top: 2px;
  }

  .rkk .rkk-pmore {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 7px 0 9px;
    color: var(--rkk-primary);
    font-size: 12px;
    font-weight: 700;
  }

  .rkk .rkk-pmore i {
    font-size: 10px;
    transition: transform 0.2s;
  }

  .rkk .rkk-pmore.is-open i {
    transform: rotate(180deg);
  }

  .rkk .rkk-pmorewrap {
    display: none;
  }

  .rkk .rkk-pmorewrap.is-open {
    display: block;
  }

  .rkk .rkk-credit {
    width: 206px;
    max-width: min(88vw, 206px);
    padding: 8px 9px 7px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.32);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 9px;
    line-height: 1.38;
  }

  .rkk .rkk-credit-title {
    margin-bottom: 4px;
    font-size: 8px;
    letter-spacing: 0.07em;
  }

  .rkk .rkk-credit-main {
    font-size: 9.5px;
    line-height: 1.35;
  }

  .rkk .rkk-credit-empty {
    font-size: 9px;
  }

  .rkk .rkk-pi {
    width: 32px;
    height: 32px;
  }

  .rkk .rkk-pi i {
    font-size: 14px;
  }

  .rkk .rkk-pi-svg {
    width: 20px;
    height: 20px;
  }

  .rkk .rkk-pi-lens {
    width: 22px;
    height: 22px;
  }

  .rkk .rkk-pi-g {
    width: 18px;
    height: 18px;
  }
}

/* --- Mobil och surfplatta i stående läge ------------------------------------------ */

@media (max-width: 899px) {
  html body div.rkk[data-rkk] {
    margin-top: 0.75rem !important;
    margin-bottom: 1.25rem !important;
  }

  .rkk .rkk-shell {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .rkk .rkk-side {
    z-index: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rkk-line);
  }

  .rkk .rkk-search {
    z-index: 5;
  }

  .rkk .rkk-search {
    padding: 16px 10px 18px;
  }

  .rkk .rkk-search-icon {
    left: 23px;
    top: 26px;
  }

  .rkk .rkk-q-clear {
    right: 18px;
    top: 18px;
  }

  .rkk .rkk-results {
    left: 10px;
    right: 10px;
  }

  .rkk .rkk-suggest {
    max-height: min(280px, 46dvh);
    overflow: auto;
    overflow-anchor: none;
  }

  .rkk:not(.is-sheet-open) .rkk-tab.is-active {
    border-bottom-color: transparent;
    color: var(--rkk-text);
  }

  .rkk .rkk-tab {
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    padding: 10px 4px;
    color: var(--rkk-text);
    font-weight: 700;
  }

  .rkk .rkk-tab i {
    font-size: 14px;
  }

  .rkk .rkk-tab .rkk-badge {
    position: static;
  }

  .rkk .rkk-mapwrap {
    height: 72vh;
    height: 72svh;
    min-height: 420px;
  }

  .rkk:fullscreen .rkk-mapwrap {
    flex: 1;
    height: auto;
  }

  .rkk .rkk-panes {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100001;
    max-height: 82vh;
    max-height: 82dvh;
    overflow-anchor: none;
    padding: 0 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.25);
    transform: translateY(105%);
    transition: transform 0.22s ease;
    visibility: hidden;
  }

  .rkk.is-sheet-open .rkk-panes {
    transform: none;
    visibility: visible;
  }

  .rkk.is-sheet-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.35);
  }

  .rkk .rkk-sheet-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -14px 6px;
    padding: 16px 14px 8px;
    background: #fff;
  }

  .rkk .rkk-sheet-grip {
    position: absolute;
    left: 50%;
    top: 6px;
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #cbd5e1;
    transform: translateX(-50%);
  }

  .rkk .rkk-sheet-title {
    font-size: 16px;
  }

  .rkk .rkk-sheet-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--rkk-soft);
  }

  .rkk .rkk-enlarge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
    font-size: 13.5px;
    font-weight: 600;
  }

  .rkk .mapboxgl-ctrl-group:has(.mapboxgl-ctrl-fullscreen) {
    display: none;
  }


  .rkk .rkk-distance {
    top: 56px;
  }

  .rkk .rkk-toast {
    bottom: 16px;
  }
}

/* iPhone zoomar in om ett fält är under 16 px. Gäller sök, ort och övriga fält. */
@media (pointer: coarse) {
  .rkk select,
  .rkk input[type="text"],
  .rkk input[type="search"],
  .rkk textarea,
  .rkk .rkk-search .rkk-q {
    font-size: 16px;
  }

  .rkk .rkk-suggest button:hover {
    background: transparent;
  }
}

/* Liggande telefon är bredare än panelbrytpunkten men ska ändå kunna förstora kartan. */
@media (pointer: coarse) and (min-width: 900px) and (max-width: 940px) {
  .rkk .rkk-enlarge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
    font-size: 13.5px;
    font-weight: 600;
  }

  .rkk .mapboxgl-ctrl-group:has(.mapboxgl-ctrl-fullscreen) {
    display: none;
  }
}

@media (max-width: 380px) {
  .rkk .rkk-cats {
    grid-template-columns: 1fr;
  }

  .rkk .rkk-quick {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rkk .rkk-panes {
    transition: none;
  }
}

@media print {
  .rkk {
    display: none;
  }
}
