.product-location {
  --color-gray: #dfdfdf;
  --color-gray-b: #767676;
  --color-available: #4caf50;
  --color-unavailable: #e01551;

  text-align: left;
  margin: 1rem 0;
}

.product-location__header {
  float: none;
  padding: 0;
  margin-bottom: 0.8rem;

  .product-location__title {
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
  }
}

.product-location__content {
  border: 1px solid var(--color-gray);
  padding: 1rem;
}

.product-location__option {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--color-gray);
  padding: 0.8rem 0;

  &:first-child {
    padding-top: 0;
  }

  &:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  &.option--store {
    cursor: pointer;
  }

  .product-location__icon {
    &.icon--chevron {
      align-self: center;
    }

    svg {
      fill: none;
    }
  }

  .product-location__details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 1rem;

    .product-location__detailsTitle {
      text-align: left;
      font-size: 1rem;
      font-weight: 700;
    }

    .product-location__detailsStatus {
      display: flex;
      align-items: center;
      gap: 0.3rem;

      &::before {
        content: "";
        display: inline-block;
        width: 0.6rem;
        height: 0.6rem;
        border-radius: 50%;
        background-color: var(--color-gray-b);
      }

      &.status--available {
        &::before {
          background-color: var(--color-available);
        }
      }

      &.status--unavailable {
        &::before {
          background-color: var(--color-unavailable);
        }
      }
    }

    .product-location__detailsDescription {
      margin: 0;
      color: var(--color-gray-b);
      font-size: 0.9rem;
    }
  }
}

.location-drawer {
  --header-height: calc(65px + 37px);
  --drawer-width: 100vw;
  --color-gray: #dfdfdf;
  --color-gray-b: #767676;
  --color-available: #4caf50;
  --color-unavailable: #e01551;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  visibility: hidden;
  transition: visibility 0s linear 0.3s;

  &.is-open {
    overflow: hidden;
    visibility: visible;
    transition-delay: 0s;

    .location-drawer__overlay {
      opacity: 1;
    }

    .location-drawer__content {
      right: 0;
    }
  }

  .location-drawer__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
  }

  .location-drawer__content {
    position: absolute;
    top: var(--header-height);
    right: calc(var(--drawer-width) * -1);
    width: var(--drawer-width);
    height: calc(100vh - var(--header-height));
    background-color: #ffffff;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
  }

  @media (min-width: 768px) {
    --header-height: calc(75px + 37px);
    --drawer-width: 60vw;
  }

  @media (min-width: 1024px) {
    --drawer-width: 45vw;
  }

  @media (min-width: 1200px) {
    --drawer-width: 30vw;
  }

  @media (min-width: 1440px) {
    --drawer-width: 28vw;
  }

  @media (min-width: 1920px) {
    --drawer-width: 20vw;
  }
}

.location-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  background-color: #fff;
  padding: 0 1.5rem;

  .location-drawer__title {
    font-size: 1.1rem;
    font-weight: 700;
  }

  .location-drawer__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;

    svg {
      fill: #000;
    }
  }
}

.location-drawer__storeList {
  background-color: #f5f5f5;
  width: 100%;
  height: 100%;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;

  .location-drawer__storeItem {
    background: white;
    border: 1px solid var(--color-gray);
    padding: 1rem;

    .location-drawer__storeAddress {
      font-size: 0.9rem;
      color: var(--color-gray-b);
    }

    .location-drawer__storeStatus {
      display: flex;
      align-items: center;
      gap: 0.3rem;

      &::before {
        content: "";
        display: inline-block;
        width: 0.6rem;
        height: 0.6rem;
        border-radius: 50%;
        background-color: var(--color-gray-b);
      }

      &.status--available {
        &::before {
          background-color: var(--color-available);
        }
      }

      &.status--unavailable {
        &::before {
          background-color: var(--color-unavailable);
        }
      }
    }
  }
}
