/* =============================================================================
   DRAFT ONLY — do not enqueue until cws says the Trustindex widget shortcode
   is live on Jupiter / Delray (and eventually Home).
   Author: forge (Track A executor)
   Date:   2026-09-28
   Match:  original Home grev-* tokens (soft white cards, light shadow-sm,
           8px radius, 22×24 padding, ~340px desktop / 85vw mobile).
   Gold:   static_prototype/essential/site.css grev-* (~259–279) + FIX 5 (~529+)
           + site.css.live D7 lock (~1457+) + D7 grev-cards-from-site.css
   Status: .ti-widget NOT yet rendered on public pages as of 2026-09-28 ~12:13 ET.
           Selectors below use common Trustindex v14 class names; retarget once
           live DOM is scraped (see TODOs). Do NOT touch page 4 / draft 982 /
           site.css visitor file / any live MU-plugin from this draft.
   ============================================================================= */

/* ---------- grev token aliases (local to this draft) ---------- */
.cws-ti-grev,
.band-grey.cws-ti-grev,
.wp-block-group.band-grey.cws-ti-grev {
  --cws-ti-band: #EDEEF0;                         /* --light-grey */
  --cws-ti-card-bg: #fff;
  --cws-ti-radius: 8px;                           /* --radius-card */
  --cws-ti-shadow: 0 1px 3px rgba(51, 56, 63, .08); /* --shadow-sm — NOT shadow-md */
  --cws-ti-pad-y: 22px;
  --cws-ti-pad-x: 24px;
  --cws-ti-card-w: 340px;
  --cws-ti-gap: 22px;
  --cws-ti-name: #33383F;                         /* --deep-grey */
  --cws-ti-meta: #8a8f95;
  --cws-ti-body: #505A65;                         /* --chair-grey */
  --cws-ti-score: #33383F;
  --cws-ti-star: #F5B301;                         /* --gold / Google gold #FBBC05 OK */
  --cws-ti-g-b: #4285F4;
  --cws-ti-g-r: #EA4335;
  --cws-ti-g-y: #FBBC05;
  --cws-ti-g-g: #34A853;
}

/* =============================================================================
   SCOPE WRAPPERS
   1) Generic host: wrap shortcode in <div class="cws-ti-grev band-grey">…</div>
      (or a WP group with those classes) — preferred for Jupiter/Delray drops.
   2) Page-scoped fallbacks: body.page-id-6 = Jupiter, body.page-id-5 = Delray.
      Home (body.home / page-id-4) is listed as eventual-only — do NOT activate
      against page 4 until cws explicitly asks.
   ============================================================================= */

/* ---------- BAND ---------- */
.cws-ti-grev.band-grey,
.band-grey.cws-ti-grev,
body.page-id-6 .cws-ti-grev,
body.page-id-5 .cws-ti-grev {
  background: var(--cws-ti-band, #EDEEF0);
  position: relative;
}

/* Optional soft photographic wash (~0.14). Set --band-img on the host if used.
   TODO(cws): only enable if Jupiter/Delray bands also carry a wash image. */
.cws-ti-grev.band-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .14;
  background-image: var(--band-img);
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.cws-ti-grev.band-photo > .wrap,
.cws-ti-grev.band-photo > .ti-widget {
  position: relative;
  z-index: 2;
}

/* =============================================================================
   WIDGET SHELL
   Common Trustindex v14 front-end classes (CDN-rendered; confirmed via plugin
   docs / community DOM, NOT yet verified on CWS public HTML):
     .ti-widget.ti-goog
     .ti-widget-container
     .ti-reviews-container / .ti-reviews-container-wrapper
     .ti-review-item > .ti-inner
     .ti-name / .ti-date / .ti-profile-img
     .ti-stars / .ti-star
     .ti-review-content / .ti-review-text
     .ti-header* / .ti-footer* / .ti-controls
   TODO(retarget): once shortcode is live, View Source / DevTools on
     /jupiter/ and /delray-beach/ and replace any mismatched names below.
   ============================================================================= */

/* Flatten Trustindex chrome that fights the soft-card grev look */
.cws-ti-grev .ti-widget,
body.page-id-6 .ti-widget,
body.page-id-5 .ti-widget {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-family: 'Poppins', 'Segoe UI', -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--cws-ti-body, #505A65);
}

/* Soft edge mask — grev-track equivalent (desktop carousel feel) */
.cws-ti-grev .ti-widget .ti-widget-container,
.cws-ti-grev .ti-widget .ti-reviews-container,
.cws-ti-grev .ti-widget .ti-reviews-container-wrapper,
body.page-id-6 .ti-widget .ti-widget-container,
body.page-id-5 .ti-widget .ti-widget-container {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* Lane / row gap ~22px (grev-lane) */
.cws-ti-grev .ti-widget .ti-reviews-container,
.cws-ti-grev .ti-widget .ti-reviews-container-wrapper,
.cws-ti-grev .ti-widget .ti-row,
body.page-id-6 .ti-widget .ti-reviews-container,
body.page-id-5 .ti-widget .ti-reviews-container {
  gap: var(--cws-ti-gap, 22px);
}

/* ---------- SUMMARY / HEADER ROW (Google logo + score) ---------- */
/* TODO(retarget): map exact header nodes (.ti-header, .ti-rating-text, etc.) */
.cws-ti-grev .ti-widget .ti-header,
.cws-ti-grev .ti-widget .ti-header-container,
body.page-id-6 .ti-widget .ti-header,
body.page-id-5 .ti-widget .ti-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 0 16px !important;
}

.cws-ti-grev .ti-widget .ti-rating-text,
.cws-ti-grev .ti-widget .ti-large-logo + *,
.cws-ti-grev .ti-widget [class*="ti-header"] .ti-rating,
body.page-id-6 .ti-widget .ti-rating-text,
body.page-id-5 .ti-widget .ti-rating-text {
  font-weight: 700;
  font-size: 17px;
  color: var(--cws-ti-score, #33383F) !important;
  letter-spacing: -.5px;
}

.cws-ti-grev .ti-widget .ti-header .ti-stars,
.cws-ti-grev .ti-widget .ti-header .ti-star,
body.page-id-6 .ti-widget .ti-header .ti-stars,
body.page-id-5 .ti-widget .ti-header .ti-stars {
  font-size: 16px;
}

/* ---------- CARDS (grev-card geometry) ---------- */
/* Outer item: fixed desktop width; inner .ti-inner carries the soft card chrome.
   Trustindex often puts borders/bg on .ti-inner — override both for safety. */
.cws-ti-grev .ti-widget.ti-goog .ti-widget-container .ti-review-item,
.cws-ti-grev .ti-widget .ti-reviews-container-wrapper .ti-review-item,
body.page-id-6 .ti-widget.ti-goog .ti-widget-container .ti-review-item,
body.page-id-5 .ti-widget.ti-goog .ti-widget-container .ti-review-item {
  width: var(--cws-ti-card-w, 340px) !important;
  max-width: var(--cws-ti-card-w, 340px) !important;
  flex: 0 0 var(--cws-ti-card-w, 340px) !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.cws-ti-grev .ti-widget.ti-goog .ti-widget-container .ti-review-item > .ti-inner,
.cws-ti-grev .ti-widget .ti-reviews-container-wrapper .ti-review-item > .ti-inner,
body.page-id-6 .ti-widget.ti-goog .ti-widget-container .ti-review-item > .ti-inner,
body.page-id-5 .ti-widget.ti-goog .ti-widget-container .ti-review-item > .ti-inner {
  background: var(--cws-ti-card-bg, #fff) !important;
  border-radius: var(--cws-ti-radius, 8px) !important;
  box-shadow: var(--cws-ti-shadow, 0 1px 3px rgba(51, 56, 63, .08)) !important;
  /* defeat dark / heavy Trustindex skins */
  border: 0 !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  border-left-width: 0 !important;
  border-right-width: 0 !important;
  padding: var(--cws-ti-pad-y, 22px) var(--cws-ti-pad-x, 24px) !important;
  display: flex;
  flex-direction: column;
  height: auto !important;
  min-height: 0 !important;
  color: var(--cws-ti-body, #505A65) !important;
}

/* ---------- AVATAR / PROFILE ---------- */
.cws-ti-grev .ti-widget .ti-profile-img,
.cws-ti-grev .ti-widget .ti-review-item .ti-profile-img img,
body.page-id-6 .ti-widget .ti-profile-img,
body.page-id-5 .ti-widget .ti-profile-img {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  flex: 0 0 40px;
  object-fit: cover;
}

/* ---------- NAME / META (grev-name / grev-meta) ---------- */
.cws-ti-grev .ti-widget .ti-widget-container .ti-name,
body.page-id-6 .ti-widget .ti-widget-container .ti-name,
body.page-id-5 .ti-widget .ti-widget-container .ti-name {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--cws-ti-name, #33383F) !important;
  line-height: 1.2 !important;
}

.cws-ti-grev .ti-widget .ti-widget-container .ti-date,
.cws-ti-grev .ti-widget .ti-widget-container .ti-profile-details,
body.page-id-6 .ti-widget .ti-widget-container .ti-date,
body.page-id-5 .ti-widget .ti-widget-container .ti-date {
  font-size: 12px !important;
  color: var(--cws-ti-meta, #8a8f95) !important;
  margin-top: 2px;
  font-weight: 400 !important;
}

/* ---------- STARS (card-level ~15px gold) ---------- */
.cws-ti-grev .ti-widget .ti-review-item .ti-stars,
.cws-ti-grev .ti-widget .ti-review-item .ti-star,
body.page-id-6 .ti-widget .ti-review-item .ti-stars,
body.page-id-5 .ti-widget .ti-review-item .ti-stars {
  font-size: 15px !important;
  display: block;
  margin-bottom: 10px;
}

/* Prefer gold fill when Trustindex uses mask/SVG stars.
   TODO(retarget): confirm .ti-star.f / .h / .e structure on live widget. */
.cws-ti-grev .ti-widget .ti-star.f,
body.page-id-6 .ti-widget .ti-star.f,
body.page-id-5 .ti-widget .ti-star.f {
  background-color: var(--cws-ti-star, #F5B301) !important;
}

/* ---------- BODY TEXT (grev-body) ---------- */
.cws-ti-grev .ti-widget .ti-review-content,
.cws-ti-grev .ti-widget .ti-review-text,
.cws-ti-grev .ti-widget .ti-review-item .ti-inner p,
body.page-id-6 .ti-widget .ti-review-content,
body.page-id-5 .ti-widget .ti-review-content,
body.page-id-6 .ti-widget .ti-review-text,
body.page-id-5 .ti-widget .ti-review-text {
  margin: 0 !important;
  font-size: 14px !important;
  color: var(--cws-ti-body, #505A65) !important;
  line-height: 1.6 !important;
  font-weight: 400 !important;
}

/* ---------- HIDE BRANDING / CLUTTER (safe) ---------- */
/* Powered-by + Trustindex footers fight the soft-card look. Hide when present.
   Keep Google attribution in the header/summary; only strip plugin chrome. */
.cws-ti-grev .ti-widget .ti-footer,
.cws-ti-grev .ti-widget .ti-footer-link,
.cws-ti-grev .ti-widget a[href*="trustindex.io"],
.cws-ti-grev .ti-widget .ti-verified-badge-notice,
.cws-ti-grev .ti-widget .ti-promo,
body.page-id-6 .ti-widget .ti-footer,
body.page-id-5 .ti-widget .ti-footer,
body.page-id-6 .ti-widget a[href*="trustindex.io"]:not([href*="google"]),
body.page-id-5 .ti-widget a[href*="trustindex.io"]:not([href*="google"]) {
  display: none !important;
}

/* Soften / neutralize dark card skins + heavy borders Trustindex may inject */
.cws-ti-grev .ti-widget .ti-review-item > .ti-inner[style],
body.page-id-6 .ti-widget .ti-review-item > .ti-inner,
body.page-id-5 .ti-widget .ti-review-item > .ti-inner {
  background-color: #fff !important;
}

/* ---------- DESKTOP ~1280 intent (explicit ≥769) ---------- */
@media (min-width: 769px) {
  .cws-ti-grev .ti-widget.ti-goog .ti-widget-container .ti-review-item,
  .cws-ti-grev .ti-widget .ti-reviews-container-wrapper .ti-review-item,
  body.page-id-6 .ti-widget.ti-goog .ti-widget-container .ti-review-item,
  body.page-id-5 .ti-widget.ti-goog .ti-widget-container .ti-review-item {
    width: 340px !important;
    max-width: 340px !important;
    flex: 0 0 340px !important;
  }

  .cws-ti-grev .ti-widget.ti-goog .ti-widget-container .ti-review-item > .ti-inner,
  body.page-id-6 .ti-widget.ti-goog .ti-widget-container .ti-review-item > .ti-inner,
  body.page-id-5 .ti-widget.ti-goog .ti-widget-container .ti-review-item > .ti-inner {
    padding: 22px 24px !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(51, 56, 63, .08) !important;
  }
}

/* ---------- MOBILE ~390 intent (FIX 5 parity) ---------- */
@media (max-width: 768px) {
  /* Drop soft edge mask; use native horizontal scroll */
  .cws-ti-grev .ti-widget .ti-widget-container,
  .cws-ti-grev .ti-widget .ti-reviews-container,
  .cws-ti-grev .ti-widget .ti-reviews-container-wrapper,
  body.page-id-6 .ti-widget .ti-widget-container,
  body.page-id-5 .ti-widget .ti-widget-container {
    -webkit-mask-image: none;
    mask-image: none;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .cws-ti-grev .ti-widget.ti-goog .ti-widget-container .ti-review-item,
  .cws-ti-grev .ti-widget .ti-reviews-container-wrapper .ti-review-item,
  body.page-id-6 .ti-widget.ti-goog .ti-widget-container .ti-review-item,
  body.page-id-5 .ti-widget.ti-goog .ti-widget-container .ti-review-item {
    width: 85vw !important;
    max-width: 85vw !important;
    flex: 0 0 85vw !important;
    min-width: 0 !important;
    scroll-snap-align: start;
  }

  /* Disable Trustindex auto-marquee / slider animation if present */
  .cws-ti-grev .ti-widget,
  .cws-ti-grev .ti-widget *,
  body.page-id-6 .ti-widget,
  body.page-id-6 .ti-widget *,
  body.page-id-5 .ti-widget,
  body.page-id-5 .ti-widget * {
    animation: none !important;
    animation-play-state: paused !important;
  }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cws-ti-grev .ti-widget,
  .cws-ti-grev .ti-widget *,
  body.page-id-6 .ti-widget,
  body.page-id-6 .ti-widget *,
  body.page-id-5 .ti-widget,
  body.page-id-5 .ti-widget * {
    animation: none !important;
    transition: none !important;
  }

  .cws-ti-grev .ti-widget .ti-widget-container,
  .cws-ti-grev .ti-widget .ti-reviews-container,
  body.page-id-6 .ti-widget .ti-widget-container,
  body.page-id-5 .ti-widget .ti-widget-container {
    overflow-x: auto;
  }
}

/* =============================================================================
   EVENTUAL HOME (page-id-4) — COMMENTED OUT ON PURPOSE
   Do NOT uncomment / enqueue against Home until cws activates and confirms
   Trustindex replaces (or coexists with) the existing grev-* WP block band.
   Home currently renders grev-card / grev-lane / band-photo live — leave it.
   -----------------------------------------------------------------------------
body.home .cws-ti-grev .ti-widget.ti-goog .ti-widget-container .ti-review-item > .ti-inner,
body.page-id-4 .cws-ti-grev .ti-widget.ti-goog .ti-widget-container .ti-review-item > .ti-inner {
  background: #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(51, 56, 63, .08) !important;
  padding: 22px 24px !important;
}
   ============================================================================= */
/* CWS Home Trustindex live DOM retarget (2026-09-28).
   The shortcode renders inside a Gutenberg shortcode paragraph/pre wrapper;
   scope narrowly to Home page 4 and preserve the existing section heading. */
body.home .cws-home-managed .grev-track {
  display: none !important;
}
body.home .cws-home-managed pre.ti-widget {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 28px 0 34px !important;
  white-space: normal !important;
  overflow: visible !important;
  background: #EDEEF0 !important;
  color: #505A65 !important;
  font: inherit !important;
  line-height: normal !important;
}
body.home .cws-home-managed pre.ti-widget > .ti-widget {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-family: 'Poppins','Segoe UI',-apple-system,Roboto,Helvetica,Arial,sans-serif !important;
}
body.home .cws-home-managed .ti-widget-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  position: relative !important;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent) !important;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent) !important;
}
body.home .cws-home-managed .ti-reviews-container-wrapper {
  display: flex !important;
  gap: 22px !important;
}
body.home .cws-home-managed .ti-review-item {
  width: 340px !important;
  max-width: 340px !important;
  flex: 0 0 340px !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.home .cws-home-managed .ti-review-item > .ti-inner {
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 22px 24px !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(51,56,63,.08) !important;
  color: #505A65 !important;
}
body.home .cws-home-managed .ti-profile-img,
body.home .cws-home-managed .ti-profile-img img {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
body.home .cws-home-managed .ti-name {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: #33383F !important;
}
body.home .cws-home-managed .ti-date,
body.home .cws-home-managed .ti-profile-details {
  font-size: 12px !important;
  color: #8a8f95 !important;
}
body.home .cws-home-managed .ti-stars {
  display: block !important;
  margin-bottom: 10px !important;
}
body.home .cws-home-managed .ti-review-content {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  font-weight: 400 !important;
  color: #505A65 !important;
}
body.home .cws-home-managed .ti-controls-line {
  display: none !important;
}
@media (max-width: 768px) {
  body.home .cws-home-managed pre.ti-widget { padding: 20px 0 26px !important; }
  body.home .cws-home-managed pre.ti-widget > .ti-widget { padding: 0 16px !important; }
  body.home .cws-home-managed .ti-widget-container {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
  }
  body.home .cws-home-managed .ti-reviews-container-wrapper { gap: 16px !important; }
  body.home .cws-home-managed .ti-review-item {
    width: 85vw !important;
    max-width: 85vw !important;
    flex: 0 0 85vw !important;
    scroll-snap-align: start !important;
  }
}
/* Trustindex v14 loader leaves the inner widget hidden until its JS pass;
   keep the live review markup visible when embedded in the Home shortcode block. */
body.home .cws-home-managed pre.ti-widget > .ti-widget {
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}

/* ---------- Nov 12, 2026 (R3, Rich): review card type for readability ----------
   Review body text 16px, reviewer names 18px, desktop and mobile, every page with the widget.
   Undo: delete this block (or restore cws-trustindex-grev-style.css.bak-nov12-r3-PRE). */
html body .ti-widget.ti-goog .ti-review-item .ti-review-content,
html body .ti-widget.ti-goog .ti-review-item .ti-review-content *,
html body .ti-widget.ti-goog .ti-review-item .ti-review-text,
html body .ti-widget.ti-goog .ti-review-item .ti-review-text *,
html body .ti-widget.ti-goog .ti-review-item .ti-inner p,
html body.home .cws-home-managed .ti-review-content,
html body.home .cws-home-managed .ti-review-content * {
  font-size: 16px !important;
  line-height: 1.6 !important;
}
html body .ti-widget.ti-goog .ti-review-item .ti-name,
html body.home .cws-home-managed .ti-name {
  font-size: 18px !important;
  line-height: 1.3 !important;
}
html body .ti-widget.ti-goog .ti-review-item .ti-read-more,
html body .ti-widget.ti-goog .ti-review-item .ti-read-more * {
  font-size: 16px !important;
}
