/* 通用 Wizard Card 样式。两品牌共用；品牌色用 CSS 变量在 HTML 里覆写。 */

:root {
  --brand-primary: #ff6a00;
  --brand-primary-hover: #e55f00;
  --wizard-bg: #fff;
  --wizard-shadow: 0 0 15px rgba(0, 0, 0, 0.06);
  --text-1: #1f2937;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --line: #e5e7eb;
  --danger: #d92d20;
  --success: #027a48;
  --warn-bg: #fef6e7;
  --warn-fg: #93561d;
}

.wizard-section {
  padding: 24px 16px 32px;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
}

.wizard-title {
  text-align: center;
  font-size: clamp(20px, 3vw, 28px);
  margin: 8px 0 4px;
  color: var(--text-1);
  font-weight: 700;
}

.wizard-subtitle {
  text-align: center;
  color: var(--text-3);
  margin: 0 0 20px;
  font-size: 14px;
}

.wizard-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--wizard-bg);
  border-radius: 14px;
  box-shadow: var(--wizard-shadow);
  padding: 24px 20px 28px;
  box-sizing: border-box;
}

.wizard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.wizard-progress span {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  transition: background 0.25s ease;
}
.wizard-card[data-step="1"] .wizard-progress span:nth-child(1),
.wizard-card[data-step="2"] .wizard-progress span:nth-child(-n+2),
.wizard-card[data-step="3"] .wizard-progress span:nth-child(-n+3) {
  background: var(--brand-primary);
}

.wizard-step-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 4px;
}
.wizard-step-heading {
  font-size: 20px;
  margin: 0 0 16px;
  color: var(--text-1);
  font-weight: 700;
}

/* Steps */
.wizard-step { display: none; }
.wizard-card[data-step="1"] .wizard-step[data-step="1"],
.wizard-card[data-step="2"] .wizard-step[data-step="2"],
.wizard-card[data-step="3"] .wizard-step[data-step="3"],
.wizard-card[data-step="sent"] .wizard-step[data-step="sent"] {
  display: block;
  animation: fade-in 0.2s ease both;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: none; }
}

/* Form */
.wizard-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border 0.15s ease;
  font-family: inherit;
}
.wizard-input:focus {
  border-color: var(--brand-primary);
}
.wizard-hint {
  font-size: 12px;
  color: var(--text-3);
  margin: 6px 2px 0;
}
.wizard-error-line {
  font-size: 13px;
  color: var(--danger);
  margin: 8px 2px 0;
  min-height: 18px;
}

.wizard-banner {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.wizard-banner.is-hidden { display: none; }

/* Buttons */
.wizard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border 0.15s ease, color 0.15s ease;
  font-family: inherit;
  margin-top: 10px;
}
.wizard-btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.wizard-btn-primary:hover {
  background: var(--brand-primary-hover);
}
.wizard-btn-primary:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}
.wizard-btn-secondary {
  background: #fff;
  color: var(--text-1);
  border-color: var(--line);
}
.wizard-btn-secondary:hover {
  border-color: #c7ced9;
}
.wizard-btn-text {
  background: transparent;
  color: var(--text-2);
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 500;
  width: auto;
}

.wizard-btn-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.wizard-btn-row .wizard-btn { margin-top: 0; }
.wizard-btn-row .wizard-btn-secondary { flex: 0 0 auto; width: auto; padding: 10px 14px; }

/* Checkboxes */
.wizard-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border 0.15s ease, background 0.15s ease;
  font-size: 15px;
  color: var(--text-1);
}
.wizard-checkbox:hover { border-color: #c7ced9; }
.wizard-checkbox input { margin-top: 2px; accent-color: var(--brand-primary); }
.wizard-checkbox-desc {
  display: block;
  color: var(--text-3);
  font-size: 12px;
  margin-top: 2px;
}

/* Product card */
.product-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.product-card img {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
}
.product-card .product-meta {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.product-card .product-title {
  color: var(--text-1);
  font-weight: 600;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading spinner inside button */
.wizard-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Other providers (collapsible) */
.wizard-others {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.wizard-others summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  list-style: none;
  user-select: none;
}
.wizard-others summary::-webkit-details-marker { display: none; }
.wizard-others summary::after { content: " ▾"; color: var(--text-3); }
.wizard-others[open] summary::after { content: " ▴"; }

/* ===== Step 1 验证失败：醒目提示 + 客服邮箱 ===== */
#verify-failure.is-hidden { display: none; }
.wizard-verify-fail {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
}
.wizard-verify-fail-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #b42318;
}
.wizard-verify-fail-desc {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}
.wizard-verify-fail-emailrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* ===== 备选发送方式（明确展示收件人/主题/正文 + 复制按钮） ===== */
.wizard-fallback-box {
  margin-top: 4px;
  padding: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
}
.wizard-fallback-heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}
.wizard-fallback-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
}
.wizard-fallback-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}
.wizard-fallback-email {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  word-break: break-all;
}
.wizard-fallback-email:hover { text-decoration: underline; }
.wizard-fallback-value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  color: var(--text-1);
  word-break: break-word;
}
.wizard-fallback-copy-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.wizard-fallback-copy-btn:hover { background: var(--brand-primary-hover); }
.wizard-fallback-body-label {
  margin: 12px 0 6px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wizard-status-note {
  margin: 14px 0 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  background: #f3f4f6;
  border-radius: 8px;
}

#step3-status.is-hidden { display: none; }

.wizard-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: rgba(31, 41, 55, 0.94);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}
.wizard-toast.is-show { opacity: 1; }

.wizard-fallback-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 160px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  background: #fff;
  resize: vertical;
}

@media (max-width: 480px) {
  .wizard-card { max-width: 100%; padding: 20px 16px 24px; }
  .wizard-step-heading { font-size: 18px; }
}
