@use "variables";

$vertical-step-height: 300px;

.fwe-stepper-vertical {
  display: flex;
  flex-direction: column;
  justify-content: center;

  .fwe-step-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: right;
    position: relative;
    .fwe-step {
      padding-top: -1px;
      padding-bottom: 1px;
      position: relative;
      border-radius: 50%;
      border: 2px solid variables.$text-disabled;
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: border-color 0.3s, background-color 0.3s, color 0.3s;

      .fwe-step-no {
        color: variables.$text-disabled;
        font-size: variables.$font-size-md;
        font-weight: variables.$font-weight-bold;
      }

      .fwe-step-name {
        font-family: variables.$font-family-base;
        font-size: variables.$font-size-md;
        position: absolute;
        left: 36px;
        color: variables.$text-disabled;
        white-space: pre;
        transition: color 0.3s;
      }
    }

    .fwe-step-content-container {
      .fwe-step-content {
        padding-top: 12px;
        padding-bottom: 32px;
        opacity: 0;
        transition: opacity 0.3s ease;
      }
      height: 20px;
      transition: height 0.3s;
      margin-top: 4px;
      margin-bottom: 4px;
      border-left: 2px solid variables.$text-disabled;
      padding-left: 26px;
      margin-left: 11px;
      text-align: left;
      position: relative;
      overflow: hidden;
    }

    &.fwe-step-active,
    &.fwe-step-done {
      .fwe-step-content-container {
        border-color: variables.$hero;
      }
      .fwe-step {
        background: variables.$hero;
        border-color: variables.$hero;
        .fwe-step-no {
          color: variables.$white;
        }
        .fwe-step-name {
          color: variables.$hero;
        }
      }
    }

    &.fwe-step-active {
      .fwe-step-content-container {
        height: $vertical-step-height;
        .fwe-step-content {
          opacity: 1;
        }
      }
      .fwe-step {
        .fwe-step-name {
          font-weight: variables.$font-weight-bold;
        }
      }
    }

    &.fwe-step-done {
      .fwe-step {
        cursor: pointer;
        &:hover {
          background: variables.$hero-active;
          border-color: variables.$hero-active;
        }
        .fwe-step-no {
          display: none;
        }
        &:before {
          content: "";
          position: absolute;
          left: 2px;
          top: 2px;
          height: 16px;
          width: 16px;
          background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PGcgZGF0YS1uYW1lPSJjb250ZW50Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDE2djE2SDB6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTYuMTQxIDEyLjgxNCAxLjkzNCA4LjYwN2wxLjQxNC0xLjQxNCAyLjc5MyAyLjc5MyA2Ljc5My02Ljc5MyAxLjQxNCAxLjQxNC04LjIwNyA4LjIwN3oiLz48L2c+PC9zdmc+");
        }
      }
    }
  }

  .fwe-step-container.fwe-last-element {
    .fwe-step-content-container {
      border-color: transparent;
    }
  }
}
