/*
 * brief-page.css — styles for /brief/:id
 * All selectors prefixed bp- to avoid collision with landing-page styles.
 * Mobile-first; desktop breakpoints via min-width.
 */

/* ── Base ──────────────────────────────────────────────────────── */
.bp-body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Hero (above the fold) ─────────────────────────────────────── */
.bp-hero {
  padding: 3rem 1.25rem 2rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.bp-hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.bp-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.bp-warn-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fff8eb;
  border: 1px solid #e8c87a;
  color: #7a5510;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.bp-couple {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--fg);
}

/* Key facts row */
.bp-facts {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bp-fact {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.bp-fact--missing .bp-fact-val { color: var(--muted); font-style: italic; }

.bp-fact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent);
  opacity: 0.75;
}

.bp-fact-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.bp-fact-val {
  font-size: 0.95rem;
  color: var(--fg);
  font-weight: 400;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

/* RSVP countdown pill */
.bp-countdown {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  background: #fff3cd;
  color: #856404;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 2px;
}

/* ── Main content ──────────────────────────────────────────────── */
.bp-main {
  flex: 1;
}

.bp-main-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ── Sections ──────────────────────────────────────────────────── */
.bp-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.bp-section:last-child { border-bottom: none; }

.bp-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bp-section-title svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.8;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.bp-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
}

.bp-card--missing { opacity: 0.75; }

.bp-card-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.bp-card-text {
  font-size: 0.9rem;
  color: var(--fg);
  line-height: 1.65;
}

/* ── Detail rows ───────────────────────────────────────────────── */
.bp-detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}

.bp-detail-row:last-child { border-bottom: none; }

.bp-dr-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.bp-code {
  font-family: 'Courier New', monospace;
  background: var(--rule);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.9em;
}

.bp-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.bp-link:hover { text-decoration: underline; }

/* ── Schedule ──────────────────────────────────────────────────── */
.bp-schedule {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bp-sched-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.bp-sched-item:last-child { border-bottom: none; }

.bp-sched-time {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  padding-top: 2px;
  line-height: 1.4;
}

.bp-sched-event {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
}

.bp-sched-loc {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.bp-sched-desc {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.1rem;
  font-style: italic;
  line-height: 1.5;
}

/* Add-to-calendar button */
.bp-ics-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
  margin-top: 2px;
}

.bp-ics-btn svg { width: 12px; height: 12px; }
.bp-ics-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Hero "Add to Calendar" button */
.bp-ics-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s;
}

.bp-ics-hero-btn svg { width: 14px; height: 14px; }
.bp-ics-hero-btn:hover { opacity: 0.85; text-decoration: none; }

/* ── One-click action row ─────────────────────────────────────────── */
.bp-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.bp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.bp-action-btn svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--accent); }

.bp-action-btn:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
}

.bp-action-btn--disabled {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.bp-action-btn--checklist {
  border-style: dashed;
  color: var(--muted);
}

/* Inline checklist link in schedule section header */
.bp-checklist-link {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.01em;
  margin-left: auto;
  white-space: nowrap;
}

.bp-checklist-link:hover { text-decoration: underline; }

/* ── Registry ──────────────────────────────────────────────────── */
.bp-registry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bp-registry-btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s;
}

.bp-registry-btn:hover { border-color: var(--accent); }

/* ── Dress Code ─────────────────────────────────────────────────── */
.bp-dress-val {
  font-size: 1.15rem;
  color: var(--fg);
  font-weight: 400;
}

/* ── Missing state ─────────────────────────────────────────────── */
.bp-missing {
  color: var(--muted);
  font-style: italic;
  font-size: 0.875rem;
}

.bp-missing-block {
  color: var(--muted);
  font-style: italic;
  font-size: 0.875rem;
  padding: 0.75rem 0;
}

/* ── Confidence badges ─────────────────────────────────────────── */
.bp-conf {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  vertical-align: middle;
}

.bp-conf-medium { background: #fff3cd; color: #856404; }
.bp-conf-low    { background: #f8d7da; color: #842029; }

/* Source tooltip trigger */
.bp-tooltip {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  opacity: 0.55;
  cursor: help;
  vertical-align: middle;
  margin-left: 2px;
}

.bp-tooltip:hover { opacity: 1; }

/* ── Footer ─────────────────────────────────────────────────────── */
.bp-footer {
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.bp-footer-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bp-footer-attr {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

.bp-footer-domain {
  font-weight: 500;
  color: var(--fg);
}

.bp-footer-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.bp-footer-brand:hover { opacity: 1; }

/* ── Desktop enhancements ─────────────────────────────────────── */
@media (min-width: 600px) {
  .bp-hero { padding: 4rem 2rem 2.5rem; }
  .bp-main-inner { padding: 0 2rem 5rem; }
  .bp-footer { padding: 1.75rem 2rem; }
  .bp-facts { flex-direction: row; flex-wrap: wrap; gap: 1.25rem 2.5rem; }
  .bp-detail-row { flex-direction: row; align-items: baseline; gap: 1rem; }
  .bp-dr-label { min-width: 90px; flex-shrink: 0; }
}

/* ── Audit trail — source quote disclosures ─────────────────── */
.bp-audit {
  margin-top: 0.45rem;
  font-size: 0.78rem;
}

/* <details> toggle */
.bp-audit[open] .bp-audit-trigger { color: var(--accent); }

.bp-audit-trigger {
  cursor: pointer;
  color: var(--muted);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  user-select: none;
}

.bp-audit-trigger::-webkit-details-marker { display: none; }
.bp-audit-trigger::before {
  content: '›';
  display: inline-block;
  transition: transform 0.15s;
  font-size: 0.9em;
}

details.bp-audit[open] .bp-audit-trigger::before { transform: rotate(90deg); }

.bp-audit-quote {
  margin: 0.4rem 0 0.3rem 0.85rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  font-style: italic;
}

.bp-verify-note {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: #842029;
}

.bp-verify-note a { color: #842029; text-decoration: underline; }

/* ── Share section ──────────────────────────────────────────── */
.bp-share-section {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.75rem 1.25rem;
  text-align: center;
}

.bp-share-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.bp-share-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.bp-share-icon {
  width: 36px;
  height: 36px;
  background: var(--rule);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bp-share-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0.75;
}

.bp-share-text {}

.bp-share-headline {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 0.15rem;
}

.bp-share-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.bp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.bp-share-btn svg { width: 14px; height: 14px; }
.bp-share-btn:hover { opacity: 0.85; }
.bp-share-btn--copied { background: #2e7d32; }

.bp-share-feedback {
  max-width: 680px;
  margin: 0.75rem auto 0;
  font-size: 0.82rem;
  color: #2e7d32;
  font-weight: 500;
}

@media (min-width: 600px) {
  .bp-share-section { padding: 2rem 2rem; }
  .bp-share-inner { justify-content: center; gap: 2rem; }
}

/* ── Concierge — action-oriented guidance ─────────────────── */
.bp-concierge {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.bp-concierge-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--fg);
}

.bp-concierge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.bp-concierge-text {
  flex: 1;
  font-weight: 400;
  color: var(--fg);
}

.bp-concierge-cta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.bp-concierge-cta:hover {
  background: var(--accent);
  color: #fff;
}
/* ── Share actions row (copy / SMS / email) ─────────────────── */
.bp-share-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bp-share-btn--sms,
.bp-share-btn--email {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  text-decoration: none;
}

.bp-share-btn--sms:hover,
.bp-share-btn--email:hover {
  background: var(--accent);
  color: #fff;
  opacity: 1;
}

/* ── Personalize banner (co-guest view) ─────────────────────── */
.bp-personalize-banner {
  background: linear-gradient(135deg, #fdf6f0 0%, #faf0e6 100%);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  padding: 1.25rem 1.25rem;
  margin-bottom: 1.5rem;
}

.bp-personalize-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bp-personalize-headline {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 0.2rem;
}

.bp-personalize-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.bp-personalize-copy {
  margin-bottom: 0.25rem;
}

.bp-personalize-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bp-personalize-input {
  flex: 1;
  min-width: 160px;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: #fff;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}

.bp-personalize-input:focus {
  border-color: var(--accent);
}

.bp-personalize-btn {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.bp-personalize-btn:hover { opacity: 0.85; }

@media (min-width: 600px) {
  .bp-personalize-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .bp-personalize-copy { flex: 1; }
  .bp-personalize-form { flex: none; }
}

/* ── Co-guest conversion CTA ────────────────────────────────── */
.bp-cogguest-cta {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: 2rem 1.25rem;
  text-align: center;
}

.bp-coguest-inner {
  max-width: 480px;
  margin: 0 auto;
}

.bp-coguest-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 0.4rem;
}

.bp-coguest-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.bp-coguest-btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.15s;
}

.bp-coguest-btn:hover { opacity: 0.85; }

/* ── Per-field feedback chips (bp-fb-*) ─────────────────────── */
.bp-fb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  vertical-align: middle;
  margin-left: 0.35rem;
  font-size: 0.78rem;
  /* chips are hidden until JS dismissal check runs */
}

.bp-fb-btn {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1;
  padding: 2px 5px;
  transition: background 0.12s, border-color 0.12s;
  color: var(--muted);
}
.bp-fb-btn:first-child { border-radius: 4px 0 0 4px; border-right: none; }
.bp-fb-btn:nth-child(2) { border-radius: 0 4px 4px 0; }
.bp-fb-btn:hover { background: var(--rule); border-color: var(--accent); }
.bp-fb-btn.bp-fb-active { background: #f0f7f0; border-color: #5a9e5a; }

.bp-fb-correction {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  animation: bp-slide-in 0.15s ease;
}

.bp-fb-input {
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.75rem;
  padding: 3px 6px;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  width: 180px;
  outline-offset: 2px;
}

.bp-fb-send {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.72rem;
  padding: 3px 8px;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
  transition: opacity 0.12s;
}
.bp-fb-send:hover { opacity: 0.85; }

.bp-fb-chip.bp-fb-done { opacity: 0.45; pointer-events: none; }

/* ── Overall brief feedback section ─────────────────────────── */
.bp-overall-feedback {
  text-align: center;
  padding-top: 1.5rem;
  padding-bottom: 1rem;
}
.bp-overall-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.bp-overall-q {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
.bp-overall-btns {
  display: flex;
  gap: 0.5rem;
}
.bp-overall-btn {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--fg);
  transition: background 0.12s, border-color 0.12s;
}
.bp-overall-btn:hover { background: var(--rule); border-color: var(--accent); }
.bp-overall-btn.bp-fb-active { background: #f0f7f0; border-color: #5a9e5a; }
.bp-overall-correction {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.bp-overall-thanks {
  font-size: 0.82rem;
  color: #5a9e5a;
  font-weight: 500;
  margin: 0;
}

@keyframes bp-slide-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media print {
  .bp-fb-chip, .bp-overall-feedback { display: none; }
}

@media print {
  .bp-body { background: #fff; }
  .bp-hero { background: #fff; }
  .bp-ics-btn { display: none; }
  .bp-footer { background: #fff; }
  .bp-warn-banner { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bp-conf-medium, .bp-conf-low {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bp-section { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .bp-footer-brand { display: none; }
  .bp-footer-attr::after { content: ' · Briefed (briefed-2.polsia.app)'; }
  .bp-personalize-banner, .bp-cogguest-cta { display: none; }
}
