/* TOCN Ladepriser v4-kart (test): kartvisning */
.price-view { margin-right: 0.35rem; }
.tm-wrap { margin: 0.25rem 0 1rem; }
.tm-wrap[hidden], .price-list[hidden], .price-sort[hidden] { display: none !important; }
.tm-count { margin: 0 0 0.5rem; font-size: 0.875rem; color: var(--muted, #5c5c5c); }
.tm-map {
  height: 70vh;
  min-height: 360px;
  max-height: 820px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border, #d2d7df);
  overflow: hidden;
  background: #dfe7ea;
  z-index: 0;
}
/* I iFrame med automatisk høyde: unngå vh (ellers vokser rammen i det uendelige) */
.tm-in-frame .tm-map { height: 600px; max-height: none; }
@media (max-width: 600px) {
  .tm-map { height: 68vh; min-height: 340px; border-radius: 10px; }
  .tm-in-frame .tm-map { height: 520px; }
}
.tm-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center;
  margin: 0.5rem 0 0; font-size: 0.8125rem; color: var(--text, #1a1a1a);
}
.tm-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.tm-legend-note { color: var(--tocn-red, #e31937); }
.tm-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 25%); }

/* Fargeskala som timeprisene (grønn/gul/rød), litt sterkere for kart */
.tm-cheap { --tm-bg: #c6efce; --tm-bd: #2e7d32; --tm-fg: #0f3d12; }
.tm-mid { --tm-bg: #ffeb9c; --tm-bd: #b08900; --tm-fg: #4a3a00; }
.tm-expensive { --tm-bg: #ffc7ce; --tm-bd: #c62828; --tm-fg: #5c0b10; }
.tm-missing { --tm-bg: #d9d9d9; --tm-bd: #757575; --tm-fg: #222; }
.tm-dot { background: var(--tm-bg); box-shadow: 0 0 0 2px var(--tm-bd); }

.tm-pin-icon, .tm-cl-icon { background: transparent; border: 0; }
.tm-pin {
  position: relative; display: block; box-sizing: border-box;
  width: 46px; height: 20px; line-height: 16px; text-align: center;
  font: 700 11.5px/16px var(--font, Outfit, system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
  color: var(--tm-fg); background: var(--tm-bg);
  border: 2px solid var(--tm-bd); border-radius: 9999px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 35%);
  white-space: nowrap;
}
.tm-pin::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -5px;
  border: 5px solid transparent; border-bottom: 0; border-top: 5px solid var(--tm-bd);
}
.tm-cl {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 4px solid var(--tm-bd);
  box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
  font: 700 13px/1 var(--font, Outfit, system-ui, sans-serif); color: #1a1a1a;
}
.tm-pop { font-family: var(--font, Outfit, system-ui, sans-serif); }
.tm-pop-name { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.tm-pop-meta { color: var(--muted, #5c5c5c); font-size: 0.8125rem; margin: 0.1rem 0 0.45rem; }
.tm-pop-now { background: var(--tm-bg); border-left: 4px solid var(--tm-bd); padding: 0.3rem 0.5rem; border-radius: 6px; font-size: 0.875rem; }
.tm-pop-range { font-size: 0.8125rem; margin: 0.35rem 0 0.55rem; }
.tm-open {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  background: var(--tocn-red, #e31937); color: #fff;
  font: 600 0.875rem/1 var(--font, Outfit, system-ui, sans-serif);
  padding: 0.55rem 0.8rem; border-radius: 9999px;
}
.tm-open:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(227 25 55 / 35%); }
.leaflet-container { font-family: var(--font, Outfit, system-ui, sans-serif); }
.leaflet-container a.tm-open { color: #fff; }
.tm-locate {
  width: 34px; height: 34px; background: #fff; border: 2px solid rgb(0 0 0 / 20%) !important;
  border-radius: 4px; cursor: pointer; font-size: 20px; line-height: 1; color: #333;
}
.tm-locate.is-busy { opacity: 0.5; }
.tm-card { margin-top: 0.85rem; }
.tm-card:empty { display: none; }
@media print {
  .tm-wrap, .price-view, .tm-map, .leaflet-container { display: none !important; }
}
/* Demper tynne skjøter mellom kartfliser i Chrome (Leaflet #3575) */
.tm-map .leaflet-tile { outline: 1px solid transparent; }
/* Min posisjon (forslag) */
.tm-geo-bar { margin: 0.6rem 0 0; }
.tm-geo-btn {
  appearance: none; border: 1px solid var(--border, #d2d7df); background: #fff; cursor: pointer;
  font: 600 0.875rem/1 var(--font, Outfit, system-ui, sans-serif); color: var(--text, #1a1a1a);
  padding: 0.5rem 0.9rem; border-radius: 9999px;
}
.tm-geo-btn::before { content: "◎ "; color: #1565c0; }
.tm-geo-btn.is-busy, .tm-locate.is-busy { opacity: 0.55; cursor: progress; }
.tm-geo { font-size: 0.875rem; margin-top: 0.45rem; }
.tm-geo:empty { display: none; }
.tm-geo.is-err { color: var(--tocn-red, #e31937); }
.tm-geo-head { font-weight: 700; }
.tm-geo-head span { font-weight: 400; color: var(--muted, #5c5c5c); }
.tm-geo-clear { margin-left: 0.4rem; font: inherit; font-size: 0.8125rem; background: none; border: 0; color: var(--tocn-red, #e31937); text-decoration: underline; cursor: pointer; }
.tm-near { margin: 0.35rem 0 0; padding-left: 1.3rem; }
.tm-near button { all: unset; cursor: pointer; }
.tm-near button:hover b, .tm-near button:focus-visible b { text-decoration: underline; }
.tm-geo-priv { margin: 0.35rem 0 0; font-size: 0.75rem; color: var(--muted, #5c5c5c); }
