/* Shared compose styling — landing + offer + listing.
   Mirrors the dashboard's premium polish (layered shadows, gradient text,
   springy hover physics) so the two surfaces feel like one product. */

:root { color-scheme: light; }
html, body { font-family: 'DM Sans', system-ui, sans-serif; background: #f4f7ff; color: #08090e; overflow-x: hidden; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.syne { font-family: 'Syne', system-ui, sans-serif; font-weight: 700; }
.label-eyebrow {
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em;
}

/* Card shell — same physics as dashboard. */
.card-shell {
  position: relative;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 4px 12px rgba(15, 23, 42, 0.06),
    0 12px 32px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  isolation: isolate;
}
.card-shell::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0) 100%);
  opacity: 0; pointer-events: none;
  transition: opacity 300ms ease-out; z-index: 1;
}
.card-shell > * { position: relative; z-index: 2; }
.card-shell:hover {
  transform: translateY(-4px) scale(1.005);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.05),
    0 12px 28px rgba(15, 23, 42, 0.10),
    0 24px 64px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.card-shell:hover::before { opacity: 1; }

/* Hero strip greeting (shared across compose pages). */
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: live-pulse 3s ease-out infinite;
  flex-shrink: 0;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Wordmark (shared) */
.wordmark { letter-spacing: -0.02em; }
.wordmark > span + span { margin-left: 0; }

/* ── Mic button + live recording state ───────────────────────────────── */
.mic-btn {
  width: 120px; height: 120px; border-radius: 50%;
  background: #3b82f6; color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  box-shadow: 0 12px 28px rgba(59,130,246,0.32);
  transition: background 200ms cubic-bezier(.2,.9,.3,1.1), transform 200ms ease-out, box-shadow 200ms ease-out;
}
.mic-btn:hover { background: #2563eb; transform: scale(1.04); }
.mic-btn.recording {
  background: #ef4444;
  animation: mic-pulse 1.4s ease-out infinite;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}
.mic-btn.transcribing {
  background: #64748b;
}
@keyframes mic-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45), 0 12px 28px rgba(239, 68, 68, 0.4); }
  70%  { box-shadow: 0 0 0 28px rgba(239, 68, 68, 0),   0 12px 28px rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0),     0 12px 28px rgba(239, 68, 68, 0.4); }
}

/* ── Cheat sheet — the WOW animation ─────────────────────────────────── */
.cheat-sheet {
  background: #fff; border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px; padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: sticky; top: 80px; z-index: 5;
  transition: box-shadow 200ms ease-out;
}
.cheat-sheet.complete {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 0 0 2px rgba(16, 185, 129, 0.18),
    0 8px 24px rgba(16, 185, 129, 0.16);
}
.cheat-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 14px;
  margin-top: 10px;
}
.cheat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: #64748b;
  transition: color 200ms ease-out, opacity 200ms ease-out;
}
.cheat-chip-circle {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color 200ms ease-out, background 200ms ease-out, transform 200ms ease-out;
}
.cheat-chip-circle svg { width: 12px; height: 12px; opacity: 0; transition: opacity 150ms ease-out; }
.cheat-chip.captured { color: #08090e; }
.cheat-chip.captured .cheat-chip-circle {
  border-color: #10b981;
  background: #10b981;
  /* The signature "scale to 1.2 then settle" overshoot for the WOW moment. */
  animation: chip-pop 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cheat-chip.captured .cheat-chip-circle svg { opacity: 1; color: #fff; }
@keyframes chip-pop {
  0%   { transform: scale(0.4);  }
  60%  { transform: scale(1.18); }
  100% { transform: scale(1);    }
}

/* ── Field card / input styling ─────────────────────────────────────── */
.input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  font-size: 14px; color: #0f172a;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: #3b82f6; background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,0.12); }
.input-label { font-size: 12px; font-weight: 500; color: #64748b; margin-bottom: 6px; display: block; }
textarea.input { min-height: 80px; resize: vertical; }

.field-row {
  position: relative;
}
.field-row.just-filled .input {
  animation: field-flash 700ms ease-out;
}
@keyframes field-flash {
  0%   { background: #fef3c7; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
  100% { background: #f8fafc; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
.field-row .field-icons {
  position: absolute; right: 10px; top: 30px;
  display: inline-flex; gap: 6px; align-items: center;
  color: #94a3b8; pointer-events: none;
}
.field-row .field-icons .field-mic, .field-row .field-icons .field-edit {
  pointer-events: auto;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  transition: color 150ms ease-out, background 150ms ease-out;
}
.field-row .field-icons .field-mic:hover { color: #3b82f6; background: rgba(59,130,246,0.08); }
.field-row .input { padding-right: 60px; }

.section-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 28px 0 14px;
}
.section-divider .label-eyebrow { color: #64748b; }
.section-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(15, 23, 42, 0.08);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-primary {
  background: #3b82f6; color: #fff;
  padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, transform .1s, opacity .15s;
}
.btn-primary:hover:not(:disabled) { background: #2563eb; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary {
  background: #f1f5f9; color: #475569;
  padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s;
}
.btn-secondary:hover { background: #e2e8f0; }

/* Type/voice toggle pills */
.type-toggle { display: inline-flex; padding: 3px; background: #f1f5f9; border-radius: 999px; gap: 2px; }
.type-toggle-btn {
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: #64748b;
  border-radius: 999px; transition: background 150ms, color 150ms;
}
.type-toggle-btn.active { background: #3b82f6; color: #fff; box-shadow: 0 1px 2px rgba(59,130,246,0.3); }

/* Form-variant pills (Freehold / Condo / POTL) */
.variant-toggle { display: inline-flex; padding: 3px; background: #f1f5f9; border-radius: 999px; gap: 2px; }
.variant-btn {
  padding: 5px 14px; font-size: 12px; font-weight: 600; color: #64748b;
  border-radius: 999px; transition: background 150ms, color 150ms;
}
.variant-btn.active { background: #08090e; color: #fff; }

.missing-callout {
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: #9a3412;
  margin-top: 12px;
}
.missing-callout strong { color: #7c2d12; }
.missing-pill {
  display: inline-block; background: #fff; border: 1px solid #fed7aa;
  border-radius: 999px; padding: 2px 10px; margin: 0 4px 4px 0;
  color: #b45309; cursor: pointer; transition: background 150ms;
}
.missing-pill:hover { background: #ffedd5; }

/* Toast container — shared */
.toast {
  background: #10b981; color: #fff;
  font-size: 14px; font-weight: 500;
  padding: 12px 16px; border-radius: 10px;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.32);
  animation: toast-in 220ms cubic-bezier(.2,.9,.3,1.1);
}
.toast.error { background: #ef4444; box-shadow: 0 12px 28px rgba(239, 68, 68, 0.32); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Spinning indicator */
.spin { animation: compose-spin 600ms linear infinite; }
@keyframes compose-spin { to { transform: rotate(360deg); } }
