<template>
  <div class="step-box bg-white"><slot></slot></div>
</template>

<script setup lang="ts"></script>

<style lang="less" scoped>
  @keyframes rotation {
    from {
      transform: rotate(0deg);
    }

    to {
      transform: rotate(360deg);
    }
  }
  @keyframes rotationReverse {
    from {
      transform: rotate(0deg);
    }

    to {
      transform: rotate(-360deg);
    }
  }

  .step-box {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    margin: 10px 0;
    border-radius: 16px;

    :deep(.ant-steps) {
      .ant-steps-item-icon {
        margin-right: 16px;
        width: 37px;
        height: 37px;
        line-height: 37px;

        .ant-steps-icon {
          font-size: 18px;
          font-weight: bold;
        }
      }

      .ant-steps-item-container {
        height: 44px;
        padding-top: 4px;
        padding-left: 5px;
      }

      .ant-steps-item-process {
        .ant-steps-item-icon {
          border: 3px solid #fff;
          animation: rotation 4s linear infinite;
          position: relative;

          &::before {
            border: 2px dashed #1890ff;
            content: '';
            width: 44px;
            height: 44px;
            display: block;
            border-radius: 50%;
            position: absolute;
            left: -6px;
            top: -6px;
          }

          .ant-steps-icon {
            display: inline-block;
            animation: rotationReverse 4s linear infinite;
            line-height: 32px;
            inset: 0;
            position: absolute;
          }
        }
      }

      .ant-steps-item-wait {
        .ant-steps-item-icon {
          background-color: #f0f0f0;
          border-color: #f0f0f0;

          .ant-steps-icon {
            color: #cacaca;
          }
        }
      }

      .ant-steps-item-finish .ant-steps-item-icon {
        background-color: #eaf4ff;
        border-color: #eaf4ff;
      }

      .ant-steps-item-title::after {
        background-color: #eee;
      }
    }
  }
</style>
