/* 订单列表页样式 - 根据tcb-shop-demo设计规范 */

/* 主色调定义 */
:root {
  --primary-color: #1677ff;
  --primary-hover: #4096ff;
  --success-color: #52c41a;
  --warning-color: #faad14;
  --error-color: #ff4d4f;
  --text-primary: #262626;
  --text-secondary: #595959;
  --text-tertiary: #8c8c8c;
  --border-color: #f0f0f0;
  --background-color: #f5f5f5;
}

/* 订单卡片样式 */
.order-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  margin-bottom: 12px;
  overflow: hidden;
}

.order-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-card-body {
  padding: 16px;
}

.order-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 商品项样式 */
.order-goods-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.order-goods-image {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  margin-right: 12px;
  object-fit: cover;
}

.order-goods-info {
  flex: 1;
}

.order-goods-name {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-goods-price {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 状态标签样式 */
.status-tag {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-tag-pending {
  background: #fff7e6;
  color: #fa8c16;
}

.status-tag-paid {
  background: #f6ffed;
  color: #52c41a;
}

.status-tag-shipped {
  background: #e6f7ff;
  color: #1890ff;
}

.status-tag-completed {
  background: #f6ffed;
  color: #52c41a;
}

.status-tag-cancelled {
  background: #fff2f0;
  color: #ff4d4f;
}

/* 操作按钮样式 */
.action-button {
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
  cursor: pointer;
}

.action-button-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.action-button-outline {
  background: white;
  color: var(--text-secondary);
  border-color: #d9d9d9;
}

.action-button-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 标签栏样式 */
.tab-bar {
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.tab-item {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.tab-item-active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

/* 空状态样式 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  color: var(--text-tertiary);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state-text {
  font-size: 14px;
  margin-bottom: 16px;
}

.empty-state-button {
  background: var(--primary-color);
  color: white;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* 加载状态样式 */
.loading-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 480px) {
  .order-card-header,
  .order-card-body,
  .order-card-footer {
    padding: 12px;
  }

  .tab-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .action-button {
    padding: 4px 12px;
    font-size: 11px;
  }
}