@import "_theme.scss";

.sticky-price {
  padding: 0;
  height: 0;
  overflow: hidden;

  .loading-dots {
    height: 15px;
    margin: auto;
  }

  .price-display {
    margin-bottom: 5px;
  }

  .product-sticky-price {
    padding: 0 60px;

    @media (max-width: $md) {
      padding: 0 20px;
    }

    .text-hidden {
      visibility: hidden;
    }

    .total-price {
      display: flex;
      flex-wrap: wrap;
      width: 600px;
      align-items: center;
      position: relative;

      .loading-dots {
        position: absolute;
        align-self: flex-start;
        margin-top: 27px;
      }

      @media (min-width: $xs) and (max-width: $md) {
        .price {
          font-size: var(--text-size-h4);

          .price-currency {
            font-size: var(--text-size-label);
          }
        }
      }

      @media (max-width: $lg) {
        width: 100%;
      }

      &.long-price,
      &.button-only {
        .sticky-add-to-cart-button {
          flex-basis: 100%;
        }

        .price-display {
          padding-bottom: 10px;
        }
      }

      .add-to-cart-icon-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: var(--button-primary-background-color);
        .icon {
          margin-left: 7px;
          margin-top: -4px;
        }
      }

      &.button-only {
        .add-to-cart-icon-wrapper {
          display: none;
        }

        .sticky-add-to-cart-button {
          @media (max-width: $sm) {
            display: flex;
          }
        }
      }

      .filler {
        flex-grow: 1;
      }

      .sticky-add-to-cart-button {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 38px;
        min-width: 200px;
        padding: 5px 25px;
        margin: 12.5px 0;

        .loading-dots {
          margin-top: -3px;
        }
        .loading-dot {
          background-color: white;
        }

        @media (min-width: $md) and (max-width: $lg) {
          min-width: 110px;
        }

        @media (max-width: $sm) {
          display: none;
        }
      }

      .sticky-add-to-cart-icon,
      .add-to-cart-icon-wrapper {
        margin: auto 0 auto auto;

        @media (min-width: $sm) {
          display: none;
        }
      }
    }
  }
}
