@import "../../../style/CommonStyle.module.less";
@import "../../../style/utils.module.less";

.detailContainer {
  width: 846px;
  margin-top: 20px;
  .detailScroll {
    width: 100%;
    height: 314px;

    &.optionSecondary {
      height: 370px;
    }
    &.couponMissing {
      height: 414px;
    }
    background: @BG_COLOR_02;

    border-top: 1px solid @COLOR_GRAY02;
    border-bottom: 1px solid @COLOR_GRAY02;

    > div > div {
      padding: 30px;
    }

    > div > div {
      div {
        padding: 0;
      }
    }
    .messages {
      .position(@position: absolute, @right: 30px , @bottom: 15px );
      font-size: 24px;
      line-height: 1.33;
      color: @COLOR_GRAY03;
    }
    .optionLayer {
      .flex(@justifyCenter:space-between);
      color: @COLOR_GRAY05;
      font-weight: bold;
      font-size: 24px;
      margin-bottom: 20px;

      .optionBtn {
        .border-solid(1px,@COLOR_GRAY02);
        .flex();
        font-weight: bold;
        font-size: 24px;

        min-width: 560px;
        background-color: @COLOR_WHITE;
        color: @COLOR_GRAY03;
        background-image: url(../../../../assets/images/btn/btn-dropdown-nor@3x.png);
        .imgElement(42px, 42px, right 30px, center);
        position: relative;

        &:focus {
          color: @PRIMARY_COLOR_RED;
          &::after {
            .focused(@boxShadow: 22px, @borderRadius: 12px);
            background-image: url(../../../../assets/images/btn/btn-dropdown-foc@3x.png);
            .imgElement(42px, 42px, right 26px, center);
          }
        }

        > div {
          .flex();

          span {
            line-height: 1.33;
            width: 458px;
          }
          img {
            width: 42px;
            height: 42px;
          }
        }
      }
    }

    // QUANTITY
    .quantityLayer {
      .flex(@justifyCenter:space-between);
      font-weight: bold;
      font-size: 24px;
      color: @COLOR_GRAY05;

      .wrapper {
        min-width: 560px;
        .flex(@justifyCenter:space-between);
      }
      .quantityBtn {
        min-width: 90px;
        height: 90px;
        background-color: @COLOR_WHITE;
        position: relative;

        &:focus {
          color: @PRIMARY_COLOR_RED;
          &::after {
            .focused(@boxShadow: 22px, @borderRadius: 12px);
            .imgElement(42px, 42px, right 26px, center);
          }
        }

        &.increaseBtn {
          background-image: url(../../../../assets/images/btn/btn-quantity-increase-nor@3x.png);
          .imgElement(90px, 90px, center, center);
          &:focus {
            background-image: url(../../../../assets/images/btn/btn-quantity-increase-foc@3x.png);
            .imgElement(90px, 90px, center, center);
          }
        }
        &.increaseDimBtn {
          background-image: url(../../../../assets/images/btn/btn-quantity-increase-dim@3x.png);
          .imgElement(90px, 90px, center, center);
        }
        &.decreaseBtn {
          background-image: url(../../../../assets/images/btn/btn-quantity-decrease-nor@3x.png);
          .imgElement(90px, 90px, center, center);
          &:focus {
            background-image: url(../../../../assets/images/btn/btn-quantity-decrease-foc@3x.png);
            .imgElement(90px, 90px, center, center);
          }
        }

        &.decreaseDimBtn {
          background-image: url(../../../../assets/images/btn/btn-quantity-decrease-dim@3x.png);
          .imgElement(90px, 90px, center, center);
        }
      }
    }
  }
  .temp {
    flex-direction: column;
    display: flex;
    justify-content: flex-end;

    .middleLayer {
      // COUPON
      .couponWrap {
        width: 100%;
      }
      .detailBottomLayer {
        width: 100%;

        margin-top: 27px;
        margin-bottom: 31px;
        .flex(@justifyCenter:space-between);
        .leftLayer {
          .flex(@direction:column, @justifyCenter:center,@alignCenter:flex-start);
          .promotionName {
            color: @COLOR_GRAY05;
            font-weight: bold;
            font-size: 24px;
          }
          .promotionDesc {
            color: @COLOR_GRAY03;
            font-size: 24px;
          }
        }
        .promotionBtn {
          min-width: 144px;
          height: 60px;
          font-weight: bold;
          font-size: 24px;
          line-height: 60px;
          border-radius: 6px;
          background: @COLOR_GRAY03;
          position: relative;
          &:focus {
            background: @PRIMARY_COLOR_RED;
          }
        }
      }

      .shippingLayer {
        width: 100%;
        .flex(@justifyCenter:space-between);
        // margin-top: 10px;
        > span {
          font-size: 24px;
          line-height: 1.33;
          color: @COLOR_GRAY03;
        }
      }
    }

    .bottomBtnLayer {
      margin-top: 24px;
      .flex(@justifyCenter:space-between);
      .buyNowBtn {
        min-width: 756px;
        height: 78px;
      }
      .favoriteBtn {
        min-width: 78px;
        height: 78px;
        background-image: url(../../../../assets/images/icons/ic-heart-nor@3x.png);
        .imgElement(54px, 54px, center, center);
      }
    }
    .disclaimerContainer {
      background: url("../../../../assets/images/icons/ic-warning.svg")
        no-repeat left top;
      background-size: 18px 18px;
      font-size: 18px;
      padding-left: 28px;
      line-height: 1.1;
      margin-top: 16px;
    }
    .itemContainer {
      background: #f00;
      width: 440px;
      height: 320px;
      .couponItem {
        width: 440px;
        height: 320px;
        position: relative;
        background: yellow;
      }
    }

    .loginPopup {
      .btnContainer {
        margin: 0 0 30px 0;
        display: flex;
        justify-content: center;
        .btn {
          min-width: 300px;
          height: 20px;
          margin: 0 6px;
        }
      }
    }
  }
}

.itemWrap {
  overflow: hidden;
  position: relative;

  &::after,
  &::before {
    position: absolute;
    width: 253px;
    height: 320px;
    top: 0;
    content: "";
    z-index: 2;
  }
  &::after {
    left: 0;
    background: linear-gradient(to right, #f8f8f8, transparent);
  }
  &::before {
    right: 0;
    background: linear-gradient(to left, #f8f8f8, transparent);
  }
  .itemList {
    .size(@w: 440px , @h: 320px);
    height: 320px;
  }
  > div > div {
    margin-left: 253px;
  }
  > div {
    > div:nth-child(2) {
      left: -253px;
    }
    > div:nth-child(3) {
      right: -520px;
    }
  }
}
.couponContainer {
  position: relative;

  &:focus {
    &::after {
      .focused(@boxShadow: 22px, @borderRadius: 12px);
    }
  }

  .couponItem {
    .flex(@direction: column, @justifyCenter: space-between);
    .size(@w: 440px , @h: 320px);
    text-align: center;
    background: @COLOR_WHITE;

    padding: 30px;
    border-radius: 10px;
    .border-solid(@size:1px,@color:@COLOR_GRAY02);

    .couponTopContents {
      .couponLate {
        font-weight: bold;
        font-size: 32px;
        color: @PRIMARY_COLOR_RED;
        line-height: 1.1;
        height: 40px;
      }

      .title {
        font-weight: bold;
        font-size: 32px;
        line-height: 1.1;
        color: @COLOR_GRAY07;
        width: 400px;
        height: 40px;
        .elip(1);
      }
    }

    .couponMiddleContents {
      .flex(@direction: column, @justifyCenter: space-between);
      font-weight: normal;
      font-size: 22px;
      color: @COLOR_GRAY03;

      > span {
        min-height: 30px;

        &:nth-child(1) {
          margin-bottom: 10px;
        }
      }
    }

    .couponBottomButton {
      .flex();
      .size(@w: 380px , @h: 60px);
      border-radius: 6px;
      background-color: #808080;
      color: #fff;
      z-index: 1;

      font-weight: bold;
      font-size: 24px;

      &.disable {
        background-color: #808080;
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5);
      }

      &.focused {
        background-color: @PRIMARY_COLOR_RED;
      }
    }
  }
}

.couponRemain {
  font-size: 24px;
  font-weight: bold;
  color: #808080;
  text-align: center;

  margin-top: 20px;
}

.popupContainer {
  .header {
    .size(@w: 780px , @h: 102px);
    .flex(@display: flex, @justifyCenter: "", @alignCenter: center, @direction: row);
    padding-left: 61px;
    background-color: #e7ebef;

    > h3 {
      font-size: 36px;
      color: #222222;
      font-weight: bold;
    }
  }

  .qrcodeContainer {
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;

    .qrcode {
      .size(@w: 360px , @h: 360px);
      background-color: #ffffff;
      border-radius: 12px;
      box-shadow: 0 0 0 1px #dadada inset;
      margin-bottom: 41px;
    }

    > h3 {
      display: flex;
      text-align: center;
      word-break: break-word;
      line-height: 1.27;
    }

    .popupBtn {
      .size(@w: 300px , @h: 78px);
      margin-top: 38px;
    }
  }
}
