/* Ask This House — Erin Calloway Real Estate.
   Identity: a printed MLS listing sheet come to life — warm cream paper,
   brick-red ink, serif display type. Deliberately NOT the Vajgrt Labs
   navy/sky company palette: this is the fictional brokerage's own brand. */

:root {
  --paper: #f6efe3;
  --card: #fffdf7;
  --ink: #2e2620;
  --muted: #7a6a5c;
  --brick: #93402f;
  --brick-dark: #76321f;
  --brick-soft: #f3e0d8;
  --line: #ddd0bd;
  --gold: #b98a2f;
  --ok: #3f6b35;
  --shadow: 0 10px 28px rgba(62, 42, 28, 0.13);
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

h1, h2, h3, .brand-name, .masthead-price, .q-count {
  font-family: Georgia, "Times New Roman", serif;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- brand bar ---------- */
.brandbar { background: var(--brick); color: #fdf6ec; }
.brandbar-inner {
  max-width: 1060px; margin: 0 auto; padding: 0.7rem 1.25rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
}
.brand-name { margin: 0; font-size: 1.3rem; letter-spacing: 0.02em; }
.brand-sub { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.18em; color: #f0cdbd; }
.brand-phone { margin: 0; font-size: 0.95rem; }

/* ---------- sheet ---------- */
.sheet { max-width: 1060px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

/* ---------- masthead ---------- */
.masthead {
  text-align: center; padding: 1.6rem 1rem 1.3rem;
  border-bottom: 3px double var(--brick);
}
.status-pill {
  display: inline-block; margin: 0 0 0.6rem; padding: 0.15rem 0.8rem;
  background: var(--brick); color: #fdf6ec; border-radius: 999px;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.masthead h1 { margin: 0; font-size: 2.4rem; font-weight: normal; }
.masthead-line { margin: 0.35rem 0 0; color: var(--muted); font-size: 1.05rem; }
.masthead-price { margin: 0.4rem 0 0; font-size: 2rem; color: var(--brick-dark); }

.pitch-strip {
  margin: 1.4rem auto 0; max-width: 760px; text-align: center;
  font-size: 1.05rem; color: var(--ink);
}

/* ---------- view toggle ---------- */
.view-bar {
  margin-top: 1.4rem; display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
}
.view-toggle {
  display: inline-flex; border: 1.5px solid var(--brick); border-radius: 999px; overflow: hidden;
}
.view-btn {
  background: transparent; color: var(--brick-dark); border: none; cursor: pointer;
  padding: 0.5rem 1.15rem; font-size: 0.96rem;
}
.view-btn.is-active { background: var(--brick); color: #fdf6ec; font-weight: 600; }
.view-note { margin: 0; color: var(--muted); font-size: 0.92rem; text-align: center; }

/* ---------- fact sheet ---------- */
.section-title {
  font-size: 1.25rem; font-weight: normal; color: var(--brick-dark);
  border-bottom: 1px solid var(--line); padding-bottom: 0.35rem; margin: 0 0 0.9rem;
}
.facts { margin-top: 2rem; }
.facts-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem;
}
.fact {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.6rem 0.8rem; box-shadow: var(--shadow);
}
.fact-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.fact-value { display: block; font-size: 1.08rem; margin-top: 0.15rem; }
.seller-note {
  margin: 0.9rem 0 0; padding: 0.7rem 1rem; background: var(--brick-soft);
  border-left: 4px solid var(--brick); border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- main grid ---------- */
.main-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.2rem; margin-top: 2rem;
  align-items: start;
}
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem; box-shadow: var(--shadow);
}
.panel-hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.9rem; }

/* ---------- chat ---------- */
.chat-log {
  display: flex; flex-direction: column; gap: 0.55rem;
  max-height: 380px; overflow-y: auto; padding: 0.4rem 0.2rem;
}
.msg { max-width: 88%; padding: 0.55rem 0.8rem; border-radius: 14px; font-size: 0.96rem; }
.msg p { margin: 0; }
.msg-buyer { align-self: flex-end; background: var(--brick); color: #fdf6ec; border-bottom-right-radius: 4px; }
.msg-house { align-self: flex-start; background: #f1e8d7; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-house .msg-from { display: block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brick-dark); margin-bottom: 0.2rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.8rem 0; }
.chip {
  border: 1px solid var(--brick); background: transparent; color: var(--brick-dark);
  border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.86rem; cursor: pointer;
}
.chip:hover { background: var(--brick-soft); }

.chat-form { display: flex; gap: 0.5rem; }
.chat-form input {
  flex: 1; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem; background: #fff; color: var(--ink);
}
button { font-family: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
#chatSend, #bookBtn, #passBtn {
  background: var(--brick); color: #fdf6ec; border: none; border-radius: 8px;
  padding: 0.6rem 1.1rem; font-size: 0.98rem; cursor: pointer;
}
#chatSend:hover, #bookBtn:hover, #passBtn:hover { background: var(--brick-dark); }

.pass-bar {
  margin-top: 0.9rem; padding: 0.7rem 0.9rem; border: 1px dashed var(--gold);
  border-radius: var(--radius); background: #fbf3dd;
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap;
}
.pass-text { margin: 0; font-size: 0.92rem; }
.pass-bar[hidden] { display: none; }

/* ---------- booking ---------- */
.slots { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.slot-btn {
  text-align: left; padding: 0.6rem 0.85rem; border: 1px solid var(--line);
  background: #fff; border-radius: 8px; font-size: 0.98rem; cursor: pointer; color: var(--ink);
}
.slot-btn:hover { border-color: var(--brick); }
.slot-btn.selected { border-color: var(--brick); background: var(--brick-soft); font-weight: 600; }
.slot-btn.booked { opacity: 0.55; cursor: not-allowed; text-decoration: line-through; }

.book-form { display: flex; flex-direction: column; gap: 0.4rem; }
.book-form label { font-size: 0.88rem; color: var(--muted); margin-top: 0.4rem; }
.book-form input {
  padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem; background: #fff; color: var(--ink);
}
.book-error { color: var(--brick-dark); font-size: 0.9rem; margin: 0.4rem 0 0; font-weight: 600; }
#bookBtn { margin-top: 0.7rem; }

.booked-card {
  margin-top: 1rem; border: 1px solid var(--ok); border-left: 5px solid var(--ok);
  border-radius: var(--radius); padding: 0.8rem 1rem; background: #f2f7ee;
}
.booked-card h3 { margin: 0 0 0.3rem; font-weight: normal; color: var(--ok); }
.booked-card p { margin: 0.2rem 0; }
.text-preview-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 0.7rem; }
.text-preview {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.6rem 0.8rem; font-size: 0.92rem;
}

/* ---------- agent report ---------- */
.agent-panel { margin-top: 1.2rem; }
.agent-grid { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 1.2rem; }
.agent-col h3 { font-weight: normal; font-size: 1rem; color: var(--brick-dark); margin: 0 0 0.4rem; }
.q-count { font-size: 2rem; margin: 0 0 0.8rem; color: var(--brick-dark); }
.agent-col ul { margin: 0; padding-left: 1.1rem; }
.agent-col li { margin-bottom: 0.3rem; font-size: 0.94rem; }
.empty-line { color: var(--muted); list-style: none; margin-left: -1.1rem; font-size: 0.9rem; }
.tally-topic { font-weight: 600; }

/* ---------- owner admin ---------- */
.main-grid[hidden], .agent-panel[hidden], .admin-panel[hidden] { display: none; }
.admin-panel { margin-top: 1.2rem; }
.admin-label {
  margin: 0 0 0.3rem; font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--gold); font-weight: 700;
}
.admin-sub { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; max-width: 720px; }
.admin-money {
  background: linear-gradient(135deg, var(--brick), var(--brick-dark));
  color: #fdf6ec; border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.money-label {
  margin: 0; font-size: 0.76rem; text-transform: uppercase;
  letter-spacing: 0.14em; color: #f0cdbd; font-weight: 700;
}
.money-value { font-family: Georgia, "Times New Roman", serif; font-size: 2.4rem; margin: 0.15rem 0; line-height: 1.1; }
.money-note { margin: 0; font-size: 0.93rem; color: #f6e3d8; max-width: 620px; }
.admin-h { font-weight: normal; font-size: 1.05rem; color: var(--brick-dark); margin: 1.3rem 0 0.5rem; }
.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.admin-row {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.6rem 0.85rem; background: #fff;
}
.admin-row-main { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.admin-q { font-weight: 600; }
.badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  border-radius: 999px; padding: 0.12rem 0.55rem; border: 1px solid var(--gold);
}
.badge-yours { background: var(--gold); color: #fffdf7; }
.admin-row-meta { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.88rem; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-top: 1.3rem; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.7rem 0.6rem; background: var(--card); text-align: center;
}
.stat-num { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.6rem; color: var(--brick-dark); }
.stat-label { font-size: 0.82rem; color: var(--muted); }
.admin-insight {
  margin: 1.2rem 0 0; padding: 0.75rem 1rem; border: 1.5px dashed var(--gold);
  border-radius: var(--radius); background: #fbf3dd; font-weight: 600;
}
.admin-note { color: var(--muted); font-size: 0.88rem; margin: 1rem 0 0; }

/* ---------- price + footer ---------- */
.price-card {
  margin-top: 1.2rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.price-line { font-size: 1.02rem; }
.audit-line { color: var(--muted); }
.reset-btn {
  margin-top: 0.6rem; background: transparent; border: 1px solid var(--brick);
  color: var(--brick-dark); border-radius: 8px; padding: 0.55rem 1rem; cursor: pointer; font-size: 0.95rem;
}
.reset-btn:hover { background: var(--brick-soft); }
.demo-foot { margin-top: 1.4rem; color: var(--muted); font-size: 0.88rem; text-align: center; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .main-grid { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .money-value { font-size: 1.9rem; }
  .masthead h1 { font-size: 1.8rem; }
  .masthead-price { font-size: 1.6rem; }
  .brandbar-inner { flex-direction: column; gap: 0.15rem; align-items: flex-start; }
}
