html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
}

@media (prefers-color-scheme: dark) {
  body {
    background: #0B1224;
  }
}

.root {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Fleetbase-like vertical map toolbar (left stack) */
.maplibregl-ctrl-top-left,
.maplibregl-ctrl-top-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px !important;
}

.maplibregl-ctrl-top-left .maplibregl-ctrl,
.maplibregl-ctrl-top-right .maplibregl-ctrl {
  margin: 0 !important;
}

.maplibregl-ctrl-group {
  background: rgba(26, 34, 45, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden;
}

.maplibregl-ctrl-group button {
  width: 36px !important;
  height: 36px !important;
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Native MapLibre icons (zoom etc.) — dark SVG on light bg → invert for dark toolbar */
.maplibregl-ctrl-group button > .maplibregl-ctrl-icon {
  filter: invert(1) brightness(1.15);
}

/* Custom buttons (MUI icons as children) — white, no invert */
.maplibregl-ctrl-group button.maplibregl-ctrl-icon {
  filter: none !important;
  color: #ffffff !important;
}

.maplibregl-ctrl-group button.maplibregl-ctrl-icon svg {
  fill: currentColor;
  color: inherit;
}

.maplibregl-ctrl-attrib {
  opacity: 0.7;
}

.yk-home-map {
  position: relative;
  width: 100%;
  height: 100%;
}

.yk-home-map .maplibregl-ctrl-bottom-left {
  display: none;
}

@media (min-width: 640px) {
  .yk-home-map .maplibregl-ctrl-bottom-left {
    display: block;
    top: 0.75em;
    bottom: auto;
    left: 0.75em;
  }
}

@media (min-width: 1024px) {
  .yk-home-map .maplibregl-ctrl-bottom-left {
    top: 1em;
    left: 1em;
  }
}

.yk-home-map .maplibregl-ctrl-scale {
  background: #ffffff !important;
  color: #3B4A6B !important;
  border: 0 !important;
  border-radius: 0.5em !important;
  font-family: "Manrope", -apple-system, Roboto, sans-serif !important;
  font-size: 0.75em !important;
  font-weight: 700 !important;
  box-shadow: 0 0.125em 0.5em rgba(11, 31, 75, 0.08);
}

@media print {
  * {
    height: auto !important;
    overflow: visible !important;
  }
}
