/**
 * Commercial Discovery — Premium Parity + D1 polish (2026-11-13).
 *
 * Commercial SERP body includes `listings-page`, so Residential Discovery
 * presentation (body.listings-page Dense Trust) is the authoritative chrome —
 * including bayut-filter-panel and bayut-price-range.
 *
 * This file keeps commercial-data extras, hides unsupported shells, and applies
 * display-only title uppercase to match Residential Discovery convention.
 * Catalogue / SSR / JS title strings are not rewritten here.
 */

/* Commercial-only fact chips (fit-out / floor) — same weight as Residential furnished. */
body.commercial-page.listings-page .bayut-card__spec-fit span,
body.commercial-page.listings-page .bayut-card__spec-floor span {
  font-weight: 550;
  color: #5a697b;
}

body.commercial-page.listings-page .bayut-card__trust-row .bayut-card__avail:empty {
  display: none;
}

/* Hide legacy top AI composer / float shells — Ask Glen Visual V2 FAB is the entry. */
body.commercial-page.listings-page .rv-ai-search[data-ai-search-context="commercial"],
body.commercial-page.listings-page [data-ai-float-context="commercial"] {
  display: none !important;
}

/* Do not paint unsupported Map / Rental Needs affordances (Unified Map not wired yet). */
body.commercial-page.listings-page [data-view-toggle="map"],
body.commercial-page.listings-page [data-rental-needs],
body.commercial-page.listings-page [data-saved-search-cta] {
  display: none !important;
}

/* Quick-filter radios live in toolbar chips; keep sidebar fieldset out of layout. */
body.commercial-page.listings-page .bayut-filter-fieldset--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------
 * D1 — Commercial Discovery card titles: uppercase (display-only).
 * Matches Residential Discovery convention. Beats Dense Trust
 * `text-transform: none` with higher specificity.
 * Do NOT uppercase agency names, locations, or supporting descriptions.
 * ------------------------------------------------------------------ */
body.commercial-page.listings-page.bayut-serp-page .bayut-card__title,
body.commercial-page.listings-page.bayut-serp-page .bayut-card__title a {
  text-transform: uppercase;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.commercial-page.listings-page.bayut-serp-page .bayut-serp__results[data-view-mode="list"] .bayut-card__title,
body.commercial-page.listings-page.bayut-serp-page .bayut-serp__results[data-view-mode="list"] .bayut-card__title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 2px;
  color: #5a697b;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  max-height: calc(1.3em * 2);
  text-transform: uppercase;
}

body.commercial-page.listings-page.bayut-serp-page .bayut-serp__results[data-view-mode="grid"] .bayut-card__title,
body.commercial-page.listings-page.bayut-serp-page .bayut-serp__results[data-view-mode="grid"] .bayut-card__title a {
  color: #5a697b;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

/* Agency / location stay sentence presentation (never inherit title uppercase). */
body.commercial-page.listings-page.bayut-serp-page .bayut-card__location,
body.commercial-page.listings-page.bayut-serp-page .lister-brand-name,
body.commercial-page.listings-page.bayut-serp-page .bayut-card__agent-brand strong,
body.commercial-page.listings-page.bayut-serp-page .lister-brand-eyebrow {
  text-transform: none;
}

/* Heading rhythm — align with Residential Dense Trust H1 scale. */
body.commercial-page.listings-page.bayut-serp-page .bayut-serp__title {
  margin: 0 0 6px;
  color: #062b5b;
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

body.commercial-page.listings-page.bayut-serp-page .bayut-serp__lede,
body.commercial-page.listings-page.bayut-serp-page .bayut-serp__intro p {
  margin: 0 0 14px;
  color: #5a6b7d;
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 52rem;
}

/* Card elevation / radius — restrained Dense Trust match. */
body.commercial-page.listings-page.bayut-serp-page .bayut-card {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(10, 16, 32, 0.06);
}

body.commercial-page.listings-page.bayut-serp-page .bayut-card:hover {
  box-shadow: 0 2px 8px rgba(10, 16, 32, 0.08);
}

/* Mobile — intentional density, no horizontal overflow. */
@media (max-width: 900px) {
  body.commercial-page.listings-page.bayut-serp-page .bayut-serp__title {
    font-size: 1.28rem;
  }

  body.commercial-page.listings-page.bayut-serp-page .bayut-card__title,
  body.commercial-page.listings-page.bayut-serp-page .bayut-card__title a {
    text-transform: uppercase;
    font-size: 0.78rem;
    line-height: 1.32;
  }

  body.commercial-page.listings-page.bayut-serp-page .bayut-card__agent-actions .bayut-btn {
    min-height: 40px;
  }
}

@media (max-width: 390px) {
  body.commercial-page.listings-page.bayut-serp-page .bayut-serp__title {
    font-size: 1.18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.commercial-page.listings-page.bayut-serp-page .bayut-card {
    transition: none;
  }
}
