.how-it-works-v3__wrapper {
  background-color: var(--background-color);
  border-radius: 50px 50px 0 0;
  position: relative;

  & .how-it-works-v3__decor {
    display: block;
    max-width: var(--decor-size);
    position: absolute;
    top: var(--decor-top);
    left: var(--decor-left);
    transform: translate(-50%, -50%);

    &.how-it-works-v3--mobile {
      display: none;
    }

    & .how-it-works-v3__decor-image {
      width: 100%;
      height: auto;
      object-fit: contain;
    }

    @media screen and (max-width: 749px) {
      max-width: var(--decor-size-mobile);
      top: var(--decor-top-mobile);
      left: var(--decor-left-mobile);

      &.how-it-works-v3--mobile {
        display: block;
      }

      &.how-it-works-v3--desktop {
        display: none;
      }
    }
  }

  & .how-it-works-v3__inner-wrapper {
    padding-top: var(--padding-top-desktop);
    padding-bottom: var(--padding-bottom-desktop);
    border-radius: 50px 50px 0 0;

    & .how-it-works-v3__header {
      text-align: center;
      margin: 0 auto 40px;
      max-width: 760px;
    
      & .how-it-works-v3__subheading {
        color: var(--color);
        text-align: center;
        font-family: Poppins;
        font-size: 16px;
        font-style: normal;
        font-weight: 600;
        line-height: 150%;
        text-transform: uppercase;
      }

      & .how-it-works-v3__heading {
        margin: 10px auto;
        text-align: center;
        width: fit-content;
        
        font-family: Poppins;
        font-size: 36px;
        font-style: normal;
        font-weight: 600;
        line-height: 130%;
        letter-spacing: -1px;

        position: relative;

        &:is(h1, h2, h3, h4, h5, h6)::before {
          content: "";
          display: block;
          position: absolute;
          top: -15px;
          right: -25px;
          background-image: url('./icon-highlight.svg');
          background-repeat: no-repeat;
          background-size: cover;
          width: 32px;
          height: 38px;
        }
      }

      & .how-it-works-v3__description {
        font-size: 16px;
        line-height: 150%;

        & * {
          margin: 0;
        }
      }
    }

    & .how-it-works-v3__steps {
      display: flex;
      flex-direction: row;
      gap: 30px;

      & .how-it-works-v3__step {
        display: flex;
        flex-direction: column;
        align-items: start;
        flex: 1;
        gap: 15px;

        position: relative;

        padding: 40px 30px;
        border: 1px solid rgba(0, 0, 0, 0.07);
        border-radius: 20px;
        background: #FFF;
        box-shadow: 0 6px 11px 0 rgba(0, 0, 0, 0.04);

        &:not(:last-child)::after {
          content: "";
          display: block;
          width: 30px;
          height: 2px;

          border: 1px dashed #7B6B5D;

          position: absolute;
          right: -30px;
          top: 68px;
        }

        & .step__number {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          width: 56px;
          height: 56px;
          border-radius: 50%;
          background-color: var(--number-background-color);
          color: var(--number-color);
            
          text-align: center;
          font-variant-numeric: lining-nums proportional-nums;
          font-feature-settings: 'liga' off, 'clig' off;
          font-family: Poppins;
          font-size: 26px;
          font-style: normal;
          font-weight: 600;
          line-height: 130%;
          letter-spacing: -0.9px;

          margin-bottom: 15px;
        }

        & .step__title {
          color: #2C2926;

          font-family: Poppins;
          font-size: 24px;
          font-style: normal;
          font-weight: 600;
          line-height: 130%;
          letter-spacing: -0.5px;

          margin: 0;
        }

        & .step__description {
          color: #2C2926;

          font-family: Poppins;
          font-size: 15px;
          font-style: normal;
          font-weight: 400;
          line-height: 160%;

          margin: 0;

          & p {
            &:last-child {
              margin-bottom: 0;
            }

            &:first-child {
              margin-top: 0;
            }
          }
        }

        & .step__logos {
          width: 100%;
          display: flex;
          justify-content: flex-start;
          align-items: center;
          gap: 9px 16px;
          flex-wrap: wrap;

          padding-top: 15px;
          border-top: 1px solid rgba(0, 0, 0, 0.10);

          & .step__logos-title {
            color: #2A783A;
            font-family: Poppins;
            font-size: 14px;
            font-style: normal;
            font-weight: 600;
            line-height: 110%;
            letter-spacing: -0.5px;
            text-transform: uppercase;

            width: 100%;

            & > p {
              margin: 0;
            }

            & .title--mobile {
              display: none;
            }
          }

          & .step__logo {
            display: flex;
            justify-content: center;
            align-items: center;

            max-height: 24px;

            & .logo__image {
              max-width: var(--logo-width-desktop);
              width: 100%;
              height: 100%;
              object-fit: contain;

              &.logo--mobile {
                display: none;
              }
            }
          }
        }

        & .step__button {
          margin-top: 15px;

          & .step__button-control {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            gap: 10px;

            appearance: none;
            border: 1px solid var(--accent-color);
            border-radius: 8px;
            background-color: var(--accent-color);
            color: var(--accent-text-color);
            cursor: pointer;
            
            text-align: center;
            font-family: Poppins;
            font-size: 18px;
            font-style: normal;
            font-weight: 600;
            line-height: normal;
            letter-spacing: -0.3px;

            min-height: 56px;
            padding: 0 25px;
            transition: .18s ease;

            &:hover {
              background-color: var(--accent-text-color);
              color: var(--accent-color);
            }

            &:disabled {
              cursor: default;
              opacity: 0.65;
            }
          }
        }

        & .step__form {
          grid-column: 1 / -1;
          width: 100%;

          & klaviyo-step-form {
            display: grid;
            grid-template-rows: 0fr;
            margin-bottom: 0;
            opacity: 0;
            pointer-events: none;
            transform: translateY(-8px);
            transition:
              opacity 220ms ease,
              transform 260ms ease;

            &[data-open="true"] {
              grid-template-rows: 1fr;
              opacity: 1;
              pointer-events: auto;
              transform: translateY(0);
            }

            & .klaviyo-step-form__inner {
              min-height: 0;
              position: relative;

              & .klaviyo-step-form__header {
                margin-bottom: 16px;

                & .step__title {
                  color: #2C2926;
                  font-family: Poppins;
                  font-size: 24px;
                  font-style: normal;
                  font-weight: 600;
                  line-height: 130%;
                  letter-spacing: -0.5px;
                  margin: 0;
                }
              }

              & .klaviyo-step-form__close {
                appearance: none;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 38px;
                height: 38px;
                border: 0;
                border-radius: 50%;
                background-color: #fff;
                color: #100f0f;
                cursor: pointer;
                padding: 0;
                transition: opacity 180ms ease;

                position: absolute;
                top: -38px;
                right: -20px;

                &:hover {
                  opacity: 0.82;
                }

                & .icon {
                  width: 14px;
                  height: 14px;
                }
              }

              & .klaviyo-step-form__form {
                display: grid;
                grid-template-columns: 1fr;
                gap: 12px;

                & .klaviyo-step-form__field {
                  display: flex;
                  flex-direction: column;
                  gap: 6px;
                  position: relative;

                  &::after {
                    position: absolute;
                    right: 14px;
                    bottom: 17px;
                    display: none;
                    align-items: center;
                    justify-content: center;
                    width: 22px;
                    height: 22px;
                    border-radius: 50%;
                    font-size: 18px;
                    font-weight: 700;
                    line-height: 1;
                    pointer-events: none;
                  }

                  &.is-valid::after {
                    content: "✓";
                    display: flex;
                    color: #1f6f35;
                  }

                  &.is-invalid::after {
                    content: "×";
                    display: flex;
                    color: #b3261e;
                  }

                  & .klaviyo-step-form__input {
                    width: 100%;
                    min-height: 56px;
                    border: 1px solid rgba(0, 0, 0, 0.16);
                    border-radius: 10px;
                    background-color: #fff;
                    padding: 0 44px 0 14px;

                    color: #2C2926;
                    font-family: Poppins;
                    font-size: 15px;
                    font-style: normal;
                    font-weight: 400;
                    line-height: 24px;

                    &:focus {
                      border-color: var(--accent-color);
                      outline: 2px solid color-mix(in srgb, var(--accent-color) 22%, transparent);
                      outline-offset: 1px;
                    }

                    &.is-invalid {
                      border-color: #b3261e;
                    }

                    &.is-valid {
                      border-color: #1f6f35;
                    }
                  }
                }

                & .klaviyo-step-form__submit {
                  display: flex;
                  justify-content: center;
                  align-items: center;
                  width: 100%;
                  gap: 10px;

                  appearance: none;
                  border: 1px solid var(--accent-color);
                  border-radius: 8px;
                  background-color: var(--accent-color);
                  color: var(--accent-text-color);
                  cursor: pointer;
                  
                  text-align: center;
                  font-family: Poppins;
                  font-size: 18px;
                  font-style: normal;
                  font-weight: 600;
                  line-height: normal;
                  letter-spacing: -0.3px;

                  min-height: 56px;
                  padding: 0 25px;
                  transition: .18s ease;

                  &:hover {
                    background-color: var(--accent-text-color);
                    color: var(--accent-color);
                  }

                  &:disabled {
                    cursor: default;
                    opacity: 0.65;
                  }
                }
              }

              & .klaviyo-step-form__notification {
                margin-top: 10px;
                border-radius: 8px;
                font-family: Poppins;
                font-size: 14px;
                font-weight: 500;
                line-height: 140%;
                padding: 10px 12px;

                &[data-status="success"] {
                  background-color: #e7f4ea;
                  color: #1f6f35;
                }

                &[data-status="error"] {
                  background-color: #fce8e6;
                  color: #b3261e;
                }
              }

              & .klaviyo-step-form__policy {
                margin-top: 12px;
                font-family: Poppins;
                font-size: 8px;
                line-height: 11px;
                color: #2C2926;
                opacity: 0.7;

                & a {
                  color: #584576;
                }
              }
            }
          }
        }

        &.form-step:has(klaviyo-step-form[data-open="true"]) {
          & .step__number {
            display: none;
          }

          & .step__header {
            display: none;
          }

          & .step__content {
            display: none;
          }
        }
      }
    }
  }

  @media screen and (max-width: 749px) {
    border-radius: 20px 20px 0 0;

    & .how-it-works-v3__inner-wrapper {
      padding-top: var(--padding-top-mobile);
      padding-bottom: var(--padding-bottom-mobile);

      & .how-it-works-v3__header {
        margin-bottom: 25px;

        & .how-it-works-v3__subheading {
          font-size: 15px;
        }

        & .how-it-works-v3__heading {
          font-size: 24px;

          &:is(h1, h2, h3, h4, h5, h6)::before {
            display: none;
          }
        }
      }

      & .how-it-works-v3__steps {
        flex-wrap: wrap;
        gap: 20px;

        & .how-it-works-v3__step {
          padding: 20px;
          width: 100%;
          flex: 1 1 100%;
          gap: 12px;

          & .step__header {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-items: center;
            gap: 12px;

            & .step__number {
              min-width: 40px;
              width: 40px;
              height: 40px;
              font-size: 18px;
              
              margin: 0;
            }

            & .step__title {
              font-size: 19px;
            }
          }

          & .step__description {
            font-size: 14px;
          }

          & .step__logos {
            padding-top: 12px;
            gap: 6px 12px;

            & .step__logos-title {
              font-size: 13px;
              width: auto;

              & .title--desktop {
                display: none;
              }

              & .title--mobile {
                display: block;
              }
            }

            & .step__logo .logo__image {
              max-width: var(--logo-width-mobile);

              &.logo--mobile {
                display: block;
              }

              &.logo--desktop {
                display: none;
              }
            }
          }

          &:not(:last-child)::after {
            width: 2px;
            height: 20px;

            top: initial;
            right: initial;
            bottom: -20px;
            left: 40px;
          }

          & .step__button {
            margin-top: 15px;

            & .step__button-control {
              min-height: 50px;
              font-size: 16px;
            }
          }

          & .step__form {
            & klaviyo-step-form {
              & .klaviyo-step-form__inner {
                & .klaviyo-step-form__close {
                  width: 20px;
                  height: 20px;
                  background: transparent;

                  top: -10px;
                  right: -10px;
                }

                & .klaviyo-step-form__header {
                  margin-bottom: 12px;

                  display: flex;
                  flex-direction: row;
                  justify-content: flex-start;
                  align-items: center;
                  gap: 12px;

                  & .step__title {
                    font-size: 19px;
                  }

                  & .step__number {
                    min-width: 40px;
                    width: 40px;
                    height: 40px;
                    font-size: 18px;
                    
                    margin: 0;
                  } 
                }

                & .klaviyo-step-form__form {
                  gap: 10px;

                  & .klaviyo-step-form__field {
                    & .klaviyo-step-form__input {
                      min-height: 50px;
                    }
                  }

                  & .klaviyo-step-form__submit {
                    min-height: 50px;
                    font-size: 16px;
                  }
                }

                & .klaviyo-step-form__notification {
                  font-size: 13px;
                }
              }
            }
          }

          &.form-step:has(klaviyo-step-form[data-open="true"]) {
            & .step__number {
              display: flex;
            }
          }
        }
      }
    }
  }
}