/* ChanSpace — post.html layout (Organic design system).
   Tokens/components live in organic-tokens.css, nav/footer in
   organic-shared.css; this file is the multi-step listing-creation wizard:
   stepper, screens, auth card, chips, OTP boxes, dropzone, map picker.
   Every id/class here that script.js selects by must stay exactly as-is —
   see CLAUDE.md / the post.html restyle brief for the full list. */

/* ===== Stepper ===== */
.stepper { padding: 20px 0 0; }
.stepper-list {
  display: flex; list-style: none; margin: 0 auto; padding: 0; gap: 6px;
  max-width: 620px;
}
.step-item { flex: 1; text-align: center; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%;
  background: var(--color-surface); border: 1px solid var(--color-divider);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-family: var(--font-heading); font-size: 13px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.step-label { display: block; font-size: 11px; color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.step-item.active .step-num { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.step-item.active .step-label { color: var(--color-text); font-weight: 600; }
.step-item.done .step-num { background: var(--color-accent-2-600); border-color: var(--color-accent-2-600); color: var(--color-bg); }

/* ===== Screens ===== */
.wizard-main { padding-bottom: 90px; }
.screen { display: none; }
.screen.active { display: block; animation: post-fadein 0.25s ease; }
@keyframes post-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Landing (screen 1) ===== */
.landing { max-width: 620px; margin: 56px auto 0; text-align: center; }
.landing-tagline {
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-700);
  margin: 0 0 12px;
}
.landing h2 { font-size: 38px; margin: 0 0 12px; }
.landing .subtext { font-size: 15.5px; max-width: 46ch; margin: 0 auto 22px; }
.btn-row { display: flex; gap: 10px; justify-content: center; }
.btn-col { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* ===== Card (renamed .post-card so it never collides with the generic
   .organic-page .card component's flex/padding rules used elsewhere) ===== */
.post-card {
  background: var(--color-surface); border-radius: calc(var(--radius-lg) * 1.15);
  box-shadow: var(--shadow-sm); padding: 36px; max-width: 560px; margin: 26px auto 0;
}
.post-card-center { text-align: center; }
.oauth-card { max-width: 480px; }
.oauth-card > h2, .oauth-card > .subtext { text-align: center; }

.subtext { font-size: 14.5px; margin: 0 0 18px; line-height: 1.6; }
.caption { font-size: 13px; margin: 8px 0 20px; line-height: 1.65; }
.note { font-size: 12.5px; text-align: center; margin: 14px 0 0; }

.field-error {
  color: var(--color-accent-700); font-size: 13px; margin: -6px 0 16px;
  background: var(--color-accent-100); border-radius: var(--radius-sm); padding: 9px 12px;
}
.field-success {
  color: var(--color-accent-2-800); font-size: 13px; margin: -6px 0 16px;
  background: var(--color-accent-2-100); border-radius: var(--radius-sm); padding: 9px 12px;
}

.field-label {
  display: block; font-size: 12.5px; font-weight: 600; margin: 16px 0 6px;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}
.field-label:first-of-type { margin-top: 0; }
.input-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

.field-group-heading { font-size: 14.5px; font-weight: 700; margin: 20px 0 2px; }
.field-group-heading:first-of-type { margin-top: 0; }

.input.textarea { border-radius: var(--radius-md); min-height: 90px; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.char-counter { text-align: right; margin: -12px 0 16px; }

.btn-back {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  font-family: var(--font-body); font-size: 13px; cursor: pointer; padding: 4px 0; margin-bottom: 18px;
}
.btn-back:hover { color: var(--color-text); }
.btn-back svg { width: 16px; height: 16px; }

.btn-full { width: 100%; margin-top: var(--space-2); }
.btn-gold { background: var(--color-accent-2-600); color: var(--color-bg); }
.btn-gold:hover { background: var(--color-accent-2-700); }

/* ===== OAuth ===== */
.oauth-btn-group { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid var(--color-divider);
  background: var(--color-neutral-100); color: var(--color-text); font-size: 14.5px;
}
.oauth-btn:hover { background: var(--color-neutral-200); }
.oauth-btn svg { flex-shrink: 0; }

.divider-row {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); font-size: 13px;
}
.divider-row::before, .divider-row::after { content: ""; flex: 1; height: 1px; background: var(--color-divider); }

.auth-mode-toggle {
  display: flex; gap: 6px; background: var(--color-neutral-100);
  border-radius: 999px; padding: 4px; margin-bottom: 16px;
}
.auth-mode-tab {
  flex: 1; min-height: 38px; border: none; border-radius: 999px; background: transparent;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.auth-mode-tab-active { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }

.link-btn {
  background: none; border: none; padding: 0; color: var(--color-accent-700);
  font-family: inherit; font-size: inherit; text-decoration: underline; cursor: pointer;
}
.field-link-end { display: block; margin: 6px 0 0 auto; font-size: 12.5px; }

/* ===== OTP ===== */
.otp-row { display: flex; gap: 8px; margin-bottom: 4px; }
.otp-box {
  width: 100%; aspect-ratio: 1; text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.25rem; font-weight: 600;
  border: 1px solid var(--color-divider); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-text);
}
.otp-box:focus-visible { outline: none; border-color: var(--color-accent); }
.otp-box.filled { background: var(--color-accent); border-color: var(--color-accent-700); color: var(--color-bg); }

/* ===== Chips ===== */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.chip {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--color-divider);
  background: var(--color-surface); color: var(--color-text);
  font-family: var(--font-body); font-weight: 600; font-size: 13.5px; cursor: pointer;
}
.chip:hover { border-color: var(--color-accent); }
.chip-selected { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }

.trust-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 6px 14px;
  border: 1px solid var(--color-accent-2-600); color: var(--color-accent-2-700);
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
}

/* ===== Dropzone / photo thumbs ===== */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 30px 18px; border: 1.5px dashed var(--color-divider); border-radius: var(--radius-md);
  color: color-mix(in srgb, var(--color-text) 60%, transparent); cursor: pointer;
}
.dropzone:hover { border-color: var(--color-accent); background: var(--color-neutral-100); }
.dropzone span { font-size: 13.5px; font-weight: 600; }

.thumb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb-row img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-divider); display: block; }
.thumb-item { position: relative; width: 64px; height: 64px; }
.thumb-remove {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-accent-700); color: #fff; border: 2px solid var(--color-surface);
  font-size: 10px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.thumb-remove:hover { background: var(--color-accent-800); }

/* ===== Location map picker ===== */
.map-picker {
  width: 100%; height: 220px; border: 1px solid var(--color-divider);
  border-radius: var(--radius-md); background: var(--color-neutral-100); overflow: hidden;
}
.map-instruction { color: color-mix(in srgb, var(--color-text) 60%, transparent); font-size: 13px; line-height: 1.5; margin: 8px 0; }

/* ===== Confirmation (screen 6) ===== */
.check-circle {
  width: 64px; height: 64px; border-radius: 50%; background: var(--color-accent-2-600);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.center { text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .landing { margin-top: 34px; }
  .landing h2 { font-size: 27px; }
  .btn-row { flex-direction: column; }
  .post-card { padding: 24px; border-radius: var(--radius-lg); margin-top: 18px; }
  .otp-box { height: 46px; }
  .chip { padding: 8px 14px; font-size: 12.5px; }
  .step-label { display: none; }
}
