@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Pretendard-Regular.otf') format('opentype');
}

@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Pretendard-Medium.otf') format('opentype');
}

@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Pretendard-SemiBold.otf') format('opentype');
}

@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('/fonts/Pretendard-Bold.otf') format('opentype');
}

:root {
  font-family:
    Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light dark;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}
.map-app {
  --text-strong: #000;
  --marker-background: #fff;
  --marker-text: #000;
  --marker-stroke: #808080;
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #eef1ea;
  color: var(--text-strong);
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.map-app img {
  user-select: none;
  -webkit-user-drag: none;
}

.map-host,
.map-loading,
.map-error,
.naver-map {
  position: absolute;
  inset: 0;
}

.map-host {
  z-index: 0;
}

.map-error {
  display: grid;
  place-items: center;
  background: #fff;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  z-index: 0;
}

.map-loading {
  background: #fff;
  z-index: 2;
  touch-action: none;
}

.naver-map {
  width: 100%;
  height: 100%;
  opacity: 0;
  touch-action: none;
  transition: opacity 160ms ease;
}

.naver-map[data-status='ready'] {
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  .map-app {
    --marker-background: #323232;
    --marker-text: #fff;
  }

  .map-loading {
    background: #323232;
  }

  .map-error {
    background: #323232;
    color: #fff;
  }

  .naver-map[data-status='ready'] img:not(.price-marker img) {
    filter: invert(0.9) hue-rotate(180deg) saturate(0.78) brightness(0.9);
  }
}

.station-marker-host {
  display: inline-flex;
  width: max-content;
  height: 30px;
  pointer-events: none;
}

.price-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 30px;
  height: 30px;
  padding: 6px 8px;
  gap: 6px;
  border: 1px solid var(--marker-stroke);
  border-radius: 4px;
  background: var(--marker-background);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  color: var(--marker-text);
  cursor: pointer;
  font-family: Pretendard, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 16px;
  transition:
    width 180ms ease,
    padding 180ms ease,
    gap 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
  pointer-events: auto;
}

.price-marker[data-selected='true'] {
  z-index: 3;
}

.price-marker:focus-visible {
  outline: 3px solid rgba(68, 140, 255, 0.8);
  outline-offset: 3px;
}

.price-marker[data-compact='true'] {
  width: 30px;
  padding: 6px;
  gap: 0;
}

.marker-brand,
.marker-fuel,
.marker-price {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 16px;
  white-space: nowrap;
}

.marker-brand img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.marker-divider {
  width: 1px;
  height: 12px;
  background: #acacac;
  flex: 0 0 1px;
}

.price-marker[data-compact='true'] .marker-fuel {
  letter-spacing: -0.65px;
}

.best-badge {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 4px;
  background: #fd4545;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  pointer-events: none;
}

.price-marker[data-compact='true'][data-selected='false'] {
  border-color: var(--marker-stroke);
}

.price-marker[data-compact='true'] .best-badge {
  display: none;
}

.price-marker[data-compact='true'][data-lowest='true'] {
  border-color: #fd4545;
}

.current-location {
  position: relative;
  width: 24px;
  height: 24px;
  filter: none;
}

.current-location::before {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(44, 126, 255, 0.22);
  box-shadow: 0 0 8px rgba(44, 126, 255, 0.5);
  content: '';
}

.current-location::after {
  position: absolute;
  inset: 4px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2377ff;
  content: '';
}
