.loader {
  display: inline-block;
  position: absolute;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 99;
  width: 100%;
  height: 100%;
  &.day, &.appointment {
    .loading {
      left: calc(50% - 20px);
      top: calc(50% - 20px);
      div {
        width: 8px;
        height: 8px;

        &:nth-child(1) {
          top: 4px;
          left: 4px;
        }
        &:nth-child(2) {
          top: 4px;
          left: 16px;
        }
        &:nth-child(3) {
          top: 4px;
          left: 28px;
        }
        &:nth-child(4) {
          top: 16px;
          left: 4px;
        }
        &:nth-child(5) {
          top: 16px;
          left: 16px;
        }
        &:nth-child(6) {
          top: 16px;
          left: 28px;
        }
        &:nth-child(7) {
          top: 28px;
          left: 4px;
        }
        &:nth-child(8) {
          top: 28px;
          left: 16px;
        }
        &:nth-child(9) {
          top: 28px;
          left: 28px;
        }
      }
    }
  }
  &.day {
    position: relative;
    height: 105px;
    left: 0;
    background-color: $white;
    border: solid 1px $border-color;
    z-index: 1;
  }
  &.appointment{
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: $white;
  }
  .loading {
    position: relative;
    left: calc(50% - 40px);
    top: calc(50% - 40px);
    div {
      position: absolute;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: $base-color;
      animation: loader 1.2s linear infinite;
      &:nth-child(1) {
        top: 8px;
        left: 8px;
        animation-delay: 0s;
      }
      &:nth-child(2) {
        top: 8px;
        left: 32px;
        animation-delay: -0.4s;
      }
      &:nth-child(3) {
        top: 8px;
        left: 56px;
        animation-delay: -0.8s;
      }
      &:nth-child(4) {
        top: 32px;
        left: 8px;
        animation-delay: -0.4s;
      }
      &:nth-child(5) {
        top: 32px;
        left: 32px;
        animation-delay: -0.8s;
      }
      &:nth-child(6) {
        top: 32px;
        left: 56px;
        animation-delay: -1.2s;
      }
      &:nth-child(7) {
        top: 56px;
        left: 8px;
        animation-delay: -0.8s;
      }
      &:nth-child(8) {
        top: 56px;
        left: 32px;
        animation-delay: -1.2s;
      }
      &:nth-child(9) {
        top: 56px;
        left: 56px;
        animation-delay: -1.6s;
      }
    }
  }
}
@keyframes loader {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
