.map-provider-host {
  position: relative;
  overflow: hidden;
  min-width: 0;
  isolation: isolate;
  background: #102238;
}

.map-provider-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-provider-canvas > .maplibregl-map,
.map-provider-canvas > ymaps,
.map-provider-canvas > ymaps > ymaps {
  width: 100% !important;
  height: 100% !important;
}

.map-provider-toolbar {
  position: absolute;
  z-index: 12;
  top: 10px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 150px);
  transform: translateX(-50%);
  pointer-events: none;
}

.map-provider-toggle,
.map-provider-geolocate,
.map-provider-status {
  pointer-events: auto;
}

.map-provider-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 12px;
  background: rgba(8, 20, 34, .9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
  backdrop-filter: blur(12px);
}

.map-provider-toggle button,
.map-provider-geolocate {
  min-height: 31px;
  border: 0;
  border-radius: 9px;
  color: #d7e5f4;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.map-provider-toggle button {
  padding: 6px 10px;
}

.map-provider-toggle button:hover:not(:disabled),
.map-provider-toggle button.active {
  color: #07101c;
  background: #8cff7a;
}

.map-provider-toggle button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.map-provider-geolocate {
  flex: 0 0 36px;
  width: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(8, 20, 34, .9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  font-size: 20px;
  backdrop-filter: blur(12px);
}

.map-provider-geolocate:hover,
.map-provider-geolocate.busy {
  color: #07101c;
  background: #8cff7a;
}

.map-provider-geolocate.busy {
  animation: mapProviderPulse 1s ease-in-out infinite alternate;
}

.map-provider-status {
  display: none;
  overflow: hidden;
  min-width: 0;
  max-width: 260px;
  padding: 7px 10px;
  border: 1px solid rgba(53, 215, 255, .32);
  border-radius: 10px;
  color: #d7f8ff;
  background: rgba(8, 20, 34, .9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.map-provider-status:not(:empty) {
  display: block;
}

.map-provider-status.error {
  color: #ffe2a8;
  border-color: rgba(255, 194, 89, .38);
}

.map-provider-loading .map-provider-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(8, 20, 34, .18), rgba(53, 215, 255, .12), rgba(8, 20, 34, .18));
  background-size: 220% 100%;
  animation: mapProviderLoading 1.2s linear infinite;
  pointer-events: none;
}

@keyframes mapProviderLoading {
  to { background-position: -220% 0; }
}

@keyframes mapProviderPulse {
  to { transform: scale(1.06); }
}

@media (max-width: 680px) {
  .map-provider-toolbar {
    top: 8px;
    gap: 5px;
    max-width: calc(100% - 92px);
  }

  .map-provider-toggle button {
    padding-inline: 8px;
    font-size: 11px;
  }

  .map-provider-status {
    display: none !important;
  }
}
