/* =====================================================================
   Rentvala Phase 5/6/7 — UI additions (fully tokenized)
   All colours come from tokens.css. The old :root palette override and
   the automatic prefers-color-scheme block were removed deliberately —
   the inline head script + tokens.css are the only theme mechanism.
   ===================================================================== */

/* "How to Use" help button */
.rv-howto-btn { font-size: 12px; padding: 2px 10px; line-height: 1.3; }
.rv-howto-btn i { font-size: 13px; }
.rv-howto-body p { margin-bottom: .65rem; }
.rv-howto-body ul { padding-left: 1.1rem; }
.rv-howto-body code { background: var(--surface-2); padding:1px 5px; border-radius:3px; font-size:90%; color: var(--primary-ink); }

/* Clickable stat cards on dashboards */
.st-card.clickable, .crm-mini.clickable {
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.st-card.clickable:hover, .crm-mini.clickable:hover {
  transform: translateY(-2px); box-shadow: var(--sh-2);
}
.st-card a, .crm-mini a { text-decoration: none; color: inherit; display: block; }

/* Reports module shared */
.rv-report-filters .form-label { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom:2px; }
.rv-report-filters .form-control, .rv-report-filters .form-select { font-size: 13px; padding: 4px 8px; }
.rv-report-toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.rv-report-toolbar .btn { font-size: 12px; }

/* Owner profile rating stars */
.rv-rating-stars { color: var(--warm-yellow); font-size:14px; letter-spacing:1px; }
.rv-rating-stars .empty { color: var(--line-2); }

/* Smart suggestions panel */
.rv-suggest-card {
  background: var(--primary-ll);
  border-left: 4px solid var(--primary);
  padding: 14px 18px; border-radius: 8px; margin-bottom: 14px;
}
.rv-suggest-card h6 { color: var(--primary-ink); margin-bottom: 8px; font-weight:600; }
.rv-suggest-card .sug-item { padding: 6px 0; border-bottom: 1px dashed var(--line-2); display:flex; gap:10px; align-items:flex-start; }
.rv-suggest-card .sug-item:last-child { border-bottom:0; }
.rv-suggest-card .sug-icon { color: var(--primary); }

/* Freshness "Freshen" button */
.btn-freshen { background: var(--warning-soft); color: var(--warning); border:1px solid var(--warning); }
.btn-freshen:hover { background: var(--warning); color: #fff; }

/* Reports access matrix */
.report-access-tbl td, .report-access-tbl th { vertical-align: middle; }
.report-access-tbl .form-check-input { margin: 0; }

/* Hide bottom-anchored fab when modal is open */
body.modal-open .floating-fab { display:none; }

/* Buyer guides — public */
.bg-hero { background:linear-gradient(180deg, #0E1B17 0%, var(--primary-dd) 100%); color:#fff; padding:60px 0 80px; }
.bg-hero h1 { font-weight:700; font-size: clamp(28px,5vw,46px); color:#fff; }
.bg-hero .lead { color:rgba(255,255,255,.78); max-width:680px; }
.bg-city-card { background: var(--surface); border:1px solid var(--line); border-radius:12px; overflow:hidden; box-shadow: var(--sh-1); transition:transform .15s ease, box-shadow .15s ease; }
.bg-city-card:hover { transform:translateY(-3px); box-shadow: var(--sh-2); }
.bg-city-card .thumb { height:170px; background: var(--bg-mint); background-size:cover; background-position:center; }
.bg-city-card .body { padding:16px 18px; }
.bg-city-card h5 { font-weight:600; color: var(--ink); }

/* Owner landing pages */
.owner-hero { background: linear-gradient(135deg, var(--primary-dd) 0%, var(--primary-d) 100%); color:#fff; padding:70px 0; }
.owner-hero h1 { font-weight:700; font-size: clamp(30px,5vw,48px); color:#fff; }
.owner-hero .badge-trust { background:rgba(255,255,255,.18); color:#fff; padding:6px 14px; border-radius:50px; font-weight:500; font-size:13px; }
.owner-feature { padding:24px; border-radius:10px; background: var(--surface); border:1px solid var(--line); box-shadow: var(--sh-1); height:100%; }
.owner-feature .icon { width:48px;height:48px;border-radius:10px;background: var(--primary-l);color: var(--primary-ink);display:flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:14px; }
.owner-testimonial { background: var(--bg-soft); border-left:4px solid var(--primary-d); padding:18px 22px; border-radius:6px; font-style:italic; color: var(--ink-2); }

/* ── Stop layout shift on hero / card images ─────────────────────── */
.stz-hero-card,
.prop-card .prop-img,
.bg-city-card .thumb {
  background-color: var(--bg-mint);
}
.prop-card .prop-img img,
.prop-card-frame img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}
img[loading="lazy"] { content-visibility: auto; }

/* ── Footer rhythm ───────────────────────────────────────────────── */
footer.site-footer { margin-top: 64px; }
footer.site-footer + * { display: none; }
footer.site-footer .ft-link:hover { color: var(--accent); }
footer.site-footer .ft-icon:hover { background: var(--accent); color: #16201C; }
body { padding-bottom: 0 !important; }

/* ── View Number / Contact modal look ─────────────────────────────── */
.rv-contact-modal { background: var(--surface); border-radius: 16px; border:0; box-shadow: var(--sh-3); }
.rv-contact-card { background: linear-gradient(135deg, var(--primary-l) 0%, var(--surface) 100%); border-radius: 12px; padding: 22px 18px; }
.rv-contact-number { font-family: 'Outfit', system-ui, sans-serif; font-weight: 700; font-size: clamp(24px, 4vw, 32px); letter-spacing: 1px; color: var(--primary-ink); }

/* ── Similar-properties section + match-tier badges ───────────────── */
.similar-section .similar-tier-badge {
  display: inline-flex; align-items: center;
  background: var(--primary-l); color: var(--primary-ink);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 4px 10px; border-radius: 999px;
}
.similar-section h5 { color: var(--ink); }

/* ── Compare page ──────────────────────────────────────────────────── */
.compare-table { min-width: 600px; }
.compare-table td.bg-light { background: var(--primary-ll) !important; color: var(--ink) !important; }

/* ── Focus rings ───────────────────────────────────────────────────── */
.view-contact-btn:focus-visible { outline: 3px solid var(--glow-color); outline-offset: 2px; }

/* ── Tame the bouncy bottom bar on phones ─────────────────────────── */
@media (max-width: 575px) {
  #compareBar { bottom: 12px; left: 12px; right: 12px; }
}

/* ── Property card quick-action row ───────────────────────────────── */
.prop-card .prop-body { padding-bottom: 60px; }   /* room for the floating buttons */
.card-quick-actions { transition: opacity .2s ease; }
.prop-card-frame:hover .card-quick-actions { opacity: 1; }
.card-quick-actions .btn:hover { transform: translateY(-1px); }
@media (max-width: 575px) {
  .card-quick-actions { left: 8px; right: 8px; bottom: 8px; gap: 4px; }
  .card-quick-actions .btn { font-size: .7rem; padding: .3rem .55rem; }
}

/* =====================================================================
   Squareyards-style detail page + image protection + ad cards
   ===================================================================== */

/* ── Image protection (CSS layer) ─────────────────────────────────── */
.protected-img,
.protected-img img,
.sy-gallery,
.sy-gallery img,
.sy-thumb,
.sy-thumb img {
  -webkit-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}
.protected-img img { pointer-events: none; }
.sy-gallery, .sy-thumb { position: relative; }
.sy-watermark {
  position: absolute; right: 14px; bottom: 12px;
  background: rgba(15,23,42,.55); color: #fff;
  font: 600 11px/1 'Outfit', system-ui;
  padding: 6px 12px; border-radius: 999px; letter-spacing: .04em;
  text-transform: lowercase; pointer-events: none; user-select: none;
  backdrop-filter: blur(2px);
}

/* ── Detail page scaffolding ──────────────────────────────────────── */
.sy-breadcrumb-strip {
  background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 14px 0;
  font-size: 13px;
}
.sy-breadcrumb-strip .breadcrumb-item a { color: var(--primary-ink); text-decoration: none; }
.sy-breadcrumb-strip .breadcrumb-item.active { color: var(--muted); }
.sy-page { background: var(--bg-soft); }

/* hero gallery */
.sy-gallery {
  width: 100%; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden;
  background: var(--bg-mint); box-shadow: var(--sh-2);
}
.sy-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sy-no-image {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px; color: var(--muted-2); background: var(--bg-mint); border-radius: 18px;
}
.sy-gallery-badges {
  position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; flex-wrap: wrap;
}
.sy-badge-verified { background: var(--primary-dd); color: #fff; }
.sy-badge-featured { background: var(--warm-yellow); color: #14685D; }
.sy-badge-txn { background: rgba(15,23,42,.78); color: #fff; }
.sy-gallery-badges .badge { font-weight: 700; padding: 6px 10px; border-radius: 999px; font-size: 11px; }

/* thumbs */
.sy-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.sy-thumb {
  width: 110px; height: 70px; flex: 0 0 auto;
  border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s ease, transform .15s ease;
  background: var(--bg-mint);
}
.sy-thumb:hover { transform: translateY(-2px); }
.sy-thumb.active { border-color: var(--primary-d); }
.sy-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sy-thumb-video {
  display: flex; align-items: center; justify-content: center;
  background: #1e293b; color: #fff; font-size: 26px;
}

/* headline + price */
.sy-title {
  font-family: 'Outfit', system-ui, sans-serif; font-weight: 800; font-size: clamp(22px, 3vw, 30px);
  color: var(--ink); line-height: 1.25; margin: 0;
}
.sy-title .sy-sub { font-weight: 500; font-size: .7em; color: var(--muted); display: block; margin-top: 2px; }
.sy-price { font-family: 'Outfit', system-ui, sans-serif; font-weight: 800; font-size: clamp(24px, 3vw, 30px); color: var(--primary-ink); }
.sy-price-unit { font-size: .55em; color: var(--muted); font-weight: 600; }
.sy-price-secondary { color: var(--muted); font-size: 14px; }

/* quick stats row */
.sy-quickstats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
}
@media (min-width: 992px) { .sy-quickstats { grid-template-columns: repeat(8, 1fr); } }
.sy-stat { text-align: center; padding: 6px 4px; }
.sy-stat i { font-size: 18px; color: var(--primary-d); }
.sy-stat-label { font-size: 10px; text-transform: uppercase; color: var(--muted-2); font-weight: 600; letter-spacing: .03em; margin-top: 4px; }
.sy-stat-val { font-size: 14px; color: var(--ink); font-weight: 700; margin-top: 1px; }

/* section blocks */
.sy-section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 18px; }
.sy-section-title {
  font-family: 'Outfit', system-ui; font-weight: 700; font-size: 19px; color: var(--ink); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.sy-section-body { color: var(--ink-2); font-size: 15px; line-height: 1.7; }

/* amenities */
.sy-amen-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px;
}
@media (min-width: 768px) { .sy-amen-grid { grid-template-columns: repeat(3, 1fr); } }
.sy-amen {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-soft); border-radius: 10px; font-size: 14px; color: var(--ink); font-weight: 500;
}
.sy-amen i { color: var(--primary-ink); font-size: 18px; }

/* info rows */
.sy-info-row { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 14px; }
.sy-info-row i { color: var(--primary-ink); font-size: 18px; margin-top: 2px; }

/* ── Right rail (sticky) ─────────────────────────────────────────── */
.sy-rail { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 16px; }
.sy-rail-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--sh-2); }
.sy-rail-header { background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary-dd) 100%); color: #fff; padding: 18px 20px; }
.sy-rail-price { font-family: 'Outfit', system-ui; font-weight: 800; font-size: 26px; line-height: 1; }
.sy-rail-sub { font-size: 12px; opacity: .9; margin-top: 2px; }
.sy-rail-body { padding: 18px 20px; }
.sy-rail-mini-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.sy-rail-footer { padding: 12px 20px; background: var(--bg-soft); }
.sy-rail-ads { display: flex; flex-direction: column; gap: 10px; }

.sy-ad-card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.sy-ad-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.sy-ad-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.sy-ad-body { padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.sy-ad-title { font-weight: 700; font-size: 14px; color: var(--ink); }
.sy-ad-cta { color: var(--primary-ink); font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ── Ad banner strips on grids (homepage / listing / city / society) */
.rv-ad-strip { margin: 1.25rem 0; }
.rv-ad-strip-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rv-ad-strip--rail .rv-ad-strip-row { grid-template-columns: 1fr; }
.rv-ad-strip .sy-ad-card img { aspect-ratio: 16/7; }

/* ── Rich footer ───────────────────────────────────────────────── */
.site-footer-rich .ft-locality-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 28px; padding: 8px 0 20px;
}
@media (min-width: 768px) { .site-footer-rich .ft-locality-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px){ .site-footer-rich .ft-locality-grid { grid-template-columns: repeat(6, 1fr); } }
.site-footer-rich .ft-locality-col { font-size: 13px; }
.site-footer-rich .ft-locality-city { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.site-footer-rich .ft-locality-city a { color: var(--accent); text-decoration: none; }
.site-footer-rich .ft-locality-city a:hover { text-decoration: underline; }
.site-footer-rich .ft-locality-sub { color: var(--footer-ink); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.site-footer-rich .ft-locality-list { list-style: none; padding: 0; margin: 0 0 6px; }
.site-footer-rich .ft-locality-list li { margin: 2px 0; }
.site-footer-rich .ft-locality-list a { color: var(--footer-ink); text-decoration: none; font-size: 12.5px; }
.site-footer-rich .ft-locality-list a:hover { color: #fff; }
.site-footer-rich .ft-soft-divider { border-top: 1px solid rgba(255,255,255,.08); margin: 4px 0 24px; }

/* Rentvala Freshness Promise badge */
.rv-fresh-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--success-soft); color: var(--success);
  font-size: .78rem; font-weight: 700; padding: .3rem .8rem;
  border-radius: var(--r-pill); cursor: help;
}
.rv-fresh-badge .bi { font-size: .95em; }

/* Recently-viewed strip (JS-rendered from localStorage) */
.rv-recent-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.rv-recent-card {
  flex: 0 0 200px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; text-decoration: none; color: var(--ink);
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.rv-recent-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); color: var(--ink); }
.rv-recent-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--bg-mint); }
.rv-recent-card .rrc-body { padding: 8px 12px; }
.rv-recent-card .rrc-title { font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-recent-card .rrc-price { color: var(--primary-ink); font-weight: 700; font-size: .85rem; }
.rv-recent-card .rrc-loc { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Public page hero strip (services, generic) */
.rv-page-hero { background: linear-gradient(180deg, var(--primary-ll) 0%, var(--bg) 100%); }

/* Services directory cards */
.rv-service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.25rem; text-align: center;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.rv-service-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--primary); }
.rv-service-card--active { border-color: var(--primary); box-shadow: 0 0 0 4px var(--glow-color); }
.rv-service-icon {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto .75rem;
  background: var(--primary-l); color: var(--svc-color, var(--primary-ink));
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
[data-theme="dark"] .rv-service-icon { color: var(--primary-ink); }

/* responsive tweaks for rail on mobile */
@media (max-width: 991px) {
  .sy-rail { position: static; }
}
