/* ========== 图纸助手 CSS ========== */

/* 上传区域 */
.step-upload-area {
  border: 2px dashed #d9d9d9;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
  margin-bottom: 16px;
}

.step-upload-area:hover {
  border-color: #1890ff;
  background: #f0f7ff;
}

.step-upload-area.drag-over {
  border-color: #1890ff;
  background: #e6f4ff;
  transform: scale(1.01);
  box-shadow: 0 0 12px rgba(24, 144, 255, 0.2);
}

.step-upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.step-upload-text {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.step-upload-hint {
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

/* 加载状态 */
.step-loading {
  text-align: center;
  padding: 48px 24px;
}

.step-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e8e8e8;
  border-top-color: #1890ff;
  border-radius: 50%;
  animation: step-spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes step-spin {
  to { transform: rotate(360deg); }
}

/* 错误提示 */
.step-error {
  padding: 12px 16px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 8px;
  color: #cf1322;
  font-size: 13px;
  margin-bottom: 16px;
}

/* 文件信息网格 */
.step-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.step-info-card {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 12px 16px;
}

.step-info-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.step-info-value {
  font-size: 14px;
  color: #333;
  font-weight: 600;
  word-break: break-all;
}

/* 外形尺寸 */
.step-dimension-card {
  background: linear-gradient(135deg, #e6f7ff, #f0f5ff);
  border: 1px solid #91d5ff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.step-dim-title {
  font-size: 14px;
  font-weight: 600;
  color: #1890ff;
  margin-bottom: 12px;
}

.step-dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.step-dim-item {
  text-align: center;
  background: white;
  border-radius: 8px;
  padding: 10px 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.step-dim-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}

.step-dim-value {
  font-size: 18px;
  font-weight: 700;
  color: #1890ff;
}

.step-dim-total {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: #555;
  font-weight: 500;
}

/* 产品标签 */
.step-products {
  margin-bottom: 16px;
}

.step-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-right: 6px;
  margin-bottom: 6px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #52c41a;
}

.step-tag-gray {
  background: #f5f5f5;
  border-color: #d9d9d9;
  color: #666;
}

/* 3D 预览区域 */
.step-3d-section {
  margin-bottom: 16px;
}

.step-3d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.step-3d-container {
  position: relative;
  width: 100%;
  height: 400px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f2f5;
}

.step-3d-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.step-3d-placeholder {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.step-3d-hint {
  text-align: center;
  font-size: 11px;
  color: #aaa;
  margin-top: 6px;
}

/* 响应式 */
@media (max-width: 600px) {
  .step-dim-grid {
    grid-template-columns: 1fr;
  }

  .step-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .step-3d-container {
    height: 300px;
  }
}
