/* =====================================================================
   base.css – ainus käsitsi kirjutatud CSS. EI OLE ehitatav, seda ei pea
   kunagi uuesti genereerima. Kogu ülejäänud kujundus on Tailwindi
   utiliitklassid (Play CDN, vt views/layout.php).

   Siin on ainult see, mida utiliitklassidega teha ei saa:
   1) kohalikud fondid (@font-face)
   2) teema värvimuutujad (--surface / --ink), et leht ei välgutaks enne Tailwindi laadimist
   3) MapLibre kolmanda osapoole kontrollide ülekirjutus
   ===================================================================== */

/* ---------- fondid (kohalikud, latin + latin-ext; Eesti tähed vajavad latin-exti) ---------- */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/barlow-latin-ext-400-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/barlow-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/barlow-latin-ext-500-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/barlow-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/barlow-latin-ext-600-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/barlow-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/barlow-condensed-latin-ext-700-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- teema ---------- */
:root { --surface: 255 255 255; --ink: 15 27 45; color-scheme: light; }
.dark { --surface: 19 25 34; --ink: 230 236 243; color-scheme: dark; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: rgb(var(--surface)); color: rgb(var(--ink)); }
button { touch-action: manipulation; }
:focus-visible { outline: 2px solid rgb(var(--ink) / .55); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- MapLibre kontrollid samas keeles ---------- */
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right { bottom: calc(4.75rem + env(safe-area-inset-bottom)) !important; }
.maplibregl-ctrl-group {
  background: rgb(var(--surface) / .9) !important; border-radius: 9999px !important;
  box-shadow: 0 10px 25px -5px rgb(var(--ink) / .12), 0 0 0 1px rgb(var(--ink) / .1) !important;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); overflow: hidden;
}
.maplibregl-ctrl-group button { width: 2.5rem !important; height: 2.5rem !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid rgb(var(--ink) / .08) !important; }
.maplibregl-ctrl-group button:hover { background: rgb(var(--ink) / .06) !important; }
.dark .maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1); }
.dark .maplibregl-ctrl-attrib { background: rgb(var(--surface) / .7) !important; color: rgb(var(--ink) / .7); }
.dark .maplibregl-ctrl-attrib a { color: inherit; }
