/* 🚧 WIP 🚧: BEM naming convention and file organization cleanup need to be completed for these styles */
body {
  .product__info-container {
    max-width: 100%;

    & > * + * {
      margin: 0;
    }

    .product__tax {
      display: none;
    }
  }
}

.cpap__flyout-product-showcase {
  .product__column-sticky {
    position: static;
  }
  .price__container {
    margin-bottom: 24px;
  }
  variant-selects {
    padding-top: 25px;
    @media (max-width: 556px) {
      padding-top: 12px;
    }
  }
  .qty-and-btn {
    .qty-box,
    .qty-col {
      display: none;
    }

    .cpap__buy-buttons-column {
      width: 100%;
      padding-left: 0;
    }
  }
}
.cpap__flyout.cpap__flyout-product-showcase
  .product-form__input
  .options-wrap
  .options-wrap-box
  label {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cpap__flyout.cpap__flyout-product-showcase
  .product-form__input
  .options-wrap
  .options-wrap-box
  label.color-label {
  justify-content: space-between;
}
.cpap__flyout.cpap__flyout-product-showcase
  .product-form__input
  .options-wrap
  .options-wrap-box
  label
  .color-picker-box {
  display: block;
}
.cpap__flyout.cpap__flyout-product-showcase {
  .cpap__flyout__flyout {
    & > * + * {
      margin: 0;
    }

    .cpap__flyout__container {
      .cpap__flyout__content-container {
        height: 100vh;
        display: flex;
        flex-direction: column;
        @media (max-width: 556px) {
          height: calc(100dvh - 60px);
        }
        .cpap__flyout__scroll-container {
          padding-bottom: 56px;
        }
        .cpap__flyout-product-showcase__footer {
          .qty-and-btn {
            position: initial;
            width: 100%;
          }
        }
        h2 {
          font: 500 var(--cpap-typography-font-xl);
          margin-bottom: 16px;
          @media (max-width: 556px) {
            font: 500 var(--cpap-typography-font-lg);
            margin-bottom: 12px;
          }
        }
      }
    }
  }
  .tips-of-discontinued {
    padding-top: 32px;
  }
}
.cpap__flyout-product-showcase .product-form__input .options-wrap .options-wrap-box label {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpap__flyout-product-showcase {
  .price__container {
    font-size: 24px;
    line-height: 24px;
    margin-bottom: 16px;
    display: block;
    @media (max-width: 992px) {
      line-height: 32px;
    }
  }
  variant-selects {
    border-top: 1px solid var(--cpap-stroke-gray);
    padding-top: 16px;
    @media (max-width: 992px) {
      border: none;
      padding-top: 4px;
    }
  }
  .product-form__input {
    max-width: initial;
    margin-bottom: 20px;
    &:first-child {
      .options-wrap .options-wrap-box {
        @media (max-width: 556px) {
          gap: 8px 16px;
          label {
            max-width: calc(50% - 8px);
          }
        }
      }
      .options-wrap {
        display: block;
      }
    }
    .form__label {
      font: var(--cpap-typography-font-md);
      display: block;
      margin-bottom: 0;
      letter-spacing: 0;
      width: 100%;
      margin-bottom: 0px;
      cursor: pointer;
      display: flex;
      align-items: center;
      position: relative;
      &:before {
        content: '\e909';
        font-size: 12px;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translate(0%, -50%) rotate(90deg);
        transition: all 0.2s;
        color: var(--cpap-primary-soft-black);
      }
      .error-tips {
        padding-left: 16px;
        padding-right: 30px;
        opacity: 0;
        visibility: hidden;
        display: none;
        &.is-show {
          opacity: 1;
          visibility: visible;
          display: flex;
        }
        p {
          font: var(--cpap-typography-font-s-bold);
          font-weight: 500;
          color: rgba(205, 56, 36, 1);
          margin: 0;
          @media (max-width: 992px) {
            font-weight: 400;
          }
        }
      }
      &.is-active {
        &:before {
          transform: translate(0%, -50%) rotate(270deg);
        }
      }
      &:hover {
        @media (min-width: 768.5px) {
          &:before {
            color: var(--cpap-primary-orange);
          }
        }
      }
      &:active {
        &:before {
          color: var(--cpap-primary-orange);
        }
      }
    }

    .options-wrap {
      @supports (interpolate-size: allow-keywords) {
        height: 0;
        transition: height 0.3s ease-in-out;
      }
      @supports not (interpolate-size: allow-keywords) {
        max-height: 0;
        transition: max-height 0.3s ease-in-out;
      }
      overflow: hidden;

      &.options-wrap--expanded {
        @supports (interpolate-size: allow-keywords) {
          height: calc-size(auto, size);
        }
        @supports not (interpolate-size: allow-keywords) {
          max-height: 200px;
        }
      }

      .options-wrap-box {
        display: flex;
        padding-top: 20px;
        flex-wrap: wrap;
        gap: 8px 18px;
        @media (max-width: 1400px) {
          gap: 8px 18px;
        }
        @media (max-width: 992px) {
          padding-top: 16px;
        }
        input {
          display: none;
        }
        input[type='radio']:checked + label {
          border-color: var(--cpap-primary-orange);
        }
        input {
          &.disabled {
            & + label {
              background: var(--cpap-stroke-gray);
              cursor: no-drop;
              text-decoration: none !important;
              position: relative;
              overflow: hidden;

              &::before {
                content: '';
                position: absolute;
                top: 50%;
                left: 0;
                width: 100%;
                height: 1px;
                z-index: 11;
                border-radius: 0;
                background: var(--cpap-overlay-black);
                transform: rotate(13deg);
              }

              &::after {
                content: '';
                position: absolute;
                top: 50%;
                left: 0;
                width: 100%;
                height: 1px;
                z-index: 11;
                border-radius: 0;
                background: var(--cpap-overlay-black);
                transform: rotate(-13deg);
              }
              &:hover {
                @media (min-width: 768.5px) {
                  border-color: var(--cpap-stroke-gray);
                }
              }
              &:active {
                border-color: var(--cpap-stroke-gray);
              }
            }
          }
        }
        label {
          font: var(--cpap-typography-font-s-bold);
          font-weight: 700;
          border: 1px solid var(--cpap-stroke-gray);
          border-radius: 28px;
          color: var(--cpap-primary-soft-black) !important;
          letter-spacing: 0;
          flex-basis: 33.33333%;
          margin: 0;
          max-width: calc(33.3333% - 12px);
          padding: 9px 16px;
          cursor: pointer;
          transition: all 0.2s;
          position: relative;
          @media (max-width: 1400px) {
            max-width: calc(50% - 9px);
            flex-basis: 50%;
          }
          @media (max-width: 992px) {
            max-width: calc(33.3333% - 12px);
          }
          @media (max-width: 556px) {
            max-width: calc(50% - 9px);
            flex-basis: 50%;
          }
          &:hover {
            @media (min-width: 768.5px) {
              border-color: var(--cpap-primary-orange);
            }
          }
          &:active {
            border-color: var(--cpap-primary-orange);
          }
          &.color-label {
            text-align: left;
            padding: 9px 16px;
          }
          .color-picker-box {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            position: absolute;
            top: 50%;
            right: 16px;
            transform: translate(0, -50%);
            &.has-border {
              width: 15px;
              height: 15px;
              border: 1px solid var(--cpap-stroke-gray);
            }
          }
        }
      }
    }
  }
  .product-form {
    margin: 0;
  }
  .qty-and-btn {
    display: flex;
    flex-wrap: wrap;

    .cpap__buy-buttons-column {
      padding-left: 16px;

      @media (max-width: 992px) {
        padding-left: 8px;
      }
    }

    .error-tips {
      width: 100%;
      padding-top: 16px;
      display: none;

      p {
        font: var(--cpap-typography-font-s-bold);
        font-weight: 400;
        color: #cd3824;
        margin-bottom: 0;
      }
    }
  }

  .tips-of-discontinued {
    padding-top: 5px;
    p {
      font: 500 var(--cpap-typography-font-lg);
      color: var(--cpap-primary-soft-black);
      margin-bottom: 32px;
    }
  }
  .selling-points {
    @media (max-width: 992px) {
      margin-top: 16px;
    }

    p {
      color: var(--cpap-primary-soft-black);
      padding: 24px 24px 24px 40px;
      margin-bottom: 0;
      border-bottom: 1px solid var(--cpap-stroke-gray);
      position: relative;
      @media (max-width: 992px) {
        padding: 16px 16px 16px 42px;
        font: var(--cpap-typography-font-s-bold);
        &:first-child {
          border-top: 1px solid var(--cpap-stroke-gray);
          padding: 17px 16px 18px 42px;
        }
      }
      img {
        content: '';
        width: 28px;
        height: auto;
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        position: absolute;
        top: 50%;
        left: -2px;
        transform: translate(0, -50%);
        @media (max-width: 992px) {
          width: 20px;
          height: auto;
          left: 4px;
        }
      }

      &:last-child {
        border: none;
      }
    }
  }

  .brand-and-reviews {
    @media (max-width: 992px) {
      display: none;
    }
  }
}
