@import '@/sass/style.scss';

.Map {
  background-color: $very-soft-green;
  height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;

  .zoom-controller {
    @include z-layer-3;
    display: flex;
    left: 20px;
    position: absolute;
    top: 12px;

    li {
      &:nth-child(1) {
        button {
          border-radius: 10px 0 0 10px;
        }
      }

      &:nth-child(2) {
        button {
          border-radius: 0 10px 10px 0;
          transform: translateX(-3px);
        }
      }

      button {
        background-color: $very-soft-green;
        color: $mostly-black-green;
        display: block;
        font-size: 32px;
        font-weight: bold;
        height: 48px;
        line-height: 0;
        transition: background-color 200ms;
        width: 48px;

        &:disabled {
          background-color: $soft-green;

          &::after {
            border: solid 3px $mostly-black-green;
          }
        }

        &::after {
          @include z-layer-2;
          border-radius: 10px;
          border: solid 3px transparent;
          content: '';
          display: block;
          height: 44px;
          left: -1px;
          position: absolute;
          top: -1px;
          transition: border 200ms;
          width: 44px;
        }
      }
    }
  }

  .position-controller {
    background-color: transparent;
    height: inherit;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    @include z-layer-2;
  }

  .map-container {
    @include z-layer-2;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: fit-content;

    .map-image,
    .map-image--in,
    .map-image--out {
      display: block;
      height: auto;
    }

    .map-image--in {
      width: 223.611vw;
    }

    .map-image--out {
      width: 131.944vw;
    }

    .room-pin,
    .room-pin--selected,
    .item-pin {
      @include z-layer-3;
      left: 0;
      position: absolute;
      top: 0;
      transform: translate(-50%, -50%);

      button {
        background-color: $very-light-pink;
        border-radius: 50%;
        border: solid 2px $very-dark-green;
        display: block;
        height: 36px;
        pointer-events: initial;
        position: relative;
        width: 36px;

        svg {
          display: block;
          fill: $mostly-black;
          height: auto;
          width: 100%;
        }
      }

      a {
        align-items: center;
        background-color: $very-dark-green;
        border-radius: 50%;
        color: $very-soft-green;
        display: flex;
        font-size: 20px;
        font-weight: bold;
        height: 36px;
        justify-content: center;
        letter-spacing: -0.8px;
        line-height: 1;
        pointer-events: initial;
        position: relative;
        width: 36px;
      }

      .pin-label {
        @include z-layer-2;
        background-color: $very-dark-yellowish-green;
        border-radius: 32px;
        border: solid 2px $very-dark-olive;
        color: $very-soft-green;
        font-size: 16px;
        font-weight: 700;
        left: 50%;
        line-height: 1;
        opacity: 0;
        padding: 12px;
        position: absolute;
        top: 16px;
        transform: translateX(-50%) translateY(-100%);
        transition: opacity 200ms, top 200ms;
        white-space: nowrap;

        .triangle {
          @include z-layer-1;
          bottom: 1px;
          display: block;
          left: 50%;
          position: absolute;
          transform: translateX(-50%) translateY(100%);
          width: 24px;

          svg {
            @include svg-block-by-width;
          }
        }
      }
    }

    .room-pin--selected {
      @include z-layer-4;

      .pin-label {
        opacity: 1;
        top: -8px;
      }
    }
  }
}
