// 会员购买弹窗样式
@use '../variables' as *;

// 遮罩层
.member-dialog-overlay {
  position: fixed;
  inset: 0;
  background: $overlay-bg;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-dialog {
  background: $bg-white;
  border-radius: 0.2rem;
  width: 8.4rem;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0.36rem 0.4rem;
  position: relative;
  box-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.15);

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

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

  // 顶部标语
  &__slogan {
    text-align: center;
    font-size: 0.22rem;
    font-weight: 700;
    color: $btn-dark;
    margin-bottom: 0.3rem;
    letter-spacing: 0.01rem;
  }

  // ==================== 套餐卡片区域 ====================
  &__plans {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 0.32rem;
  }

  &__plan-card {
    flex: 1;
    border: 1px solid $border-color;
    border-radius: 0.14rem;
    padding: 0.22rem 0.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    &:hover {
      border-color: $accent;
      box-shadow: 0 0.04rem 0.16rem rgba(79, 194, 201, 0.12);
    }

    // 选中态 — 中间卡片高亮
    &--active {
      border-color: $btn-dark;
      background: $btn-dark;
      color: $bg-white;
      box-shadow: 0 0.06rem 0.24rem rgba(26, 26, 46, 0.2);

      .member-dialog__plan-name,
      .member-dialog__plan-original,
      .member-dialog__plan-price-num,
      .member-dialog__plan-price-unit {
        color: $bg-white;
      }

      .member-dialog__plan-btn {
        background: $accent;
        color: $bg-white;
        border-color: $accent;

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

      .member-dialog__plan-discount {
        background: rgba(255, 255, 255, 0.2);
        color: $bg-white;
      }
    }
  }

  &__plan-name {
    font-size: 0.15rem;
    font-weight: 600;
    color: $text-dark;
    margin-bottom: 0.06rem;
  }

  &__plan-original {
    font-size: 0.11rem;
    color: $text-light;
    text-decoration: line-through;
    margin-bottom: 0.08rem;
  }

  &__plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.02rem;
    margin-bottom: 0.16rem;
  }

  &__plan-price-num {
    font-size: 0.28rem;
    font-weight: 700;
    color: $text-dark;
    line-height: 1;
  }

  &__plan-price-unit {
    font-size: 0.12rem;
    color: $text-dark;
  }

  &__plan-discount {
    font-size: 0.1rem;
    background: $theme-color;
    color: $accent;
    border-radius: 0.1rem;
    padding: 0.02rem 0.08rem;
    margin-left: 0.06rem;
    font-weight: 600;
    white-space: nowrap;
  }

  &__plan-btn {
    width: 100%;
    padding: 0.1rem 0;
    border-radius: 0.2rem;
    font-size: 0.13rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid $border-color;
    background: $bg-main;
    color: $text-dark;
    text-align: center;

    &:hover {
      border-color: $accent;
      color: $accent;
      background: $theme-color;
    }
  }

  // ==================== 权益对比区域 ====================
  &__benefits {
    display: flex;
    gap: 0.16rem;
  }

  &__benefit-col {
    flex: 1;
    border: 1px solid $border-color;
    border-radius: 0.12rem;
    padding: 0.2rem 0.18rem;
    display: flex;
    flex-direction: column;
    gap: 0.14rem;

    // 中间列特殊样式
    &--center {
      border-color: rgba(79, 194, 201, 0.3);
      background: linear-gradient(180deg, $theme-color 0%, $bg-white 100%);
    }
  }

  &__benefit-title {
    font-size: 0.14rem;
    font-weight: 600;
    color: $text-dark;
    padding-bottom: 0.1rem;
    border-bottom: 1px solid $border-color;

    // 会员权益标题强调色
    &--accent {
      color: $accent;
      border-bottom-color: rgba(79, 194, 201, 0.3);
    }
  }

  &__benefit-item {
    font-size: 0.12rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.08rem;
    line-height: 1.6;
  }

  &__benefit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.36rem;
    height: 0.2rem;
    background: $btn-dark;
    color: $bg-white;
    border-radius: 0.04rem;
    font-size: 0.1rem;
    font-weight: 600;
    flex-shrink: 0;
  }

  &__benefit-other {
    font-size: 0.12rem;
    color: $text-light;
    margin-top: auto;
    padding-top: 0.12rem;
    border-top: 1px solid $border-color;
  }

  &__benefit-highlight {
    font-weight: 700;
    color: $text-dark;
    margin-left: 0.12rem;
  }
}
