/* ════════════════════════════════════════════════════════════════
   NBRE · overlays.css — compare overlay, agent desk (Leads), one-pager PDF print
   Tách từ styles.css. THỨ TỰ NỐI (cascade): base → layout → components
   → estate-detail → editorial → detail-modules → overlays → theme-light.
   theme-light.css PHẢI nạp cuối. Đừng đảo thứ tự <link>.
   ════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   SO SÁNH TÀI SẢN — compare overlay
═══════════════════════════════════════════════════════════════ */
.fav-folio__cmp {
  display: block;
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.7em 1em;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(200, 169, 114, 0.08);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.fav-folio__cmp:hover {
  border-color: var(--gold);
  background: rgba(200, 169, 114, 0.16);
}
.compare {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s var(--ease),
    visibility 0.4s var(--ease);
}
.compare.is-open {
  opacity: 1;
  visibility: visible;
}
.compare__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.compare__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1000px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
  transform: translateY(16px);
  transition: transform 0.5s var(--ease);
}
.compare.is-open .compare__panel {
  transform: none;
}
.compare__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 3vw, 1.8rem);
  border-bottom: 1px solid var(--line);
}
.compare__head h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--text);
}
.compare__close {
  width: 38px;
  height: 38px;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition:
    color 0.3s var(--ease),
    background 0.3s var(--ease);
}
.compare__close:hover {
  color: var(--gold-bright);
  background: rgba(200, 169, 114, 0.1);
}
.compare__scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 clamp(1.2rem, 3vw, 1.8rem) clamp(1.2rem, 3vw, 1.8rem);
}
.cmp {
  width: 100%;
  border-collapse: collapse;
}
.cmp__rh {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  white-space: nowrap;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  background: var(--ink-2);
  padding: 0.75rem 0.9rem 0.75rem 0;
}
.cmp__est {
  vertical-align: bottom;
  min-width: 132px;
  text-align: center;
  padding: 1rem 0.6rem 0.85rem;
}
.cmp__est-img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.cmp__est-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cmp__est b {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.15;
  color: var(--text);
}
.cmp__est i {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 0.25rem;
}
.cmp td {
  text-align: center;
  font-size: 0.86rem;
  color: var(--text);
  padding: 0.7rem 0.6rem;
  border-top: 1px solid var(--line);
}
.cmp tbody .cmp__rh {
  border-top: 1px solid var(--line);
}
.cmp td.is-best {
  color: var(--gold-bright);
  font-weight: 600;
}
.cmp td.is-best::after {
  content: "★";
  margin-left: 0.35em;
  font-size: 0.6rem;
  vertical-align: top;
  color: var(--gold);
}
.cmp__empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   BÀN MÔI GIỚI — Agent / Leads (màn ẩn, theme-aware)
═══════════════════════════════════════════════════════════════ */
.agent {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s var(--ease),
    visibility 0.4s var(--ease);
}
.agent.is-open {
  opacity: 1;
  visibility: visible;
}
.agent__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.agent__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1080px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
  transform: translateY(16px);
  transition: transform 0.5s var(--ease);
}
.agent.is-open .agent__panel {
  transform: none;
}
.agent__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.2rem, 3vw, 1.9rem);
  border-bottom: 1px solid var(--line);
}
.agent__kicker {
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.agent__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  color: var(--text);
  line-height: 1.1;
}
.agent__close {
  flex: none;
  width: 38px;
  height: 38px;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition:
    color 0.3s var(--ease),
    background 0.3s var(--ease);
}
.agent__close:hover {
  color: var(--gold-bright);
  background: rgba(200, 169, 114, 0.1);
}
.agent__scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1.1rem, 3vw, 1.7rem);
}
.agent__sub {
  max-width: 64ch;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}
.agent__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin: 1.2rem 0;
}
.agent__stat {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(200, 169, 114, 0.04);
}
.agent__stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--gold-bright);
  line-height: 1;
}
.agent__stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.agent__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.agent__filters,
.agent__tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.agent__filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.5em 0.9em;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.agent__filter i {
  font-style: normal;
  font-size: 0.66rem;
  color: var(--muted-2);
}
.agent__filter:hover {
  color: var(--text);
  border-color: var(--gold);
}
.agent__filter.is-on {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}
.agent__filter.is-on i {
  color: rgba(7, 9, 14, 0.6);
}
.agent__tool {
  padding: 0.5em 0.9em;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(200, 169, 114, 0.08);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.agent__tool:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(200, 169, 114, 0.16);
}
.agent__tool--danger {
  color: #d98c84;
}
.agent__tool--danger:hover:not(:disabled) {
  border-color: #d98c84;
  background: rgba(217, 140, 132, 0.12);
}
.agent__tool:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.agent__tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.agtab {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.agtab th {
  position: sticky;
  top: 0;
  text-align: left;
  white-space: nowrap;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted-2);
  background: var(--ink-3);
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
.agtab td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}
.agtab tbody tr:last-child td {
  border-bottom: none;
}
.agtab tbody tr:hover td {
  background: rgba(200, 169, 114, 0.05);
}
.agtab__time {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.74rem;
}
.agtab__est {
  font-family: var(--serif);
  font-size: 1rem;
}
.agtab__name {
  white-space: nowrap;
}
.agtab__detail {
  color: var(--muted);
  min-width: 12ch;
}
.agtab__tel {
  color: var(--gold-soft);
  text-decoration: none;
  white-space: nowrap;
}
.agtab__tel:hover {
  color: var(--gold-bright);
}
.agtab__tag,
.agent__tag {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 2px;
  white-space: nowrap;
}
.agent__tag--unlock {
  color: var(--gold-bright);
  background: rgba(200, 169, 114, 0.14);
}
.agent__tag--view {
  color: var(--cyan);
  background: rgba(111, 182, 196, 0.14);
}
.agent__tag--consult {
  color: var(--text);
  background: rgba(236, 232, 223, 0.1);
}
.agtab__type {
  white-space: nowrap;
}
.agent__sent {
  margin-left: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted-2);
}
.agent__sent.is-ok {
  color: #6fc488;
}
.agent__banner {
  margin: 0.4rem 0 1.1rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--gold-soft);
  background: rgba(200, 169, 114, 0.08);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 3px;
}
.agtab__actcol {
  text-align: right;
}
.agtab__act {
  white-space: nowrap;
  text-align: right;
}
.agtab__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 0.35rem;
  color: var(--gold-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: all 0.3s var(--ease);
}
.agtab__btn svg {
  width: 16px;
  height: 16px;
}
.agtab__btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(200, 169, 114, 0.1);
}
.agtab__btn--wa:hover {
  color: #6fc488;
  border-color: #6fc488;
  background: rgba(111, 196, 136, 0.12);
}
.agent__empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 4px;
}
.agent__signals {
  margin-top: 1.4rem;
}
.agent__signals h4 {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted-2);
  margin-bottom: 0.7rem;
}
.agent__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.agent__chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 0.4em 0.8em;
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.agent__chip b {
  font-family: var(--serif);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
}
@media (max-width: 640px) {
  .agent__stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .agent__bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ONE-PAGER PDF — hồ sơ tài sản (mực trên giấy, chỉ hiện khi in)
═══════════════════════════════════════════════════════════════ */
.printdoc {
  display: none;
}
@media print {
  /* gỡ khoá cuộn iOS (body fixed/top:-Npx) để dossier không bị đẩy ra ngoài trang */
  html,
  body,
  body.no-scroll {
    position: static !important;
    inset: auto !important;
    top: 0 !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
  }
  body > * {
    display: none !important;
  }
  #printDossier {
    display: block !important;
  }
  @page {
    size: A4;
    margin: 12mm;
  }
}
.printdoc {
  color: #221d15;
  background: #fff;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  font-family: "Cormorant Garamond", Georgia, serif;
}
.printdoc__page {
  max-width: 186mm;
  margin: 0 auto;
}
.pd-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #a9802f;
  padding-bottom: 8px;
}
.pd-brand {
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 15px;
  color: #1a140a;
}
.pd-brand small {
  display: block;
  font-weight: 400;
  letter-spacing: 0.2em;
  font-size: 8px;
  text-transform: uppercase;
  color: #8a6826;
}
.pd-ref {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a6826;
}
.pd-hero {
  width: 100%;
  height: 55mm;
  object-fit: cover;
  border-radius: 3px;
  margin-top: 10px;
}
.pd-title {
  margin: 10px 0 4px;
}
.pd-tier {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9802f;
}
.pd-title h1 {
  font-size: 27px;
  font-weight: 500;
  line-height: 1.05;
  margin: 2px 0;
  color: #1a140a;
}
.pd-loc {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 11px;
  color: #6a6053;
}
.pd-price {
  font-size: 22px;
  color: #74551c;
  margin-top: 4px;
}
.pd-price span {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 11px;
  color: #8a6826;
}
.pd-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10mm;
}
.pd-block {
  margin-top: 10px;
}
.pd-block h2 {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9802f;
  border-bottom: 1px solid #e0d6c2;
  padding-bottom: 4px;
  margin-bottom: 6px;
}
.pd-specs,
.pd-inv,
.pd-score,
.pd-legal {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 10.5px;
}
.pd-specs,
.pd-inv,
.pd-score {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 12px;
}
.pd-specs div,
.pd-inv div,
.pd-score div,
.pd-legal div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dotted #e6ddca;
  padding: 2px 0;
}
.pd-specs span,
.pd-inv span,
.pd-score span,
.pd-legal span {
  color: #6a6053;
}
.pd-specs b,
.pd-inv b,
.pd-score b,
.pd-legal b {
  color: #221d15;
  font-weight: 600;
}
.pd-foot {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid #e0d6c2;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 9px;
  line-height: 1.5;
  color: #6a6053;
}
.pd-foot b {
  color: #74551c;
}

