/* Shared listing UI: search controls + filter chips + row cards +
 * sentinel. Single source of truth for both:
 *   - buyer dashboard (backend/src/web/buyer/render.ts serves this
 *     via <link rel="stylesheet" href="/styles/shared-listings.css">)
 *   - public-funnel SSR (backend/src/views/layout.hbs links the
 *     same URL; the public-funnel React mount renders into this DOM)
 *
 * Express handler: backend/src/index.ts → /styles/shared-listings.css
 * reads this file from disk and serves it with a short Cache-Control
 * TTL so dev edits show up after a hard refresh.
 *
 * Token contract: every consumer page must define the design tokens
 * (--coral-500, --ink-200, etc.) in :root before this stylesheet
 * loads. Both layout.hbs and render.ts do.
 *
 * See docs/builds/shared-listings-ui.md for the full propagation
 * contract (which DOM/components are shared, where divergence is OK).
 */

/* Search input + filter row */
.buyer-search-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}
.buyer-search-input-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
}
.buyer-search-input {
  width: 100%;
  padding: 14px 64px 14px 24px;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  font-size: 16px;
  color: var(--ink-900);
  background: var(--white);
  outline: none;
  box-shadow: 0 2px 6px rgba(28, 26, 23, 0.06);
  transition: box-shadow 120ms ease, border-color 120ms ease;
}
.buyer-search-input::placeholder { color: var(--ink-400); }
.buyer-search-input:hover { box-shadow: 0 4px 12px rgba(28, 26, 23, 0.08); }
.buyer-search-input:focus {
  border-color: var(--coral-500);
  box-shadow: 0 0 0 3px var(--coral-100);
}
.buyer-search-input.is-filled { border-color: var(--coral-500); }
.buyer-search-input-clear {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  background: transparent;
  border: none;
  color: var(--ink-400);
  cursor: pointer;
  transition: color 120ms ease;
}
.buyer-search-input-clear:hover { color: var(--ink-700); }
.buyer-search-input-button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--coral-500);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(28, 26, 23, 0.1);
  transition: background-color 120ms ease;
}
.buyer-search-input-button:hover { background: var(--coral-600); }
.buyer-search-input-button:active { background: var(--coral-700); }

/* Filter chip strip. Chips themselves are defined below — hand-rolled
 * CSS (not Tailwind) because this stylesheet is the only one shared
 * with the public-funnel and magic-link SSR bundles, neither of which
 * import Tailwind. */
.buyer-search-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

/* ── FilterChips: pill button + dropdown menu ─────────────────────── */
.fc-wrap { position: relative; }

.fc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--ink-200);
  background: var(--white);
  color: var(--ink-700);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}
.fc-chip:hover {
  border-color: var(--ink-300);
  color: var(--ink-900);
}
.fc-chip.is-active {
  border-color: var(--coral-300, #FFA787);
  background: var(--coral-50);
  color: var(--coral-700);
}
.fc-chip.is-active:hover { border-color: var(--coral-500); }
.fc-chip.is-disabled {
  border-color: var(--ink-100);
  background: var(--ink-50, #F7F4EC);
  color: var(--ink-300);
  cursor: not-allowed;
}
.fc-chevron {
  transition: transform 120ms ease;
  flex-shrink: 0;
}
.fc-chevron.is-open { transform: rotate(180deg); }

.fc-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(28, 26, 23, 0.08);
  padding: 4px 0;
  text-transform: none;
  letter-spacing: 0;
}
.fc-menu-wide { min-width: 240px; max-height: 360px; overflow-y: auto; }
.fc-menu-price { width: 320px; padding-bottom: 0; }

.fc-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-700);
  cursor: pointer;
  font-weight: 500;
}
.fc-menu-item:hover { background: var(--ink-50, #F7F4EC); }
.fc-menu-item.is-active { color: var(--coral-700); font-weight: 600; }

.fc-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink-700);
  cursor: pointer;
  user-select: none;
}
.fc-checkbox-row:hover { background: var(--ink-50, #F7F4EC); }
.fc-checkbox-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--coral-500);
}

.fc-menu-clear {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  border: none;
  border-top: 1px solid var(--ink-100);
  padding: 8px 12px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-500);
  cursor: pointer;
}
.fc-menu-clear:hover { color: var(--ink-900); }

/* Beta callout inside the Neighbourhood dropdown */
.fc-beta-callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: #FEF3C7;
  border-bottom: 1px solid #FDE68A;
  margin-bottom: 4px;
}
.fc-beta-badge {
  display: inline-block;
  flex-shrink: 0;
  background: #FCD34D;
  color: #78350F;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 1px;
}
.fc-beta-text {
  font-size: 11px;
  line-height: 1.4;
  color: #78350F;
}

/* Price chip's range section */
.fc-price-section {
  border-top: 1px solid var(--ink-100);
  margin-top: 4px;
  padding: 10px 12px;
}
.fc-price-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.fc-price-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.fc-price-input-wrap {
  position: relative;
  flex: 1 1 0;
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  background: var(--white);
  transition: border-color 120ms ease;
}
.fc-price-input-wrap.is-focused { border-color: var(--coral-300); }
.fc-price-currency {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--ink-400);
  pointer-events: none;
}
.fc-price-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 8px 6px 18px;
  font-size: 13px;
  color: var(--ink-900);
  outline: none;
}
.fc-price-input:focus { outline: none; }
.fc-price-sep { font-size: 11px; color: var(--ink-400); flex-shrink: 0; }

.fc-price-presets { margin-bottom: 8px; }
.fc-price-presets-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-400);
  margin-bottom: 4px;
}
.fc-price-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fc-price-preset {
  border: 1px solid var(--ink-200);
  background: var(--white);
  color: var(--ink-700);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.fc-price-preset:hover { border-color: var(--ink-300); color: var(--ink-900); }
.fc-price-preset.is-active {
  border-color: var(--coral-300);
  background: var(--coral-50);
  color: var(--coral-700);
  font-weight: 600;
}
.fc-price-apply {
  display: block;
  width: 100%;
  background: var(--coral-500);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.fc-price-apply:hover:not(:disabled) { background: var(--coral-600); }
.fc-price-apply:disabled { opacity: 0.4; cursor: not-allowed; }
.fc-price-clear {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-top: 1px solid var(--ink-100);
  padding: 8px 12px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #C0392B;
  cursor: pointer;
}
.fc-price-clear:hover { background: #FBEAE7; }

.buyer-search-clear {
  border: none;
  background: transparent;
  color: var(--coral-600);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
}
.buyer-search-clear:hover { color: var(--coral-700); }

.buyer-search-loading, .buyer-search-empty {
  text-align: center;
  color: var(--ink-500);
  padding: 32px 16px;
}
.buyer-search-empty-action {
  display: inline-block;
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--coral-600);
  cursor: pointer;
  font-size: 14px;
}

/* Listing list — gapped cards (mirrors /research's row treatment). */
.buyer-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.buyer-listing-row {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}
.buyer-listing-row:hover {
  border-color: var(--coral-300);
  background: var(--coral-50);
  box-shadow: 0 1px 4px rgba(28, 26, 23, 0.04);
}
.buyer-listing-row-main {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 12px 8px 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  color: inherit;
}
.buyer-listing-heart {
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-300);
  transition: color 120ms ease, background-color 120ms ease;
}
.buyer-listing-heart:hover {
  color: var(--coral-500);
  background: rgba(255, 255, 255, 0.6);
}
.buyer-listing-heart.is-on { color: var(--coral-500); }
.buyer-listing-heart svg.fill-current { fill: var(--coral-500); }
.buyer-listing-thumb {
  width: 64px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink-100);
  flex-shrink: 0;
}
.buyer-listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.buyer-listing-thumb-fallback { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 24px; color: var(--ink-300); }
.buyer-listing-body { flex: 1; min-width: 0; }
.buyer-listing-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.buyer-listing-neighbourhood { font-size: 12px; color: var(--ink-500); margin: 0; }
.buyer-listing-type {
  font-size: 11px;
  color: var(--ink-500);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 64px;
}
.buyer-listing-meta {
  display: flex;
  gap: 10px;
  color: var(--ink-500);
  font-size: 12px;
  flex-shrink: 0;
  /* Fixed width keeps the type column on the left and price column on
     the right at the same horizontal position whether a listing has
     bd/ba or not (LOT, partial-data HOME). */
  min-width: 110px;
}
.buyer-listing-meta-bd,
.buyer-listing-meta-ba {
  display: inline-block;
  min-width: 46px;
}
.buyer-listing-msgs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  position: relative;
}
.buyer-listing-msgs.is-unread {
  background: var(--coral-50);
  color: var(--coral-700, var(--coral-600));
}
.buyer-listing-msgs-placeholder {
  /* No-op spacer. The message chip is opt-in (only rows with a thread
     show one); price already right-aligns via the body flex absorbing
     extra space, so the placeholder is zero-width — its purpose is to
     keep the JSX shape consistent for future column-grid changes. */
  width: 0;
  flex-shrink: 0;
}
.buyer-listing-msgs-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--coral-500);
  border: 2px solid var(--white);
}
.buyer-listing-row.is-unread { border-left: 3px solid var(--coral-500); }
.buyer-listing-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  flex-shrink: 0;
  min-width: 100px;
  text-align: right;
}
.buyer-search-sentinel {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-400);
}

/* ── Listing detail modal shell ──────────────────────────────────────
 * Used by both buyer dashboard PublicListingModal and public-funnel
 * PublicFunnelModal via frontend/src/shared/listings/ListingDetailModalShell.tsx.
 * Buyer-side wraps with a thread panel (`belowDetails` slot); public-
 * side wraps with anonymous blur policy + locale strings.
 *
 * Class names retain the `buyer-modal-*` prefix for backwards-compat
 * with the original buyer CSS — both surfaces now share the same DOM
 * so the prefix is a misnomer (a follow-up rename to `listing-modal-*`
 * would be a tangential cleanup). */

.buyer-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 23, 0.6);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
}
.buyer-modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 1280px;
  height: 94vh;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.buyer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ink-100);
  flex-shrink: 0;
}
.buyer-modal-name {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.buyer-modal-close {
  border: none;
  background: transparent;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-400);
  flex-shrink: 0;
  transition: background-color 120ms ease, color 120ms ease;
}
.buyer-modal-close:hover { color: var(--ink-900); background: var(--ink-100); }
.buyer-modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
@media (min-width: 900px) {
  .buyer-modal-body { flex-direction: row; }
}

/* Left media column. */
.buyer-modal-media {
  padding: 16px;
  overflow-y: auto;
  border-bottom: 1px solid var(--ink-100);
}
@media (min-width: 900px) {
  .buyer-modal-media {
    width: 480px;
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1px solid var(--ink-100);
  }
}
@media (min-width: 1200px) {
  .buyer-modal-media { width: 560px; }
}
.buyer-modal-media-empty {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4/3; background: var(--ink-100); border-radius: 12px;
  color: var(--ink-300); font-size: 64px;
}

/* Sticky big image. */
.buyer-modal-key-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--white);
  padding-top: 0;
  padding-bottom: 8px;
  margin: -16px -16px 8px;
  padding: 16px 16px 8px;
}
.buyer-modal-key {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--ink-100);
  border-radius: 12px;
  overflow: hidden;
}
.buyer-modal-key img { width: 100%; height: 100%; object-fit: cover; transition: filter 120ms ease; }
.buyer-modal-key.is-blurred img { filter: blur(24px); }
.buyer-modal-key-cta {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  color: var(--coral-700);
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid var(--coral-300);
  cursor: pointer;
}
.buyer-modal-key-cta:hover { background: var(--coral-50); }
.buyer-modal-chev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(28, 26, 23, 0.5);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 6px;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.buyer-modal-chev:hover { background: rgba(28, 26, 23, 0.7); }
.buyer-modal-chev-left { left: 10px; }
.buyer-modal-chev-right { right: 10px; }
.buyer-modal-key-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 26, 23, 0.5);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.buyer-modal-photo-credit {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--ink-400);
}

/* Thumbnail grid — 5 cols. */
.buyer-modal-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.buyer-modal-thumb {
  aspect-ratio: 1/1;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink-100);
  cursor: pointer;
  padding: 0;
  transition: opacity 120ms ease, box-shadow 120ms ease;
  position: relative;
}
.buyer-modal-thumb:hover { opacity: 0.85; }
.buyer-modal-thumb img { width: 100%; height: 100%; object-fit: cover; transition: filter 120ms ease; }
.buyer-modal-thumb.is-blurred img { filter: blur(8px); }
.buyer-modal-thumb.is-active { box-shadow: 0 0 0 2px var(--coral-500); }

/* Right details column. */
.buyer-modal-details {
  padding: 20px 24px;
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}
.buyer-modal-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.buyer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
}
.buyer-pill-status-sold { background: var(--ink-200); color: var(--ink-700); }
.buyer-pill-status-removed { background: #FEE2E2; color: #B91C1C; }
.buyer-pill-type-home { background: #E0F2FE; color: #0369A1; }
.buyer-pill-type-lot { background: #FEF3C7; color: #92400E; }
.buyer-pill-type-business { background: #F3E8FF; color: #7E22CE; }
.buyer-pill-neighbourhood { background: #DCFCE7; color: #15803D; }

.buyer-modal-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.buyer-modal-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--coral-600);
  margin: 0;
  letter-spacing: -0.015em;
}
.buyer-modal-heart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ink-200);
  background: var(--white);
  color: var(--ink-700);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
  flex-shrink: 0;
  text-decoration: none;
}
.buyer-modal-heart:hover { color: var(--coral-700); border-color: var(--coral-300); }
.buyer-modal-heart.is-on { color: var(--coral-700); border-color: var(--coral-300); background: var(--coral-50); }
.buyer-modal-heart svg.fill-current { fill: var(--coral-500); }
.buyer-modal-heart:disabled { opacity: 0.5; cursor: progress; }

.buyer-modal-stats {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.buyer-modal-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-700);
  font-size: 14px;
}
.buyer-modal-stat svg { color: var(--coral-500); }
.buyer-modal-stat-num { font-weight: 700; }
.buyer-modal-stat-label { color: var(--ink-500); font-size: 13px; }

.buyer-modal-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  margin: 0 0 8px;
}
.buyer-modal-description {
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 18px;
  max-height: 280px;
  overflow-y: auto;
}
.buyer-modal-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--coral-600);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--coral-50);
  transition: background-color 120ms ease;
  margin-bottom: 20px;
}
.buyer-modal-external:hover { background: var(--coral-100); text-decoration: none; }

/* ── Registration prompt modal ──────────────────────────────────────
 * Soft signup prompt for anonymous public-funnel users who clicked
 * heart (or any save-intent action). Sits ABOVE the listing detail
 * modal — z-index 70 vs. the listing modal's 60 — so when both are
 * open, the listing stays visible behind a slightly darker backdrop
 * the prompt adds.
 *
 * One component, one z-layer, one source of CSS. Anchored centred.
 */

.registration-prompt-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 23, 0.55);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.registration-prompt {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  padding: 28px 28px 24px;
  position: relative;
}
.registration-prompt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-400);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 120ms ease, color 120ms ease;
}
.registration-prompt-close:hover { background: var(--ink-100); color: var(--ink-900); }
.registration-prompt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--coral-700);
  margin: 0 0 10px;
}
.registration-prompt-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  margin: 0 0 6px;
  line-height: 1.25;
}
.registration-prompt-sub {
  font-size: 14px;
  color: var(--ink-500);
  margin: 0 0 18px;
  line-height: 1.5;
}
.registration-prompt-bullets {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}
.registration-prompt-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-700);
  margin-bottom: 8px;
  line-height: 1.4;
}
.registration-prompt-bullets li:last-child { margin-bottom: 0; }
.registration-prompt-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--coral-50);
  color: var(--coral-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}
.registration-prompt-cta {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--coral-500);
  color: var(--white);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 120ms ease;
  margin-bottom: 10px;
}
.registration-prompt-cta:hover { background: var(--coral-600); text-decoration: none; }
.registration-prompt-signin {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--ink-500);
}
.registration-prompt-signin a {
  color: var(--coral-700);
  font-weight: 600;
  text-decoration: none;
}
.registration-prompt-signin a:hover { text-decoration: underline; }

/* ── Buyer ↔ agent listing thread ────────────────────────────────────
 * Sits at the bottom of the public listing modal on every surface
 * (buyer SPA at /me/<listing>, public-funnel anonymous /search,
 * magic-link client dashboard). Previously these rules lived only
 * inline on the magic-link SSR shell, so the SPA + public-funnel
 * mounts rendered the compose box unstyled. shared-listings.css is
 * <link>ed by all three surfaces — single source of truth. */
.buyer-thread {
  border-top: 1px solid var(--ink-100);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.buyer-thread-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
.buyer-thread-body {
  max-height: 240px;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: 12px;
  padding: 12px;
}
.buyer-thread-empty {
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.5;
}
.buyer-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.buyer-thread-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 78%;
}
.buyer-thread-msg-agent { align-self: flex-start; align-items: flex-start; }
.buyer-thread-msg-buyer { align-self: flex-end; align-items: flex-end; }
.buyer-thread-bubble {
  font-size: 14px;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.buyer-thread-msg-agent .buyer-thread-bubble {
  background: var(--white);
  border: 1px solid var(--ink-100);
  color: var(--ink-900);
  border-bottom-left-radius: 4px;
}
.buyer-thread-msg-buyer .buyer-thread-bubble {
  background: var(--ink-900);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.buyer-thread-meta {
  font-size: 11px;
  color: var(--ink-500);
  padding: 0 4px;
}
.buyer-thread-compose {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.buyer-thread-textarea {
  flex: 1;
  min-height: 40px;
  max-height: 160px;
  resize: vertical;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-900);
  background: var(--white);
  outline: none;
  transition: border-color 120ms ease;
}
.buyer-thread-textarea:focus { border-color: var(--ink-700); }
.buyer-thread-send {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--coral-500);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 120ms ease;
  flex-shrink: 0;
}
.buyer-thread-send:hover:not(:disabled) { background: var(--coral-600); }
.buyer-thread-send:disabled { background: var(--ink-200); color: var(--ink-400); cursor: not-allowed; }
