/* Hallmark · shape: app screen · genre: modern-minimal · theme: Dose (deal 2/3, seed rkiye-akaryak-fiyat-haritas-2fca·4ae10aa4·2026-11-02·r0)
 * nav: top bar, wordmark and the fuel keys · signature: the price tag pin, a pharmacy label in DM Mono, cheapest in solid green · states: loading, empty, error, located, location-off, stale · dose: white
 * axes: light/grotesk-sans/chromatic-green · posture: committed · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4 · weakest: P, a map tool argues little; the argument is that cheap is the only colour, so price buckets are shades of the one green, not a traffic light */
/* Hallmark · waive 26b · no disabled attribute or aria-disabled exists on this screen · every fuel key and sheet control stays enabled, nothing on the map waits on a form */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --bar-h: 112px;
  --sheet-peek: 248px;
  --pin-h: 28px;
  --shadow-pin: 0 1px 2px oklch(30% 0.03 165 / 0.18);
}

html, body { height: 100%; }
body { display: grid; grid-template-rows: auto 1fr; }

/* top bar */
.bar {
  position: relative;
  z-index: 300;
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  padding-top: max(var(--space-sm), env(safe-area-inset-top));
  background: var(--color-paper);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}
.wordmark { max-width: none; font-size: var(--text-lg); line-height: 1.1; }

.fuels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2xs);
  padding: var(--space-2xs);
  border-radius: var(--radius-input);
  background: var(--color-paper-2);
}
.key {
  min-height: 40px;
  border: 0;
  border-radius: calc(var(--radius-input) - 4px);
  background: transparent;
  color: var(--color-ink-2);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.key:hover { color: var(--color-ink); }
.key[aria-checked="true"] {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--glint) 35%, transparent), 0 2px 0 var(--color-accent-deep);
}
.key:active { transform: translateY(1px); }
.key:focus-visible { outline-offset: 1px; }

/* map */
.map { position: relative; z-index: 0; isolation: isolate; min-height: 0; background: var(--color-paper-3); }
.leaflet-container { font-family: var(--font-body); background: var(--color-paper-3); }
.leaflet-control-attribution { font-size: var(--text-xs); }
.leaflet-bottom { bottom: var(--sheet-peek); }

.pin {
  display: inline-flex;
  align-items: center;
  height: var(--pin-h);
  padding: 0 var(--space-xs);
  border-radius: var(--radius-input);
  font: 500 var(--text-sm) / 1 var(--font-outlier);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: var(--shadow-pin);
  transform: translate(-50%, -100%);
  cursor: pointer;
}
.pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  border: 5px solid transparent;
  border-top-color: inherit;
  transform: translateX(-50%);
}
.pin--low { background: var(--color-accent); color: var(--color-accent-ink); border-color: var(--color-accent); }
.pin--mid { background: var(--color-accent-soft); color: var(--color-ink); border-color: var(--color-accent-soft); }
.pin--high { background: var(--color-paper); color: var(--color-ink-2); border-color: var(--color-paper); outline: var(--rule-hair) solid var(--color-rule); }
.pin--selected { outline: 2px solid var(--color-ink); outline-offset: 1px; }
.pin--none {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: var(--radius-pill);
  background: var(--color-muted);
  border: 2px solid var(--color-paper);
  transform: translate(-50%, -50%);
}
.pin--none::after { content: none; }
.me {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  border: 3px solid var(--color-paper);
  box-shadow: 0 0 0 1px var(--color-ink);
  transform: translate(-50%, -50%);
}
.leaflet-div-icon { background: none; border: 0; }

/* notice */
.notice {
  position: fixed;
  z-index: 200;
  top: calc(var(--bar-h) + var(--space-xs));
  left: var(--space-md);
  right: var(--space-md);
  max-width: 28rem;
  margin-inline: auto;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-input);
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--text-sm);
  text-align: center;
}
.notice--static { position: static; margin: var(--space-md); }

/* bottom sheet */
.sheet {
  position: fixed;
  z-index: 250;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 34rem;
  height: min(72dvh, 40rem);
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--color-paper);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: var(--shadow-card);
  transform: translateY(calc(100% - var(--sheet-peek)));
  transition: transform var(--dur-long) var(--ease-out);
}
.sheet[data-open="true"] { transform: translateY(0); }
.sheet__handle {
  display: grid;
  place-items: center;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.sheet__grip { width: 40px; height: 4px; border-radius: var(--radius-pill); background: var(--color-rule); }
.sheet__handle:hover .sheet__grip { background: var(--color-muted); }
.sheet__handle:focus-visible { outline-offset: -2px; }
.sheet__body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--space-md) max(var(--space-md), env(safe-area-inset-bottom));
}
.sheet[data-open="false"] .sheet__body { overflow-y: hidden; }
.sheet__title { font-size: var(--text-lg); }
.sheet__meta { margin-top: var(--space-3xs); color: var(--color-muted); font-size: var(--text-sm); }

.rows { list-style: none; margin: var(--space-xs) 0 0; padding: 0; }
.row { border-top: var(--rule-hair) solid var(--color-rule); }
.row:first-child { border-top: 0; }
.row__btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2xs) var(--space-sm);
  width: 100%;
  min-height: 56px;
  padding: var(--space-xs) 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.row__btn:hover .row__brand { color: var(--color-accent-deep); }
.row__brand { font-weight: 500; transition: color var(--dur-micro) var(--ease-out); }
.row__sub { grid-column: 1; color: var(--color-muted); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__price {
  grid-row: 1 / span 2;
  grid-column: 2;
  font: 500 var(--text-lg) / 1 var(--font-outlier);
  font-variant-numeric: tabular-nums;
}
.row__price--low { color: var(--color-accent-deep); }
.row__price--none { font: 400 var(--text-sm) / 1 var(--font-body); color: var(--color-muted); }
.row--skeleton { height: 56px; background: linear-gradient(var(--color-paper-2), var(--color-paper-2)) 0 50% / 70% 14px no-repeat; }

.state { display: grid; gap: var(--space-sm); justify-items: start; padding: var(--space-md) 0; color: var(--color-ink-2); }

/* detail */
.detail { display: grid; gap: var(--space-sm); padding-bottom: var(--space-md); }
.detail__title { font-size: var(--text-xl); }
.detail__place, .detail__updated { color: var(--color-muted); font-size: var(--text-sm); }
.detail__prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-block: var(--rule-hair) solid var(--color-rule);
}
.detail__prices > div { padding: var(--space-sm) 0 var(--space-sm) var(--space-sm); border-left: var(--rule-hair) solid var(--color-rule); }
.detail__prices > div:first-child { padding-left: 0; border-left: 0; }
.detail__prices dt { font-size: var(--text-sm); color: var(--color-muted); }
.detail__prices dd { margin: var(--space-3xs) 0 0; font: 500 var(--text-xl) / 1.1 var(--font-outlier); font-variant-numeric: tabular-nums; }
.detail__prices dd.is-none { font: 400 var(--text-md) / 1.6 var(--font-body); color: var(--color-muted); }
.detail__prices .is-current dt { color: var(--color-accent-deep); font-weight: 500; }
.detail__note { font-size: var(--text-sm); color: var(--color-ink-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-lg);
  border: 0;
  border-radius: var(--radius-input);
  background: var(--color-paper);
  color: var(--color-ink);
  font: 500 var(--text-md) var(--font-body);
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--glint), 0 0 0 1px var(--color-rule), 0 3px 0 var(--color-rule);
  transition: transform var(--dur-micro) var(--ease-out);
}
.btn:hover { box-shadow: inset 0 1px 0 var(--glint), 0 0 0 1px var(--color-muted), 0 3px 0 var(--color-muted); }
.btn:active { transform: translateY(3px); }
.btn--primary {
  background: linear-gradient(var(--color-accent), var(--color-accent-deep));
  color: var(--color-accent-ink);
  box-shadow: 0 0 0 1px var(--color-accent-deep), 0 3px 0 var(--color-accent-deep);
}
.btn--primary:hover { background: var(--color-accent-deep); box-shadow: 0 0 0 1px var(--color-accent-deep), 0 3px 0 var(--color-ink-2); }
.link-btn {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink-2);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--color-rule);
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.link-btn:hover { text-decoration-color: var(--color-accent); color: var(--color-ink); }

@media (min-width: 60rem) {
  .bar { grid-template-columns: auto minmax(0, 22rem); justify-content: space-between; align-items: center; }
  :root { --bar-h: 68px; }
  .sheet { left: var(--space-md); right: auto; width: 24rem; bottom: var(--space-md); height: auto; max-height: calc(100dvh - var(--bar-h) - var(--space-xl)); border-radius: var(--radius-card); transform: none; }
  .sheet__handle { display: none; }
  .sheet__body { padding-top: var(--space-md); }
  .sheet[data-open="false"] .sheet__body { overflow-y: auto; }
  .leaflet-bottom { bottom: 0; }
}
