/*
 * BWS 2.0 — Property Street: Real Estate tab
 * Description: Zillow-inspired light card layout for real physical property
 *              listings — deliberately distinct from Virtual Estate's dark
 *              gamified theme (property-world.css), since they're different
 *              products living under one page.
 * TOC: major tabs; real-estate light panel; articles; search bar; chips;
 *      listings grid; detail panel; modals + forms; dashboard; responsive.
 */

/* ── Major tab switch (Real Estate / Virtual Estate) ─────────────────────── */
.ps-major-intro { margin-bottom: 18px; }
.ps-major-intro p { max-width: 760px; color: rgba(246, 234, 215, .72); font: 400 15px/1.5 var(--font-ui); }

.ps-major-tabs { display: flex; gap: 14px; margin-bottom: 30px; flex-wrap: wrap; }
.ps-major-tabs button {
  flex: 1; min-width: 240px; text-align: left; padding: 16px 20px; border-radius: 12px;
  border: 1px solid rgba(222, 159, 53, .3); background: rgba(20, 9, 3, .6); color: #f7e8cc;
  cursor: pointer; font-family: var(--font-ui);
}
.ps-major-tabs button strong { display: block; font-size: 16px; margin-bottom: 4px; }
.ps-major-tabs button span { display: block; font-size: 12.5px; opacity: .72; font-weight: 400; }
.ps-major-tabs button.is-active { background: linear-gradient(135deg, rgba(200, 137, 42, .28), rgba(80, 50, 10, .4)); border-color: #d99a31; }

/* ── Real Estate panel: light "sheet" inside the dark shell ──────────────── */
[data-major-panel="real-estate"] {
  background: #f7f8fa;
  color: #1c2430;
  border-radius: 16px;
  padding: 28px;
  font-family: var(--font-ui);
}
[data-major-panel="real-estate"] h2 { color: #1c2430; font-family: var(--font-ui); }

.re-section-title { font: 700 20px var(--font-ui); margin: 0 0 12px; }
.re-loading, .re-empty { color: #6b7686; font-size: 13.5px; padding: 12px 0; }

/* ── Articles ──────────────────────────────────────────────────────────── */
.re-articles-wrap { margin-bottom: 28px; }
.re-articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.re-article-card { background: #fff; border: 1px solid #e4e8ee; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(20, 30, 50, .06); }
.re-article-card img { width: 100%; height: 130px; object-fit: cover; display: block; background: #e4e8ee; }
.re-article-body { padding: 14px 16px; }
.re-article-kicker { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #b5772b; font-weight: 700; margin-bottom: 4px; }
.re-article-body h3 { font-size: 15px; margin: 0 0 6px; line-height: 1.3; }
.re-article-body p { font-size: 13px; color: #4b5563; line-height: 1.45; margin: 0; }

/* ── Search bar + category tabs + chips ───────────────────────────────────── */
.re-search-bar { background: #fff; border: 1px solid #e4e8ee; border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; }
.re-category-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.re-category-tabs button { padding: 7px 16px; border-radius: 999px; border: 1px solid #d7dce4; background: #fff; color: #374151; font-size: 13px; cursor: pointer; }
.re-category-tabs button.is-active { background: #1c2430; border-color: #1c2430; color: #fff; }

.re-subtype-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.re-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid #d7dce4; background: #f3f5f8; color: #374151; font-size: 12px; cursor: pointer; }
.re-chip.is-active { background: #c8892a; border-color: #c8892a; color: #fff; }

.re-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.re-filters input, .re-filters select {
  padding: 9px 12px; border-radius: 8px; border: 1px solid #d7dce4; font-size: 13px; font-family: var(--font-ui); background: #fff; color: #1c2430;
}
.re-filters button[type="submit"] { padding: 9px 20px; border-radius: 8px; border: none; background: #1c2430; color: #fff; font-weight: 600; cursor: pointer; }

.re-action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.re-btn { display: inline-block; padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; font-family: var(--font-ui); }
.re-btn--primary { background: #c8892a; color: #fff; }
.re-btn--primary:hover { background: #b3781f; }
.re-btn--ghost { background: #fff; border-color: #d7dce4; color: #1c2430; }
.re-btn--ghost:hover { background: #f3f5f8; }

/* ── Listings grid ─────────────────────────────────────────────────────────── */
.re-listings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.re-card { background: #fff; border: 1px solid #e4e8ee; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(20, 30, 50, .06); cursor: pointer; transition: box-shadow .15s, transform .15s; }
.re-card:hover { box-shadow: 0 6px 18px rgba(20, 30, 50, .12); transform: translateY(-2px); }
.re-card-img { height: 170px; background: #e4e8ee linear-gradient(135deg, #dfe4ea, #eef1f5); background-size: cover; background-position: center; position: relative; }
.re-card-badge { position: absolute; top: 10px; left: 10px; background: rgba(28, 36, 48, .85); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 999px; }
.re-card-body { padding: 12px 14px; }
.re-card-price { font: 700 18px var(--font-ui); color: #1c2430; }
.re-card-facts { font-size: 12.5px; color: #4b5563; margin: 2px 0 6px; }
.re-card-title { font-size: 13.5px; font-weight: 600; color: #1c2430; margin-bottom: 2px; }
.re-card-address { font-size: 12px; color: #6b7686; }

/* ── Detail panel ─────────────────────────────────────────────────────────── */
.re-detail { background: #fff; border: 1px solid #e4e8ee; border-radius: 12px; padding: 22px; margin-bottom: 24px; position: relative; }
.re-detail-close { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 20px; cursor: pointer; color: #6b7686; }
.re-detail-photos { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; }
.re-detail-photos img { height: 220px; border-radius: 8px; object-fit: cover; }
.re-detail-noimg { height: 160px; display: flex; align-items: center; justify-content: center; background: #f3f5f8; border-radius: 8px; color: #9aa4b2; width: 100%; }
.re-detail-info h2 { font: 700 24px var(--font-ui); margin: 4px 0; }
.re-detail-price { font: 700 22px var(--font-ui); color: #c8892a; margin-bottom: 6px; }
.re-detail-address { color: #4b5563; margin-bottom: 10px; }
.re-detail-facts { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 13.5px; color: #374151; margin-bottom: 14px; }
.re-detail-desc { line-height: 1.55; color: #374151; margin-bottom: 14px; }
.re-detail-agent { margin-bottom: 14px; font-size: 13.5px; }
.re-verified { color: #1c7a4b; font-weight: 600; }
.re-detail-contact { display: flex; gap: 10px; }

/* ── Modals ────────────────────────────────────────────────────────────────── */
.re-modal { position: fixed; inset: 0; background: rgba(10, 6, 2, .6); z-index: 200; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 40px 16px; }
.re-modal[hidden] { display: none; }
.re-modal-inner { background: #fff; color: #1c2430; border-radius: 14px; padding: 28px; width: min(560px, 100%); position: relative; font-family: var(--font-ui); }
.re-modal-inner--wide { width: min(760px, 100%); }
.re-modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: #6b7686; }
.re-modal-sub { color: #6b7686; font-size: 13.5px; margin: -6px 0 16px; }
.re-modal-inner form { display: flex; flex-direction: column; gap: 12px; }
.re-modal-inner label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #374151; flex: 1; }
.re-modal-inner input, .re-modal-inner select, .re-modal-inner textarea {
  padding: 9px 11px; border-radius: 8px; border: 1px solid #d7dce4; font-size: 13.5px; font-weight: 400; font-family: var(--font-ui); color: #1c2430;
}
.re-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.re-form-row label { min-width: 140px; }
#re-form-status, #re-agent-form-status { font-size: 13px; color: #4b5563; }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.re-dashboard-list { margin-bottom: 22px; }
.re-dash-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eef1f5; font-size: 13.5px; }
.re-dash-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.re-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; text-transform: capitalize; margin-left: 8px; }
.re-status--draft { background: #f3f5f8; color: #6b7686; }
.re-status--pending_review, .re-status--pending { background: #fdf1e0; color: #9a5b12; }
.re-status--active, .re-status--approved { background: #e8f7ef; color: #1c6b43; }
.re-status--rejected { background: #fdeceb; color: #b3382c; }
.re-rejection { font-size: 12px; color: #b3382c; margin-top: 2px; }
.re-msg { font-size: 12px; color: #6b7686; margin-top: 2px; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .re-articles, .re-listings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-major-tabs { flex-direction: column; }
}
@media (max-width: 620px) {
  .re-articles, .re-listings-grid { grid-template-columns: 1fr; }
  [data-major-panel="real-estate"] { padding: 16px; }
}
