/* The decaf coffee map at /koffeinfri/ (scripts/build-koffeinfri.mjs writes the page). Its own look,
   not the front page's. */
:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e7e0d6;
  --accent: #7c4a2d;
  --open: #15803d;
  --closed: #94a3b8;
  --star: #d97706;
  --star-off: #a3968a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16120f;
    --card: #211b17;
    --text: #ede7df;
    --muted: #a8a29e;
    --line: #3a312a;
    --accent: #e0b48a;
    --open: #4ade80;
    --closed: #78716c;
    --star: #fbbf24;
    --star-off: #7a6d62;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.top { font-size: 0.9rem; }
a { color: var(--accent); }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 1.2rem 0 0.4rem; }
.lead { color: var(--muted); margin: 0 0 1.2rem; max-width: 46rem; }
#map {
  height: clamp(320px, 60vh, 560px);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}
/* Shown over the map for a moment when a plain scroll passes over it (kort.js, wheelZoom). The
   words sit on a dark pill of their own, so they read the same over the map and over an open
   café's white popup (Thomas, 2026-10-31: it had no background and looked wrong over a popup).
   The film over the map only says the map did not take the scroll. Its state class is "visible",
   never "show": that is the "Vis på kortet" button's class below, whose background: none and
   underline took over the hint whenever it appeared. */
.zoomhint {
  position: absolute;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.12);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.zoomhint span {
  max-width: 100%;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: rgba(30, 23, 18, 0.92);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font: 600 1rem/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: center;
}
.zoomhint.visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .zoomhint { transition: none; } }
.mapbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: 0.6rem 0 1.5rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; font-size: 0.85rem; color: var(--muted); margin: 0; }
.locate {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 1rem;
  cursor: pointer;
}
.locate:hover { border-color: var(--accent); }
.locate:disabled { opacity: 0.6; cursor: progress; }
.located { flex-basis: 100%; margin: 0; font-size: 0.92rem; color: var(--muted); }
.located:empty { display: none; }
.dist { margin: 0.15rem 0 0; font-size: 0.92rem; color: var(--muted); }
.you { font-size: 30px; line-height: 32px; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: -0.05rem; }
.dot.open { background: var(--open); }
.dot.closed { background: var(--closed); }
.dot.unknown { background: #ffffff; box-shadow: inset 0 0 0 2px var(--closed); }
.places {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.place {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  scroll-margin-top: 16px;
}
.place:target { outline: 2px solid var(--accent); }
.place h2 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.addr { margin: 0; color: var(--muted); font-size: 0.92rem; }
.note { font-style: italic; }
.status { margin: 0.5rem 0 0; font-weight: 600; font-size: 0.92rem; }
.status.open { color: var(--open); }
.status.closed { color: var(--muted); }
.hours { list-style: none; margin: 0.5rem 0 0; padding: 0; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.hours span { display: inline-block; min-width: 5.5rem; color: var(--muted); }
.hours.unknown { color: var(--muted); }
/* One line per vote: the label, five small stars, the average (Thomas, 2026-10-29: "de fylder meget"). */
.rate { margin: 0.6rem 0 0; padding-top: 0.4rem; border-top: 1px solid var(--line); }
.rrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.4rem; }
.rlabel { font-weight: 600; font-size: 0.85rem; min-width: 3.6rem; }
.avg { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.stars { display: flex; }
.stars button {
  font: 1.1rem/1 system-ui, sans-serif;
  width: 26px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--star-off);
  cursor: pointer;
}
.stars button.on { color: var(--star); }
@media (hover: hover) {
  .stars:hover button { color: var(--star); }
  .stars button:hover ~ button { color: var(--star-off); }
}
.stars button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.stars[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.rmsg { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--muted); }
.rmsg:empty { display: none; }
.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.7rem 0 0; font-size: 0.92rem; }
.show {
  font: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}
.noscript { padding: 16px; margin: 0; }
footer { color: var(--muted); font-size: 0.9rem; margin: 2rem 0 1rem; max-width: 46rem; }
.leaflet-popup-content { font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.leaflet-popup-content a { color: #7c4a2d; }
