/**
 * 拼团活动样式
 * @author cany(3808684706)
 */

.group-buy-page {
  padding: 20px;
}

.page-header {
  margin-bottom: 30px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: #303133;
  margin: 0 0 8px 0;
}

.page-subtitle {
  font-size: 14px;
  color: #909399;
  margin: 0;
}

/* 加载状态 */
.loading-wrapper {
  text-align: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #409eff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 活动列表 */
.activity-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.activity-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
  padding: 24px;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* 活动状态 */
.activity-status {
  position: absolute;
  top: 15px;
  right: 15px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-ongoing {
  background: linear-gradient(135deg, #67c23a, #5daf34);
  color: #fff;
}

/* 活动标题 */
.activity-title {
  font-size: 18px;
  font-weight: 600;
  color: #303133;
  margin: 0 0 20px 0;
  padding-right: 80px;
}

/* 价格区域 */
.price-section {
  margin-bottom: 20px;
}

.original-price {
  font-size: 14px;
  color: #909399;
  text-decoration: line-through;
  margin-bottom: 12px;
}

.group-prices {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.price-item {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 12px 8px;
  background: linear-gradient(135deg, #fff6f6, #fff);
  border: 1px solid #fde2e2;
  border-radius: 8px;
}

.price-item .type {
  display: block;
  font-size: 12px;
  color: #909399;
  margin-bottom: 4px;
}

.price-item .amount {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #f56c6c;
}

/* 配置描述 */
.config-desc {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.desc-label {
  font-size: 12px;
  color: #909399;
  margin-bottom: 4px;
}

.desc-content {
  font-size: 14px;
  color: #606266;
  line-height: 1.6;
  height: 1rem;
  overflow-y: auto;
}

/* 活动时间 */
.activity-time {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #f56c6c;
  margin-bottom: 16px;
}

.activity-time i {
  margin-right: 6px;
}

/* 进行中的拼团 */
.pending-groups {
  margin-bottom: 16px;
}

.pending-label {
  display: inline-block;
  padding: 4px 10px;
  background: #fef0f0;
  color: #f56c6c;
  border-radius: 4px;
  font-size: 12px;
}

/* 操作按钮 */
.activity-action {
  text-align: center;
}

.btn-join {
  width: 100%;
  padding: 12px 24px;
  background: var(--color-primary);
  /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-join:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 64px;
  color: #dcdfe6;
  margin-bottom: 20px;
}

.empty-text {
  font-size: 16px;
  color: #909399;
}

/* 弹窗样式 */
.group-type-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-type-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f5f7fa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.group-type-item:hover {
  background: #ecf5ff;
  border-color: #409eff;
}

.type-name {
  font-size: 16px;
  font-weight: 500;
  color: #303133;
}

.type-price {
  font-size: 22px;
  font-weight: 600;
  color: #f56c6c;
}

/* 确认弹窗样式 */
.confirm-content {
  line-height: 2;
  color: #606266;
  font-size: 14px;
}

.confirm-content p {
  margin: 0 0 12px 0;
}

.confirm-content .highlight {
  color: #f56c6c;
  font-weight: 600;
}

.confirm-content .confirm-question {
  margin-top: 20px;
  font-weight: 500;
  color: #303133;
}

/* 折扣相关样式 */
.discount-tag {
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(135deg, #67c23a, #5daf34);
  color: #fff;
  font-size: 12px;
  border-radius: 10px;
  margin-left: 6px;
}

.type-price-wrap {
  text-align: right;
}

.type-price-wrap .type-price {
  display: block;
}

.type-original-price {
  font-size: 12px;
  color: #909399;
  text-decoration: line-through;
  margin-right: 8px;
}

.type-discount {
  font-size: 12px;
  color: #67c23a;
}

.discount-info {
  font-size: 12px;
  color: #67c23a;
  margin-left: 4px;
}

/* 余额不足引导充值弹窗 */
.recharge-guide-content {
  text-align: center;
  padding: 20px 0;
}

.recharge-guide-content .guide-icon {
  margin-bottom: 20px;
}

.recharge-guide-content .guide-line1 {
  font-size: 18px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 12px;
}

.recharge-guide-content .guide-line2 {
  font-size: 14px;
  color: #606266;
  margin: 0;
}
