.design-tool {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.design-tool__description {
  margin: 0;
  color: rgba(26, 28, 30, 0.7);
}

.design-tool__card {
  padding: 1.25rem;
  border: 1px solid rgba(26, 28, 30, 0.12);
  border-radius: 18px;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 6px 20px rgba(26, 28, 30, 0.05);
  position: relative;
  overflow: hidden;
}

.design-tool__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  font-size: calc(var(--body5-font-size) * 1.2);
  line-height: 1.4;
  color: #000;
}

.design-tool__title-icon {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: #000;
}

.design-tool__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.design-tool__action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 28, 30, 0.25);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  background-color: #fff;
  color: #1a1c1e;
}

.design-tool__action-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.design-tool__action-button--primary {
  background-color: #1a1c1e;
  color: #fff;
  border-color: #1a1c1e;
}

/* 加购按钮文字与上方设计按钮保持一致字号 */
.product-form__submit.design-tool__action-button--primary {
  font-size: 0.875rem;
}

.design-tool__action-button--secondary {
  background-color: #f7f7f7;
}

.design-tool__pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.design-tool__pane label {
  font-weight: 600;
  color: #1a1c1e;
}

.design-tool__hint {
  margin: 0;
  color: rgba(26, 28, 30, 0.6);
}

.design-tool__meta-inline {
  margin: 0;
  color: rgba(26, 28, 30, 0.55);
}

.design-tool__mobile-tip {
  display: none;
  margin-top: 0.25rem;
}

.design-tool__preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.design-tool__preview[hidden] {
  display: none;
}

.design-tool__preview-label {
  font-weight: 600;
  color: #1a1c1e;
}

.design-tool__preview-media {
  position: relative;
  min-height: 180px;
  border-radius: 12px;
  border: 1px dashed rgba(26, 28, 30, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
  background-color: #fdfdfd;
}

/* 文件(非图片):矮一些,只显示文件名 */
.design-tool__preview-media--file {
  min-height: auto;
  padding: 12px 16px;
}

.design-tool__preview-media--file .design-tool__preview-icon,
.design-tool__preview-media--file .design-tool__preview-placeholder-sub {
  display: none;
}

.design-tool__preview-image {
  max-width: 100%;
  max-height: 320px;
  border-radius: 8px;
  object-fit: contain;
}

.design-tool__preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: rgba(26, 28, 30, 0.5);
}

.design-tool__preview-placeholder[hidden] {
  display: none;
}

.design-tool__preview-icon {
  width: 40px;
  height: 40px;
  color: rgba(26, 28, 30, 0.3);
}

.design-tool__preview-placeholder-text {
  color: rgba(26, 28, 30, 0.62);
}

.design-tool__preview-placeholder-sub {
  color: rgba(26, 28, 30, 0.42);
}

.design-tool__error {
  margin: 0;
  color: #d82c0d;
  font-weight: 600;
}

/* 删除按钮:预览区右上角的图标按钮 */
.design-tool__clear {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(26, 28, 30, 0.18);
  color: #d82c0d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.design-tool__clear-icon {
  width: 17px;
  height: 17px;
}

.design-tool__clear:hover,
.design-tool__clear:focus-visible {
  background-color: #d82c0d;
  color: #fff;
  box-shadow: 0 2px 6px rgba(216, 44, 13, 0.35);
}

.design-tool__clear:active {
  background-color: #a21f05;
}

.design-tool__clear[hidden] {
  display: none !important;
}

.design-tool__free-proof {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #000;
  background-color: rgba(12, 35, 64, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
}

.design-tool__free-proof-item {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}

.design-tool__free-proof-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.design-tool__free-proof-icon--accent {
  color: #000;
}

.design-tool__free-proof-icon--muted {
  color: rgba(26, 28, 30, 0.4);
}

.design-tool__free-proof-highlight {
  color: #e97723;
  font-weight: 700;
}

.design-tool__free-proof-text {
  color: #000;
}

.design-tool__free-proof-sub {
  color: rgba(26, 28, 30, 0.55);
}

.design-tool__card--loading {
  pointer-events: none;
}

.design-tool__card--loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: inherit;
  z-index: 1;
}

.design-tool__card--loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  margin-left: -16px;
  border-radius: 50%;
  border: 3px solid rgba(26, 28, 30, 0.2);
  border-top-color: #1a1c1e;
  animation: design-tool-spin 0.8s linear infinite;
  z-index: 2;
}

@keyframes design-tool-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 隐藏 Pacdora 设计工具中的 Outside/Inside 预览图 */
.side-pop-box .side-pop-item {
  height: auto !important;
}

.side-pop-box .side-pop-item img {
  display: none !important;
}

@media (max-width: 749px) {
  .design-tool__action-button {
    width: 100%;
    justify-content: center;
  }

  .design-tool__mobile-tip {
    display: block;
  }
}
