/* pdp-discount-bar */

.liquid-pdp__discount-bar-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;

  width: 100%;

  product-info[data-product-clearance='true'] &:not(.weekly-deal) {
    display: none !important;
  }

  &.weekly-deal {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
  }

  & .liquid-pdp__discount-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;

    border-radius: 8px;
    border: 1px solid white;
    width: fit-content;
    min-height: 44px;
    padding: 5px 8px;

    font-size: 14px;
    font-style: normal;
    line-height: 1;
  }
}

.yellow-gradient-bg {
  border: 2px solid #ffe4b1;
  background: linear-gradient(45deg, #f1dca7 0%, #f3bc57 25%, #ffc857 75%, #f1b367 100%);
  background-size: 400% 400%;
  animation: gradientShift 5s ease-in-out infinite;
}

.liquid-pdp__discount-bar.liquid-pdp__discount-bar--promo-bar {
  &.auto-apply-discount {
    cursor: default;
    pointer-events: none;
    padding: 0;

    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 8px;

    & .liquid-pdp__discount-bar-text-wrapper.yellow-gradient-bg {
      border-radius: 8px;
      width: fit-content;
      padding: 8px 12px;

      color: var(--brand-red);
      font-size: 20px;
      font-weight: bold;
      line-height: 1;
    }

    & .liquid-pdp__discount-bar-text--wrapper {
      & span {
        line-height: 1;
        font-size: 14px;
      }

      & span.liquid-pdp__discount-bar-text--holiday-name {
        color: var(--brand-red);
      }

      & span.liquid-pdp__discount-bar-text--note {
        font-style: italic;
      }
    }
  }

  cursor: pointer;

  & button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid #bcbcbc;
    background-color: #fff;
    cursor: pointer;
    padding: 2px;

    &:hover {
      background-color: #f5f5f5;
    }

    &:active {
      background-color: #e5e5e5;
    }

    & svg {
      width: 100%;
      height: 100%;
      opacity: 0;
      transition: opacity 0.2s ease-in-out;
    }

    &.checked {
      background: none;
      border-color: var(--brand-red);

      & svg {
        opacity: 1;
      }
    }
  }

  & div.liquid-pdp__discount-bar-text--wrapper {
    display: flex;
    flex-direction: column;

    & p.liquid-pdp__discount-bar-text--note {
      font-size: 12px;
      font-weight: bold;
      line-height: 1;
    }
  }

  & .liquid-pdp__discount-bar-text--price {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
  }

  & .liquid-pdp__discount-bar-text--holiday-name,
  & .liquid-pdp__discount-bar-text--price-inner,
  & .liquid-pdp__discount-bar-text--code {
    color: var(--brand-red);
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
  }
}

.liquid-pdp__discount-bar.liquid-pdp__discount-bar--mono-bar {
  background-color: #f5f5f5;
  border-color: #dbdbdb;

  & button {
    border-radius: 5px;
    border: 1px dashed #2a8466;
    background: #fff;
    color: #0b0b0b;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    padding: 5px 10px;
    text-transform: uppercase;
  }

  & .liquid-pdp__discount-bar-text-wrapper {
    display: flex;
    flex-direction: row;
    gap: 5px;

    @media (max-width: 1200px) {
      flex-direction: column;
      gap: 0;
    }
  }

  &.hidden {
    display: none;
  }
}
