@use 'sass:color';
@use '../variables' as *;

// ==================== 注销账号弹窗 ====================
.delete-account-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: $overlay-bg;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-account-dialog {
  position: relative;
  width: 9.0rem;
  min-height: 5.6rem;
  background: $bg-white;
  border-radius: 0.12rem;
  padding: 0.32rem 0.4rem;
  box-shadow: 0 0.04rem 0.2rem rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  max-height: 90vh;

  // 关闭按钮
  &__close {
    position: absolute;
    top: 0.16rem;
    right: 0.2rem;
    font-size: 0.18rem;
    color: $text-light;
    cursor: pointer;
    z-index: 1;
    transition: color 0.2s;

    &:hover {
      color: $text-dark;
    }
  }

  // ===== 步骤条 =====
  &__steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.28rem;
  }

  &__step {
    display: flex;
    align-items: center;
    gap: 0.06rem;
  }

  &__step-num {
    width: 0.22rem;
    height: 0.22rem;
    border-radius: 50%;
    background: $bg-main;
    color: $text-light;
    font-size: 0.12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
  }

  &__step-label {
    font-size: 0.13rem;
    color: $text-light;
  }

  &__step--active &__step-num {
    background: $accent;
    color: $bg-white;
  }

  &__step--active &__step-label {
    color: $accent;
    font-weight: 600;
  }

  &__step--done &__step-num {
    background: $accent;
    color: $bg-white;
  }

  &__step--done &__step-label {
    color: $text-middle;
  }

  &__step-line {
    width: 0.6rem;
    height: 1px;
    background: $border-color;
    margin: 0 0.12rem;
  }

  // ===== 标题 =====
  &__title {
    font-size: 0.22rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.08rem 0;
  }

  &__subtitle {
    font-size: 0.13rem;
    color: $text-middle;
    margin: 0 0 0.24rem 0;
    line-height: 1.6;
  }

  // ===== 主体内容 =====
  &__body {
    display: flex;
    gap: 0.24rem;
  }

  // ===== 左侧警告列表 =====
  &__warnings {
    flex: 1;
    min-width: 0;
  }

  &__warning-item {
    display: flex;
    gap: 0.12rem;
    padding: 0.16rem;
    border: 1px solid $border-color;
    border-radius: 0.08rem;
    margin-bottom: 0.12rem;

    &--danger {
      border-color: rgba($danger, 0.3);
      background: rgba($danger, 0.02);
    }
  }

  &__warning-icon {
    flex-shrink: 0;
    width: 0.2rem;
    height: 0.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.12rem;
    font-weight: 700;
    margin-top: 0.02rem;

    &--danger {
      background: $danger;
      color: $bg-white;
    }

    &--orange {
      color: #F5A623;
      background: none;
      font-size: 0.1rem;
    }
  }

  &__warning-content {
    flex: 1;
    min-width: 0;
  }

  &__warning-title {
    font-size: 0.14rem;
    font-weight: 700;
    color: $text-dark;
    margin-bottom: 0.04rem;

    &--danger {
      color: $danger;
    }
  }

  &__warning-desc {
    font-size: 0.12rem;
    color: $text-middle;
    line-height: 1.6;
    margin: 0;
  }

  // ===== 确认勾选 =====
  &__confirm-check {
    margin-top: 0.16rem;
    margin-bottom: 0.2rem;
  }

  &__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.08rem;
    font-size: 0.12rem;
    color: $text-dark;
    cursor: pointer;
    line-height: 1.6;
  }

  &__checkbox {
    margin-top: 0.03rem;
    flex-shrink: 0;
  }

  // ===== 底部按钮 =====
  &__actions {
    display: flex;
    gap: 0.16rem;

  }

  &__btn {
    height: 0.44rem;
    line-height: 0.44rem;
    border-radius: 0.14rem;
    font-size: 0.13rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    flex: 1;

    &:disabled {
      opacity: 0.5;

      cursor: not-allowed;
    }

    &--outline {
      background: #DBE4F0;
      border: 1px solid $border-color;
      color: $text-dark;

      &:hover:not(:disabled) {
        border-color: $text-middle;
      }
    }

    &--danger {
      background: #DC2626;
      color: $bg-white;

      &:hover:not(:disabled) {
        background: color.adjust(#DC2626, $lightness: -8%);
      }
    }

    &--primary {
      background: $accent;
      color: $bg-white;

      &:hover {
        background: $accent-hover;
      }
    }
  }

  // ===== 右侧账户状态卡片 =====
  &__account-status {
    width: 2.6rem;
    flex-shrink: 0;
    background: $bg-white;
    border: 1px solid $border-color;
    border-radius: 0.1rem;
    padding: 0.2rem;
    align-self: flex-start;
  }

  &__status-title {
    font-size: 0.16rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.16rem 0;
  }

  &__status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.1rem 0;
    border-bottom: 1px solid $border-color;

    &:last-of-type {
      border-bottom: none;
    }
  }

  &__status-label {
    font-size: 0.12rem;
    color: $text-middle;
  }

  &__status-value {
    font-size: 0.13rem;
    color: $text-dark;
    font-weight: 600;

    &--danger {
      color: $danger;
    }
  }

  &__status-notice {
    margin-top: 0.12rem;
    padding: 0.1rem 0.12rem;
    background: rgba($danger, 0.05);
    border: 1px solid rgba($danger, 0.2);
    border-radius: 0.06rem;
    font-size: 0.11rem;
    color: $danger;
    line-height: 1.6;
  }

  // ===== 步骤2：二次确认 =====
  &__confirm-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.5rem 0.8rem;
  }

  &__confirm-icon {
    width: 0.56rem;
    height: 0.56rem;
    border-radius: 50%;
    background: rgba($danger, 0.1);
    color: $danger;
    font-size: 0.24rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
  }

  &__confirm-title {
    font-size: 0.22rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.12rem 0;
  }

  &__confirm-desc {
    font-size: 0.13rem;
    color: $text-middle;
    line-height: 1.6;
    margin: 0 0 0.28rem 0;
    max-width: 3.6rem;
  }

  &__confirm-actions {
    display: flex;
    gap: 0.2rem;
    width: 100%;
    max-width: 4.0rem;
  }

  &__confirm-btn {
    flex: 1;
    height: 0.44rem;
    border-radius: 0.06rem;
    font-size: 0.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;

    &--cancel {
      background: #EDF1F7;
      border: none;
      color: $text-dark;

      &:hover {
        border-color: $text-middle;
      }
    }

    &--danger {
      background: #DC2626;
      border: none;
      color: $bg-white;

      &:hover {
        background: color.adjust(#DC2626, $lightness: -8%);
      }
    }
  }

  // ===== 步骤2（备用）：安全验证 =====
  &__verify {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0;
  }

  &__verify-card {
    background: $bg-white;
    border: 1px solid $border-color;
    border-radius: 0.12rem;
    padding: 0.32rem 0.4rem;
    width: 4.6rem;
    text-align: center;
  }

  &__verify-card-title {
    font-size: 0.18rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.08rem 0;
    text-align: left;
  }

  &__verify-card-desc {
    font-size: 0.13rem;
    color: $accent;
    margin: 0 0 0.24rem 0;
    text-align: left;
  }

  &__verify-input-row {
    display: flex;
    gap: 0.12rem;
    margin-bottom: 0.24rem;
  }

  &__verify-input {
    flex: 1;
    height: 0.4rem;
    border: 1px solid $border-color;
    border-radius: 0.2rem;
    padding: 0 0.16rem;
    font-size: 0.14rem;
    outline: none;
    transition: border-color 0.2s;

    &:focus {
      border-color: $accent;
    }
  }

  &__verify-send {
    white-space: nowrap;
    padding: 0 0.2rem;
    height: 0.4rem;
    border: 1px solid $border-color;
    border-radius: 0.2rem;
    background: $bg-white;
    color: $text-dark;
    font-size: 0.13rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;

    &:hover:not(:disabled) {
      border-color: $accent;
      color: $accent;
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  &__verify-next-btn {
    width: 100%;
    height: 0.44rem;
    border: none;
    border-radius: 0.22rem;
    background: $accent;
    color: $bg-white;
    font-size: 0.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 0.12rem;

    &:hover:not(:disabled) {
      background: $accent-hover;
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  &__verify-tip {
    font-size: 0.12rem;
    color: $text-light;
    margin: 0;
  }

  // ===== 步骤3：完成 =====
  &__done-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: $bg-white;
    border: 1px solid $border-color;
    border-radius: 0.12rem;
    padding: 0.6rem 0.8rem;
    margin-top: 0.4rem;
    text-align: center;
  }

  &__done-icon {
    width: 0.56rem;
    height: 0.56rem;
    border-radius: 50%;
    background: rgba($accent, 0.15);
    color: $accent;
    font-size: 0.26rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
  }

  &__done-title {
    font-size: 0.22rem;
    font-weight: 700;
    color: $text-dark;
    margin: 0 0 0.12rem 0;
  }

  &__done-desc {
    font-size: 0.13rem;
    color: $text-middle;
    margin: 0 0 0.28rem 0;
    line-height: 1.6;
  }

  &__done-btn {
    width: 2.6rem;
    height: 0.44rem;
    border: none;
    border-radius: 0.12rem;
    background: $accent;
    color: $bg-white;
    font-size: 0.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;

    &:hover {
      background: $accent-hover;
    }
  }
}
