@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #f3f7f4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #c1ecd4;
  color: #012d1d;
}

:focus-visible {
  outline: 3px solid rgba(27, 67, 50, 0.35);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.nav-link {
  display: flex;
  min-height: 44px;
  flex-shrink: 0;
  align-items: center;
  border-radius: 9999px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #191c1d;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-link:hover {
  background: #f0f7f3;
  color: #143528;
}

/* ------------------------------------------------------------------ */
/* Account dialog                                                     */
/* ------------------------------------------------------------------ */
.auth-dialog {
  width: min(92vw, 480px);
  max-width: 480px;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.auth-dialog::backdrop {
  background: rgba(1, 45, 29, 0.5);
  backdrop-filter: blur(3px);
}

.auth-dialog[open] {
  animation: dialog-in 180ms ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ------------------------------------------------------------------ */
/* Map                                                                */
/* ------------------------------------------------------------------ */
.map-gas-pin {
  appearance: none;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  border-radius: 9999px;
  background: #5e3000;
  padding: 3px 9px;
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(1, 45, 29, 0.32);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.map-gas-pin:hover {
  transform: translateY(-1px);
}

.map-gas-pin.is-selected {
  box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.35), 0 1px 4px rgba(1, 45, 29, 0.3);
}

.map-user-dot {
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 9999px;
  background: #1f6feb;
  box-shadow: 0 0 0 6px rgba(31, 111, 235, 0.25);
}

.map-place-pin {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  transform: rotate(-45deg);
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 4px;
  background: #1b4332;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(1, 45, 29, 0.32);
}

.map-place-pin svg {
  transform: rotate(45deg);
}

.maplibregl-ctrl-attrib {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.maplibregl-ctrl-attrib a {
  color: #414844;
}

.maplibregl-ctrl-group {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(1, 45, 29, 0.14);
}

.maplibregl-popup-content {
  border-radius: 10px;
  padding: 8px 10px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #191c1d;
}

/* ------------------------------------------------------------------ */
/* Placeholder / loading styles                                       */
/* ------------------------------------------------------------------ */
.photo-fallback {
  background:
    radial-gradient(circle at 20% 20%, rgba(193, 236, 212, 0.9), transparent 42%),
    radial-gradient(circle at 80% 30%, rgba(255, 241, 220, 0.9), transparent 38%),
    linear-gradient(135deg, #eaf1ed 0%, #f8f9fa 48%, #fff7ed 100%);
}

.skeleton {
  background: linear-gradient(
    90deg,
    #e5eee8 25%,
    #f4f8f5 37%,
    #e5eee8 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
