@use '../../../../shared/styles/variables' as *;

.device-map-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 90;

  background: $color-backdrop-soft;
  backdrop-filter: blur(2px);

  animation: deviceMapModalOverlayShow 0.18s ease;
}

.device-map-modal {
  position: fixed;
  z-index: 100;
  inset: 24px;

  padding: 24px;
  border: 1px solid $color-border-muted;
  border-radius: 24px;
  background: $color-surface;

  display: flex;
  flex-direction: column;
  gap: 18px;

  box-shadow: $shadow-modal-strong;
  animation: deviceMapModalShow 0.2s ease;
}

.device-map-modal__header {
  flex: 0 0 auto;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.device-map-modal__title {
  margin: 0;

  color: $color-text-heading;
  font-size: 24px;
  font-weight: 650;
}

.device-map-modal__description {
  margin: 4px 0 0;

  color: $color-text-muted;
  font-size: 15px;
  font-weight: 500;
}

.device-map-modal__close {
  width: 40px;
  height: 40px;

  border: none;
  border-radius: 12px;
  background: $color-surface-muted;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: $color-text-muted;
  cursor: pointer;
  transition: 0.2s ease;

  &:hover {
    color: $color-primary;
    background: $color-surface-hover;
  }
}

.device-map-modal__body {
  flex: 1;
  min-height: 0;

  .device-map {
    height: 100%;
    min-height: 0;
    background: transparent;
  }

  .device-map__container {
    height: 100%;
    min-height: 0;
  }

  .device-map__leaflet {
    min-height: 0;
    height: 100%;
  }
}

@keyframes deviceMapModalOverlayShow {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes deviceMapModalShow {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
