/* Class Bespoke - "Measure at home" homepage promotion (panel + button).
 * WordPress-ready: enqueue on the front page only. Everything is prefixed .cbm-promo / .cbm-measure-btn and
 * the panel is absolutely/fixed positioned, so it never pushes existing content (no layout shift). */
.cbm-promo {
  --cbmp-gold: #e1b879;
  --cbmp-cream: #fff8ee;
  --cbmp-ink: #1e1e1e;
  position: absolute; z-index: 20;
  right: clamp(24px, 4vw, 64px); top: 50%; transform: translateY(-40%);
  width: min(360px, 32vw);
  box-sizing: border-box;
  padding: 26px 26px 20px;
  background: rgba(24, 18, 14, .78);
  border: 1px solid rgba(225, 184, 121, .55);
  color: var(--cbmp-cream);
  font-family: "Red Hat Text", system-ui, sans-serif;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.cbm-promo.is-visible { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.cbm-promo__eyebrow { margin: 0 0 8px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--cbmp-gold); }
.cbm-promo__title { margin: 0 0 10px; font-family: "Red Rose", "Red Hat Text", sans-serif; font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; color: #fff; }
.cbm-promo__text { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: #f2e6d4; }
.cbm-promo__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.cbm-promo__start { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 22px; background: var(--cbmp-gold); color: var(--cbmp-ink) !important;
  font: 600 14px/1 "Red Hat Text", sans-serif; letter-spacing: .1em; text-transform: uppercase; text-decoration: none !important; border: 1px solid var(--cbmp-gold); }
.cbm-promo__start:hover, .cbm-promo__start:focus-visible { background: #fff; border-color: #fff; }
.cbm-promo__later { background: none; border: 0; padding: 8px 2px; color: #f2e6d4; font: 600 13px "Red Hat Text", sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.cbm-promo__close { position: absolute; top: 6px; right: 8px; width: 34px; height: 34px; background: none; border: 0; color: #f2e6d4; font-size: 22px; line-height: 1; cursor: pointer; }
.cbm-promo :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Compact card (phones, or whenever the hero has no free space on the right): fixed above the chat / privacy
   widgets, so it never overlaps the hero copy and never shifts layout. The script adds .cbm-promo--compact. */
.cbm-promo.cbm-promo--compact {
  position: fixed; top: auto; transform: none;
  left: 12px; right: 72px; bottom: 84px; width: auto; max-width: 520px;   /* right column kept clear for the chat / back-to-top buttons */
  padding: 16px 44px 14px 16px;
  background: rgba(24, 18, 14, .94);
}
.cbm-promo--compact .cbm-promo__eyebrow { display: none; }
.cbm-promo--compact .cbm-promo__title { font-size: 17px; margin-bottom: 6px; }
.cbm-promo--compact .cbm-promo__text { font-size: 14px; line-height: 1.45; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cbm-promo--compact .cbm-promo__start { min-height: 42px; padding: 10px 16px; font-size: 13px; white-space: nowrap; }
.cbm-promo--compact .cbm-promo__later { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .cbm-promo, .cbm-promo.is-visible { transition: none; } }

/* Permanent "Measure at home" button: reuses the theme's Beaver Builder button classes; only spacing is added here. */
/* "Measure at Home": the site's own gold button (same gradient, white text and brown hover as the header's
   "OUR BRANCHES" button), centred under the Sukhumvit / Thonglor pair. The row's width is set to the pair's
   combined width by cbm-promo.js, so the button sits at the exact midpoint whatever the screen size.
   The branch buttons themselves are not restyled. */
.cbm-measure-group { display: flex; justify-content: center; max-width: 100%; margin-top: 16px; }
.cbm-measure-group .cbm-measure-row { margin: 0 !important; float: none !important; width: auto !important; flex: 0 0 auto; }
.cbm-measure-group a.cbm-measure-btn,
.cbm-measure-group a.cbm-measure-btn:visited {
  background: var(--button-gradient, linear-gradient(270deg, #482A1B 0%, #543522 3%, #8A6542 16%, #B18759 27%, #C99D67 35%, #D2A56D 41%, #C19663 50%, #956F49 69%, #50311F 95%, #492B1B 97%)) !important;
  background-color: #b18759 !important;
  border: 1px solid transparent !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(30, 18, 10, .45);
  transition: background .3s ease-in-out, box-shadow .2s ease;
}
.cbm-measure-group a.cbm-measure-btn *,
.cbm-measure-group a.cbm-measure-btn:visited * { color: #fff !important; }
.cbm-measure-group a.cbm-measure-btn:hover,
.cbm-measure-group a.cbm-measure-btn:active { background: #482a1b !important; color: #fff !important; }
.cbm-measure-group a.cbm-measure-btn:focus-visible { outline: 2px solid #fff !important; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(72, 42, 27, .65); }
.cbm-measure-btn .cbm-measure-btn__icon { display: inline-block; width: 18px; height: 18px; margin-left: 10px; vertical-align: -3px; }
