.buying-journey {
  background: #1c1c1c;
  color: var(--tertiary-color);

  .buying-journey-main-wrapper {
    position: relative;
  }

  /* Mobile First: Base styles for mobile */
  .buying-journey-sticky-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 20px;
    margin: 0 auto;

    @media (width>=768px) {
      padding: 32px var(--container-margin);
    }

    @media (width>=1024px) {
      padding: 50px var(--container-margin);
    }
  }

  .buying-journey-header {
    margin-bottom: 34px;

    @media (width>=768px) {
      margin-bottom: 25px;
    }

    @media (width>=1024px) {
      margin-bottom: 40px;
    }

    .buying-journey-title {
      color: var(--tertiary-color);
      font-feature-settings:
        'liga' off,
        'clig' off;
      font-size: var(--fs-large);
      font-weight: var(--fw-400);
      line-height: 2.6rem;
      margin-bottom: 9px;

      @media (width>=768px) {
        font-size: var(--fs-xslarge);
        line-height: normal;
        margin-bottom: 8px;
      }

      @media (width>=1024px) {
        font-size: var(--fs-xxlarge);
        line-height: normal;
        margin-bottom: 12px;
      }
    }

    .buying-journey-subtitle {
      color: var(--secondary-color);
      font-feature-settings:
        'liga' off,
        'clig' off;
      font-size: var(--fs-small);
      font-weight: var(--fw-300);
      line-height: normal;

      @media (width>=768px) {
        font-size: var(--fs-xsmall);
        font-weight: var(--fw-400);
        line-height: normal;
      }

      @media (width>=768px) {
        font-size: var(--fs-small);
        font-weight: var(--fw-400);
        line-height: normal;
      }
    }
  }

  .buying-journey-stepper {
    position: relative;
    margin-bottom: 40px;
    width: 100%;
  }

  /* Mobile First: Vertical progress line */
  .buying-journey-progress-line {
    position: absolute;
    inset: 30px auto 40px 16px;
    width: 2px;
    height: auto;
    background: rgb(255 255 255 / 10%);
    z-index: 1;

    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: var(--progress, 0%);
      background: var(--ui-gray-light-header);
      transition: height 0.1s linear;
    }

    @media (width>=768px) {
      inset: 24px 175px auto 0;
      width: auto;
      height: 2px;

      &::after {
        width: var(--progress, 0%);
        height: 4px;
        transition: width 0.1s linear;
      }
    }

    @media (width>=1024px) {
      inset: 30px 200px auto 0;
    }
  }

  .buying-journey-steps {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    z-index: 2;

    @media (width>=768px) {
      flex-direction: row;
      justify-content: space-between;
      gap: 8px;
    }
  }

  .buying-journey-step {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 20px;
    align-items: flex-start;

    @media (width>=768px) {
      flex-direction: column;
      width: 200px;
      gap: 0;
      align-items: stretch;
    }

    .buying-journey-step-icon {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 2px solid var(--tertiary-color);
      background: #1c1c1c;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 0;
      flex-shrink: 0;
      transition: all 0.3s ease;
      overflow: hidden;

      @media (width>=768px) {
        width: 48px;
        height: 48px;
      }

      @media (width>=1024px) {
        width: 64px;
        height: 64px;
      }

      picture {
        display: flex;
      }

      img,
      span.icon {
        width: 18px !important;
        height: 18px !important;

        @media (width>=768px) {
          width: 20px !important;
          height: 20px !important;
        }

        @media (width>=1024px) {
          width: 25px !important;
          height: 25px !important;
        }
      }

      .step-icon-default {
        display: block;
      }

      .step-icon-active {
        display: none;
      }
    }

    .buying-journey-step-text-wrapper {
      text-align: left;
      margin-top: 8px;

      @media (width>=768px) {
        margin-top: 16px;
      }

      @media (width>=768px) {
        margin-top: 24px;
      }
    }

    .buying-journey-step-label {
      display: inline-block;
      color: var(--tertiary-color);
      font-size: var(--fs-small);
      font-style: normal;
      font-weight: var(--fw-400);
      line-height: 120%; /* 16.8px */
      letter-spacing: -0.21px;
      transition: all 0.3s ease;
      opacity: 0.6;
      padding-bottom: 4px;

      @media (width>=768px) {
        font-size: var(--fs-small);
        letter-spacing: -0.24px;
      }

      @media (width>=1024px) {
        font-size: var(--fs-xmedium);
        letter-spacing: -0.36px;
        padding-bottom: 12px;
      }
    }

    .buying-journey-step-description {
      color: var(--neutrals-bars-unselected);
      font-size: var(--fs-xsmall);
      opacity: 0;
      font-style: normal;
      font-weight: var(--fw-400);
      line-height: var(--lh-130p);
      letter-spacing: var(--letter-spacing-body-low, 0.24px);

      @media (width>=768px) {
        font-weight: var(--fw-300);
      }

      @media (width>=1024px) {
        font-size: var(--fs-xmedium);
      }
    }

    &.active {
      .buying-journey-step-icon {
        border: 2.286px solid var(--primary-color);
        background: #d5d7ff;
      }

      .buying-journey-step-label {
        opacity: 1;
        font-weight: var(--fw-500);

        @media (width>=768px) {
          font-size: var(--fs-medium);
        }

        @media (width>=1024px) {
          font-size: var(--fs-xlarge);
        }
      }

      .step-icon-default {
        display: none;
      }

      .step-icon-active {
        display: block;
      }
    }

    &.current {
      .buying-journey-step-description {
        opacity: 1;
        max-height: 100px; /* Allows it to slide down */
      }
    }
  }
}
