// Tooltips

$tooltip-inner-color: var(--mdb-surface-inverted-color) !default;
$tooltip-inner-padding-y: 6px;
$tooltip-inner-padding-x: 16px;
$tooltip-inner-font-size: 14px;
$tooltip-inner-background-color: var(--mdb-surface-inverted-bg) !default;
$tooltip-inner-border-radius: 0.25rem;

.vector-map {
  overflow: hidden;
  position: relative;

  div {
    max-width: 100%;
    overflow: hidden;
  }

  svg {
    fill: white;
    cursor: pointer;
    transform-box: fill-box;

    path {
      transition: fill 0.2s ease-out;
    }
  }

  &-toolbar {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;

    .btn {
      margin: 0.4rem;
    }
  }

  &-tooltip {
    background-color: $tooltip-inner-background-color;
    border-radius: $tooltip-inner-border-radius;
    padding: $tooltip-inner-padding-y $tooltip-inner-padding-x;
    font-size: $tooltip-inner-font-size;
    pointer-events: none;
    color: $tooltip-inner-color;
    opacity: 0;
    transition: opacity 0.2s ease-out;
    text-align: center;

    &.show {
      opacity: 1;
    }

    @media (pointer: coarse) {
      &.show {
        opacity: 0;
      }
    }
  }

  &-dragged {
    svg {
      cursor: crosshair;
    }

    .vector-map-tooltip.show {
      opacity: 0;
    }
  }

  &-legend {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-left: 0;

    &__item {
      display: flex;
      align-items: center;
    }

    &__color {
      width: 40px;
      height: 20px;
    }
  }

  &-marker {
    &:focus,
    path:focus {
      outline: none;
    }

    .pin-inner-circle {
      pointer-events: none;
    }
  }

  .animated-circle {
    pointer-events: none;
  }
}
