/* ─────────────────────────────────────────────────────────────────────────
 * property-pdf.css
 *
 * Styles for the property brochure (rendered offscreen by property-pdf.js
 * and rasterized into a PDF via html2pdf.js) and the transient feedback
 * toast shown after generation.
 *
 * Layout strategy:
 *   - .pdf-stage          offscreen container, position:absolute,
 *                          left:-10000px so html2canvas can render it
 *                          without affecting the visible layout
 *   - .pdf-brochure       the A4-page-shaped container (760px wide,
 *                          proportional height). All inner styles use
 *                          the same tokens as the rest of the site so
 *                          the brochure feels like the brand.
 *   - .pdf-toast          fixed top-center, slides in on .is-visible
 *
 * Why we don't reuse property-modal.css classes:
 *   The brochure is a separate document — different layout (A4 grid,
 *   multi-column foot), different scale (720px container), different
 *   ratio. Reusing modal classes would couple the two surfaces; this
 *   file stays standalone so the brochure can be regenerated even if
 *   the modal evolves.
 * ─────────────────────────────────────────────────────────────────── */

/* ─── Stage (offscreen) ──────────────────────────────────────────── */
.pdf-stage {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 760px;
  pointer-events: none;
  z-index: -1;
}

/* ─── Brochure container ─────────────────────────────────────────── */
.pdf-brochure {
  width: 760px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.5;
  padding: 28px 32px 24px;
  box-sizing: border-box;
}

/* Header */
.pdf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 18px;
}

.pdf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.pdf-brand-mark svg { width: 26px; height: 26px; }
.pdf-brand-text { display: flex; flex-direction: column; }

.pdf-brand-text b {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-bold);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.1;
}

.pdf-brand-text span {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* Date stamp — mirrors .hero-stamp on the live site (circular, rotated,
   accent fill, italic Fraunces two-line label) instead of a generic
   "generated on" text line. */
.pdf-stamp {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-bold);
  line-height: 1.1;
  transform: rotate(-8deg);
  box-shadow: var(--shadow-accent);
}

.pdf-stamp-line1 { font-size: 11px; }
.pdf-stamp-line2 { font-size: 9px; opacity: 0.85; }

/* Hero */
.pdf-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  margin-bottom: 18px;
  align-items: stretch;
}

.pdf-hero-illu {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-deep);
  min-height: 170px;
}
.pdf-hero-illu--a { background: linear-gradient(160deg, #D8C49C 0%, #8E6A41 100%); }
.pdf-hero-illu--b { background: linear-gradient(160deg, #C8B89A 0%, #6F563B 100%); }
.pdf-hero-illu--c { background: linear-gradient(160deg, #E0CDB0 0%, #A98358 100%); }
.pdf-hero-illu svg { width: 100%; height: 100%; display: block; }

.pdf-hero-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pdf-kicker {
  display: inline-block;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  font-weight: var(--fw-semibold);
  margin-bottom: 4px;
}

.pdf-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-bold);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 6px;
}

.pdf-tagline {
  font-size: 11.5px;
  color: var(--ink-mute);
  font-style: italic;
  margin: 0 0 10px;
  line-height: 1.4;
}

.pdf-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  margin-bottom: 8px;
}

.pdf-price {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 26px;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.pdf-price-full {
  font-size: 10px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

.pdf-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-bottom: 8px;
}

.pdf-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}

/* Neutral surface chip, matching the real .prop .badge / .pm-badge
   treatment — never accent-filled. Sits on the hero illustration itself,
   top-left, like every other property-card/modal badge on the site. */
.pdf-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: inline-block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
}

/* Blocks */
.pdf-block {
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

/* Matches .pm-section-kicker in the property modal exactly: plain body
   font (not italic Fraunces — that treatment doesn't exist anywhere in
   production), uppercase, wide tracking, terracotta. */
.pdf-block-title {
  font-weight: var(--fw-semibold);
  font-size: 12px;
  color: var(--accent-2);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.pdf-description {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

/* Specs grid (4 big numbers) — deliberately unboxed, matching .pm-specs
   in the property modal exactly (plain columns, no per-item card). A
   single hairline frames the whole row instead of boxing each number. */
.pdf-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 0;
  margin-bottom: 10px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.pdf-spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1px;
}

.pdf-spec b {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 18px;
  color: var(--accent);
  line-height: 1;
}

.pdf-spec span {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: var(--fw-semibold);
}

.pdf-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

.pdf-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  padding: 3px 0;
  border-bottom: 1px dotted var(--line-soft);
}
.pdf-meta-row span { color: var(--ink-mute); }

.pdf-meta-row b {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  color: var(--ink);
}

/* Features checklist */
.pdf-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}

.pdf-features li {
  position: relative;
  padding-left: 14px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink);
}

.pdf-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-radius: 1px;
  transform: rotate(-45deg);
}

/* Split block (highlights + walkthrough side by side) */
.pdf-block--split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
}
.pdf-block--split > div { min-width: 0; }
.pdf-block--split .pdf-block-title { margin-top: 0; }

.pdf-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pdf-hl {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}

.pdf-hl-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: var(--fw-semibold);
}

.pdf-hl-value {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 11.5px;
  color: var(--ink);
}

.pdf-walkthrough {
  list-style: none;
  counter-reset: pdfwalk;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pdf-walkthrough li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink);
}

.pdf-walk-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-accent);
  flex-shrink: 0;
}

/* Footer */
.pdf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 10px;
  border-top: 1.5px solid var(--ink);
  margin-top: 14px;
}

.pdf-foot-agent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-agent-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 11px;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-accent);
  flex-shrink: 0;
}
.pdf-foot-agent > div { display: flex; flex-direction: column; gap: 1px; }

.pdf-foot-agent b {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 12.5px;
  color: var(--ink);
}

.pdf-foot-agent span {
  font-size: 10px;
  color: var(--ink-mute);
}

.pdf-agent-phone {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-faint) !important;
}

.pdf-foot-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.pdf-foot-cta span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.pdf-foot-cta b {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-bold);
  font-size: 14px;
  color: var(--accent);
}

.pdf-disclaimer {
  font-size: 8.5px;
  line-height: 1.4;
  color: var(--ink-faint);
  margin: 0;
  font-style: italic;
}

/* ─── Toast ──────────────────────────────────────────────────────── */
.pdf-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translate(-50%, -20px);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--fw-medium);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-skip);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-base) var(--ease-out),
              transform var(--motion-base) var(--ease-out);
  max-width: calc(100vw - 32px);
  text-align: center;
}

.pdf-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pdf-toast--ok {
  background: var(--accent);
}

.pdf-toast--err {
  background: var(--danger);
}

/* ─── Print fallback (window.print path) ─────────────────────────── */
.pdf-stage.is-print-mode {
  position: static;
  left: auto;
  top: auto;
  width: auto;
  pointer-events: auto;
  z-index: auto;
}

@media print {
  body > *:not(.pdf-stage) { display: none !important; }

  .pdf-stage {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    z-index: auto !important;
    pointer-events: auto !important;
  }
  .pdf-brochure { box-shadow: none; }
  .pdf-toast { display: none !important; }
}
