@import url('https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@700&display=swap');

.inter { font-family: 'Inter', sans-serif; }
/* Ensure pages follow theme tokens for background/foreground */
html, body { background: var(--background); color: var(--foreground); }
.header-inner input::placeholder,
.header-inner input::-webkit-input-placeholder,
.header-inner input::-moz-placeholder,
.header-inner input:-ms-input-placeholder,
.header-inner input::-ms-input-placeholder {
  color: var(--color-muted-foreground, #9ca3af);
  opacity: 1;
}
/* Force left alignment and normal weight on header input */
.header-inner input { text-align: left; font-weight: 400; color: var(--foreground); }
.header-inner input:focus { outline: 2px solid #60a5fa; }
/* Interactive menu layout tweaks */
.min-w-\[240px\] { min-width: 240px; }
.min-w-\[320px\] { min-width: 320px; }
.min-w-\[200px\] { min-width: 200px; }
.max-w-\[620px\] { max-width: 620px; }
.max-w-\[312px\] { max-width: 312px; }
.max-w-\[1400px\] { max-width: 1400px; }
.max-w-\[80vw\] { max-width: 80vw; }
.max-h-\[60vh\] { max-height: 60vh; }
.focus\:outline-none:focus { outline: none; }
.focus-visible\:ring-2:focus-visible { box-shadow: 0 0 0 2px rgba(59,130,246,0.6); }
.focus-visible\:ring-blue-500:focus-visible { box-shadow: 0 0 0 2px rgba(59,130,246,0.6); }

/* MapLibre control padding from screen edge */
.maplibregl-ctrl-top-right { right: 16px; top: 12px; }
.maplibregl-ctrl-top-left { left: 16px; top: 12px; }
.maplibregl-ctrl-bottom-right { right: 12px; bottom: 12px; }
.maplibregl-ctrl-bottom-left { left: 12px; bottom: 12px; }
/* Reserve space at bottom-left for the floating map actions panel so it doesn't overlap Interactive Maps button */
.map-floating-gap { height: 40px; width: 1px; position: absolute; left: 0; bottom: 0; }

/* When sidebar is open, add right margin to controls so they don't overlap */
/* Shift controls when a left list is visible (w-100 = 25rem) */
.has-leftlist .maplibregl-ctrl-top-left,
.has-leftlist .maplibregl-ctrl-bottom-left { left: 400px; }

/* Custom widths used by layout */
.w-100 { width: 25rem; }
.w-100i { width: calc(25rem - 6px); }
.w-80 { width: 20rem; }
.w-50 { width: 12.5rem; }
.header-inner { padding-left: 16px; padding-right: 16px; }
/* Ensure the filters bar does not cause page height overflow; map area flexes beneath */
.filters-bar { position: relative; z-index: 100; }

/* Ensure header search remains clickable; don't block pointer events */
.header-inner { pointer-events: auto; }
/* Ensure nothing overlays the header input */
.header-inner input { position: relative; z-index: 2001; }

/* Nudge controls down when mobile topbar is present */
.has-topbar .maplibregl-ctrl-top-right { top: 84px; }

@media (min-width: 769px) {
  .has-topbar .maplibregl-ctrl-top-right { top: 12px; }
}

/* Ensure custom fullscreen icon has good contrast */
.maplibregl-ctrl-top-right .maplibregl-ctrl-group > button svg {
  color: var(--foreground);
  fill: currentColor;
}

/* Ensure borders follow shadcn theme tokens, not Tailwind CDN defaults */
*, ::before, ::after { border-color: var(--border); }

/* MapLibre popup readability */
.maplibregl-popup-content { color: var(--foreground); }
.maplibregl-popup-content strong { color: var(--foreground); }

/* Mobile safe areas */
.safe-top { padding-top: env(safe-area-inset-top); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
.safe-left { padding-left: env(safe-area-inset-left); }
.safe-right { padding-right: env(safe-area-inset-right); }

/* Mobile drawer panel animation */
.drawer-panel { width: 80vw; transform: translateX(100%); transition: transform 220ms ease; }

/* Header avatar dropdown */
.menu-panel { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 0.5rem; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05); }
.menu-item { display: block; padding: 0.5rem 0.75rem; font-size: 0.875rem; border-radius: 0.375rem; color: #111827; }
.menu-item:hover, .menu-item:focus-visible { background: #e5e7eb; }

/* Rely on Tailwind/shadcn variables for theming; avoid forcing system dark */
