@use '../utils/base' as *;

/* store */
.place-module-container {
}
.place-module-outer {
  max-width: rem(1660);
  height: rem(700);
  margin: 0 auto;
  padding: 0 rem(30);
}
.place-title {
  margin-bottom: rem(10);
  padding: rem(10) 0;
}

/* 매장 검색 폼 */
.place-finder {
  width: rem(420);
  margin-bottom: rem(30);
}
.place-finder-form {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: rem(10);

  .form-element {
    height: rem(50);
    padding: 0 rem(20);
    border-color: rgba($almost-black, 0.2);
    border-style: solid;
    border-width: 1px;
    background-color: transparent;
    &::placeholder {
      color: $almost-black;
    }
  }
  .input-container {
    gap: rem(10);
    .text-input {
      flex-grow: 1;
    }
  }
  .btn-place-finder {
    width: rem(80);
    padding: 0;
    background-color: $almost-black;
    color: $almost-white;
  }
  .select-input {
    appearance: none;
    background: url('/assets/img/components/store/icon-chevron.svg') no-repeat
      right rem(20) center/rem(14) rem(8);
  }
  .select-input-narrow {
    width: 50%;
  }
  .select-container select:last-child {
    margin-left: -1px;
  }
}

/* 매장 지도 */
.place-map {
  position: absolute;
  right: 0;
  top: 0;
  width: calc(100% - rem(450));
  height: 100%;
  background-color: $almost-black;
}

/* 매장 목록 */
.place-result {
  overflow-y: scroll;
  overflow-x: hidden;
  width: rem(420);
  height: rem(498);
}
.place-items {
  margin-right: rem(20);
}
.place-item {
  padding: rem(24) rem(20);
  border-bottom: 1px solid rgba($almost-black, 0.2);
}
.btn-open-place-modal {
  width: 100%;
  text-align: left;
}
.place-name-distance {
  margin-bottom: rem(16);
}
.place-address {
  position: relative;
  min-height: rem(20);
  padding-left: rem(20);
  color: rgba($almost-black, 0.6);
  &::before {
    @include bg-cover;
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: rem(14);
    height: rem(19);
    background-image: url('/assets/img/components/store/icon-location.svg');
  }
}
.custom-scrollbar {
  &::-webkit-scrollbar {
    width: rem(4);
  }
  &::-webkit-scrollbar-track {
    background: rgba($almost-black, 0.2);
  }
  &::-webkit-scrollbar-thumb {
    background: $almost-black;
  }
}

/* 매장 상세 정보 모달 창 */
.place-modal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: $zindex-modal;
  width: rem(740);
  margin-left: rem(-146);
  border: 1px solid rgba($almost-black, 0.2);
  background-color: #fff;
  transform: translateY(-50%);
}
.place-modal-inner {
  padding: rem(60) rem(99);
}
.place-modal-title {
  margin-bottom: rem(25);
  padding-bottom: rem(20);
  border-bottom: 1px solid $almost-black;
}
.place-modal-content {
  display: flex;
  justify-content: space-between;
}
.place-modal-link-logo {
  width: rem(120);
  margin-right: auto;
  margin-left: auto;
  margin-bottom: rem(20);
}
.place-info-items {
  max-width: rem(326);
  color: rgba($almost-black, 0.6);
}
.place-info-item {
  display: flex;
  margin-bottom: rem(20);
}
.place-info-icon {
  width: rem(40);
  height: rem(25);
  padding-top: rem(6);
  text-align: center;
  img {
    width: auto;
    height: 100%;
  }
}
.btn-place-modal-close {
  position: absolute;
  right: rem(30);
  top: rem(30);
  padding: rem(10);
  img {
    width: rem(20);
    height: rem(20);
  }
}

@media screen and (max-width: rem($breakpoint-lg)) {
  .place-module-outer {
    width: 100%;
    padding-right: 0;
    padding-left: 3.90625%;
  }
  .place-finder,
  .place-result {
    width: 47.42%;
  }
  .place-map {
    width: 49.47%;
  }
  .place-modal {
    right: 0;
    left: 0;
    margin-right: auto;
    margin-left: auto;
  }
}

@media screen and (max-width: rem($breakpoint-md)) {
  .place-module-container {
  }
  .place-module-outer {
    height: auto;
    width: 92.1875%;
    margin: 0 auto;
    padding-left: 0;
  }
  .place-finder {
    width: 100%;
    margin-bottom: rem(10);
  }
  .place-finder-form {
    .form-element {
      height: rem(40);
    }
    .select-input {
      background-position: right rem(10) center;
      background-size: rem(8) rem(4);
    }
    .btn-place-finder {
      width: rem(64);
    }
  }
  .place-map {
    position: relative;
    width: 100vw;
    height: vw(280, sm);
    margin-bottom: rem(16);
    margin-left: vw(-14, sm);
  }
  .place-result {
    width: 100%;
    height: auto;
    max-height: rem(498);
  }
  .place-item {
    padding: rem(20) rem(20);
  }
  .place-address {
    min-height: 0;
    padding-left: rem(12);
    &::before {
      width: rem(8);
      height: rem(11);
      background-size: 100% 100%;
    }
  }
  .place-modal {
    position: fixed;
    right: 0;
    left: 0;
    width: 92.1875vw;
    margin: 0 auto;
  }
  .place-modal-inner {
    padding: rem(15) rem(20);
  }
  .place-modal-content {
    flex-direction: column;
    gap: rem(26);
  }
  .place-info-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: baseline;
    padding-top: rem(2);
    width: rem(20);
    img {
      width: 50%;
    }
  }
  .btn-place-modal-close {
    right: rem(10);
    top: rem(10);
    width: rem(36);
    img {
      width: 100%;
    }
  }
}
