/* Boffo layer on the IDX results page. Loaded by the IDX wrapper page only.
   Colors: navy #0d2436, gold #98783a, cream #fff9ed. Scoped to .boffo-ridx so other IDX pages are untouched. */

.boffo-ridx {
  --boffo-navy: #0d2436;
  --boffo-gold: #98783a;
  --boffo-cream: #fff9ed;
  --boffo-line: #dfe3e8;
  --boffo-head-h: 88px;
  --boffo-bar-h: 70px;
}

.boffo-hidden { display: none !important; }

/* ---- wider page: use the screen, keep the footer and header as they are */
main.boffo-idx-wrapper.boffo-ridx {
  max-width: 1760px;
  padding: 0 24px 40px;
}
.boffo-ridx #IDX-main { max-width: none; padding: 0; height: auto !important; min-height: 0 !important; }
.boffo-ridx #IDX-main .idx-results { padding: 0; height: auto !important; max-height: none !important; min-height: 0 !important; }

/* ---- filter bar */
.boffo-fbwrap {
  position: sticky;
  top: var(--boffo-head-h);
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--boffo-line);
  margin: 0 -24px;
  padding: 10px 24px 8px;
  font-family: Ubuntu, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--boffo-navy);
}
.boffo-fb { margin: 0; }
.boffo-fb__row {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(2, minmax(110px, 1fr)) repeat(2, minmax(80px, 0.6fr)) minmax(130px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}
.boffo-fb__field { display: flex; flex-direction: column; gap: 3px; margin: 0; min-width: 0; }
.boffo-fb__label,
.boffo-fb__sort span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #5b6673; font-weight: 500; }
.boffo-fb select {
  width: 100%;
  height: 42px;
  padding: 0 30px 0 12px;
  font: 500 14px/1 Ubuntu, system-ui, sans-serif;
  color: var(--boffo-navy);
  background-color: #fff;
  border: 1px solid #c4cbd3;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #5b6673 50%), linear-gradient(135deg, #5b6673 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.boffo-fb select:focus-visible,
.boffo-fb button:focus-visible,
.boffo-narrow__chip:focus-visible,
.boffo-cta__btn:focus-visible,
.boffo-pill__btn:focus-visible,
.boffo-mbar button:focus-visible { outline: 3px solid var(--boffo-gold); outline-offset: 2px; }
.boffo-fb__go,
.boffo-fb__save {
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  font: 600 13px/1 Ubuntu, system-ui, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.boffo-fb__go { background: var(--boffo-navy); color: #fff; border: 1px solid var(--boffo-navy); }
.boffo-fb.is-dirty .boffo-fb__go { background: var(--boffo-gold); border-color: var(--boffo-gold); }
.boffo-fb__save { background: #fff; color: var(--boffo-gold); border: 1.5px solid var(--boffo-gold); }
.boffo-fb__save:hover { background: var(--boffo-cream); }
.boffo-fb__toggles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.boffo-fb__toggle {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #c4cbd3;
  background: #fff;
  color: var(--boffo-navy);
  font: 500 13px/1 Ubuntu, system-ui, sans-serif;
  cursor: pointer;
}
.boffo-fb__toggle[aria-pressed="true"] { background: var(--boffo-navy); border-color: var(--boffo-navy); color: #fff; }
.boffo-fb__sort { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.boffo-fb__sort select { height: 34px; width: auto; min-width: 150px; background-position: calc(100% - 17px) 14px, calc(100% - 12px) 14px; }
.boffo-fb__summary { display: none; }

.boffo-fbstatus { min-height: 0; }
.boffo-chip,
.boffo-remember { margin: 8px 0 0; font-size: 13px; color: #3c4a58; }
.boffo-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px 4px 12px;
  background: var(--boffo-cream);
  border: 1px solid #e5d6ae;
  border-radius: 999px;
}
.boffo-chip__clear,
.boffo-remember__btn {
  background: none;
  border: 0;
  padding: 2px 6px;
  color: var(--boffo-gold);
  font: 600 13px/1.2 Ubuntu, system-ui, sans-serif;
  text-decoration: underline;
  cursor: pointer;
}

/* ---- results area: map and list */
.boffo-ridx .IDX-topAction,
.boffo-ridx .IDX-top-action__group--no-refinement,
.boffo-ridx #idx-results-refinement,
.boffo-ridx .idx-results-refinement__overlay,
.boffo-ridx #idx-results-mobile-control { display: none !important; }

.boffo-ridx .idx-results__header {
  padding: 14px 4px 6px;
  border: 0;
  font-family: Ubuntu, system-ui, sans-serif;
}
.boffo-ridx .idx-results-total__heading {
  margin: 0;
  font: 500 20px/1.2 Ubuntu, system-ui, sans-serif !important;
  color: var(--boffo-navy);
  text-transform: none;
}

.boffo-narrow {
  margin: 8px 0 4px;
  padding: 12px 14px;
  background: var(--boffo-cream);
  border: 1px solid #e5d6ae;
  border-radius: 10px;
  font-family: Ubuntu, system-ui, sans-serif;
  color: var(--boffo-navy);
}
.boffo-narrow__lead { margin: 0 0 8px; font-size: 14px; font-weight: 500; }
.boffo-narrow__chips { display: flex; flex-wrap: wrap; gap: 8px; }
#IDX-main .boffo-narrow__chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--boffo-gold);
  background: #fff;
  color: var(--boffo-navy);
  font: 500 13px/1 Ubuntu, system-ui, sans-serif;
  cursor: pointer;
}
#IDX-main .boffo-narrow__chip:hover { background: var(--boffo-gold); color: #fff; }

.boffo-strip {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #f4f6f8;
  border-radius: 8px;
  font: 400 14px/1.4 Ubuntu, system-ui, sans-serif;
  color: var(--boffo-navy);
}
#IDX-main .boffo-strip a { color: var(--boffo-gold); font-weight: 600; }

@media (min-width: 1024px) {
  /* fixed-height results panel: map on the left, listings scroll on the right.
     --boffo-panel-h is measured in JS (viewport minus header, filter bar and results header); the calc is the fallback. */
  .boffo-ridx #idx-results-content {
    display: grid;
    grid-template-columns: minmax(380px, 45%) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    padding: 4px 0 0;
    height: var(--boffo-panel-h, calc(100vh - var(--boffo-head-h) - var(--boffo-bar-h) - 60px)) !important;
    min-height: 460px !important;
    max-height: none !important;
    overflow: hidden !important;
    flex: none !important;
  }
  .boffo-ridx #IDX-map {
    position: relative !important;
    top: auto !important;
    align-self: stretch;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--boffo-line);
  }
  .boffo-ridx .idx-results__listings {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    height: 100% !important;
    max-height: 100% !important;
    padding: 0 10px 0 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: #c9bd9a transparent;
  }
  .boffo-ridx #idx-results-category-active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .boffo-ridx #idx-results-category-active .idx-results__listing { width: auto !important; margin: 0; }
  /* calls to action and trust strip live at the end of the listings column */
  .boffo-ridx .idx-results__listings .boffo-cta { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 28px 0 14px; }
  .boffo-ridx .idx-results__listings .boffo-cta__card { white-space: normal; padding: 22px; }
  .boffo-ridx .idx-results__listings .boffo-trust { margin: 0 0 18px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .boffo-ridx #idx-results-category-active { grid-template-columns: minmax(0, 1fr); }
}

/* ---- calls to action (outside the listing grid) and trust strip */
.boffo-cta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 48px 0 20px;
  font-family: Ubuntu, system-ui, sans-serif;
}
.boffo-cta__card {
  padding: 28px;
  border-radius: 14px;
  background: var(--boffo-cream);
  border: 1px solid #e5d6ae;
  color: var(--boffo-navy);
}
.boffo-cta__card--navy { background: var(--boffo-navy); border-color: var(--boffo-navy); color: #fff; }
.boffo-ridx .boffo-cta__title { margin: 0 0 8px; font: 600 24px/1.25 Ubuntu, system-ui, sans-serif; text-transform: none !important; letter-spacing: 0; color: inherit; }
.boffo-cta__card p { margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
.boffo-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 !important; }
.boffo-cta__btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font: 600 13px/1 Ubuntu, system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.boffo-cta__btn--gold { background: var(--boffo-gold); color: #fff; border: 1.5px solid var(--boffo-gold); }
.boffo-cta__btn--line { background: transparent; color: var(--boffo-navy); border: 1.5px solid var(--boffo-navy); }
.boffo-cta__btn:hover { opacity: 0.9; }

.boffo-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: center;
  margin: 0 0 28px;
  padding: 16px;
  list-style: none;
  background: var(--boffo-navy);
  border-radius: 12px;
  color: #fff;
  font: 400 14px/1.4 Ubuntu, system-ui, sans-serif;
}
.boffo-ridx .boffo-trust a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---- save search: floating pill (desktop) and bottom bar (mobile) */
.boffo-pill {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 8px 20px;
  border-radius: 999px;
  background: var(--boffo-navy);
  color: #fff;
  box-shadow: 0 10px 28px rgba(13, 36, 54, 0.35);
  font-family: Ubuntu, system-ui, sans-serif;
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.boffo-pill.is-visible { display: flex; opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.boffo-pill__btn {
  background: none;
  border: 0;
  color: #fff;
  font: 600 14px/1.2 Ubuntu, system-ui, sans-serif;
  cursor: pointer;
  padding: 6px 0;
}
.boffo-pill__call {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--boffo-gold);
  color: #fff;
  font: 600 13px/1 Ubuntu, system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.boffo-mbar { display: none; }

/* ---- phones and small tablets: list first, map on demand */
@media (max-width: 1023px) {
  main.boffo-idx-wrapper.boffo-ridx { padding: 0 14px 84px; }
  .boffo-fbwrap { margin: 0 -14px; padding: 8px 14px 6px; }
  .boffo-fb__summary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #c4cbd3;
    border-radius: 10px;
    font: 500 14px/1.2 Ubuntu, system-ui, sans-serif;
    color: var(--boffo-navy);
    text-align: left;
    cursor: pointer;
  }
  .boffo-fb__summary-edit { color: var(--boffo-gold); font-weight: 600; white-space: nowrap; }
  .boffo-fb__row { display: none; grid-template-columns: 1fr 1fr 1fr; margin-top: 10px; }
  .boffo-fb.is-open .boffo-fb__row { display: grid; }
  .boffo-fb__field--a { grid-column: 1 / -1; }
  .boffo-fb__field--lp,
  .boffo-fb__field--hp { grid-column: span 1; }
  .boffo-fb__field--ty { grid-column: span 1; }
  .boffo-fb__go { grid-column: 1 / -1; }
  .boffo-fb__save { display: none; }
  .boffo-fb__toggles { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .boffo-fb__toggle { flex: 0 0 auto; }
  .boffo-fb__sort { margin-left: 0; flex: 0 0 auto; }
  .boffo-fb:not(.is-open) .boffo-fb__sort { display: none; }

  .boffo-ridx #idx-results-content { display: block; }
  .boffo-ridx #IDX-map {
    width: 100% !important;
    height: 56vh !important;
    min-height: 320px;
    border-radius: 10px;
    margin: 0 0 12px;
  }
  .boffo-ridx .idx-results__listings { width: 100% !important; max-width: none !important; }
  .boffo-ridx #idx-results-category-active { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  @media (min-width: 700px) {
    .boffo-ridx #idx-results-category-active { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  .boffo-ridx #idx-results-category-active .idx-results__listing { width: 100% !important; margin: 0; }
  .boffo-ridx .idx-results__map-toggle { display: none !important; }
  .boffo-cta { grid-template-columns: minmax(0, 1fr); }
  .boffo-pill { display: none !important; }
  .boffo-mbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--boffo-line);
    box-shadow: 0 -6px 18px rgba(13, 36, 54, 0.12);
    font-family: Ubuntu, system-ui, sans-serif;
  }
  .boffo-mbar > * {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border-radius: 999px;
    font: 600 14px/1 Ubuntu, system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
  }
  .boffo-mbar__save { background: var(--boffo-gold); color: #fff; border: 0; }
  .boffo-mbar__map { background: #fff; color: var(--boffo-navy); border: 1.5px solid var(--boffo-navy); }
  .boffo-mbar__call { background: var(--boffo-navy); color: #fff; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .boffo-pill { transition: none; }
}

/* ---- consent banner hint shown when "message a Boffo agent" needs chat to be allowed */
.boffo-chat-hint {
  margin: 8px 0 10px;
  padding: 8px 12px;
  border-left: 3px solid #98783a;
  background: #fff9ed;
  color: #0d2436;
  font: 500 14px/1.4 Ubuntu, system-ui, sans-serif;
}
.boffo-chat-hint[hidden] { display: none; }

/* BEGIN boffo-narrow-nobg (William, 7:15 PM ET: "remove background". Box sits on the page; pills, text and colors unchanged.) */
.boffo-narrow {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 8px 0;
	margin: 12px 0 8px;
}
/* END boffo-narrow-nobg */

/* BEGIN boffo-cream-removal (William, 7:19 PM ET: remove the cream and tan look from the filter chips, the results CTA card and the Save hover) */
.boffo-chip {
	background: #fff;
	border: 1px solid #e5e7eb;
}
.boffo-cta__card:not(.boffo-cta__card--navy) {
	background: #fff;
	border: 1px solid #e5e7eb;
}
.boffo-fb__save:hover {
	background: #f3f4f6;
}
/* END boffo-cream-removal */

/* BEGIN boffo-savebar-share (William, 7:17 PM ET: center the save-search bar and put share buttons above it) */
.boffo-savestack {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(580px, calc(100vw - 48px));
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  font-family: Ubuntu, system-ui, sans-serif;
}
.boffo-savestack.is-visible {
  display: flex;
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.boffo-savestack .boffo-pill {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  display: flex;
  max-width: 100%;
}
.boffo-share {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 8px 5px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 23px;
  box-shadow: 0 8px 20px rgba(13, 36, 54, 0.12);
}
.boffo-share__label {
  margin: 0 8px 0 2px;
  color: #0d2436;
  font: 600 12px/1 Ubuntu, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.boffo-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0d2436;
  text-decoration: none;
  cursor: pointer;
}
.boffo-share__btn:hover {
  background: #f3f4f6;
}
.boffo-share__btn:focus-visible {
  outline: 3px solid var(--boffo-gold, #98783a);
  outline-offset: 2px;
  background: #f3f4f6;
}
.boffo-share__btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}
.boffo-share__status {
  margin: 0 6px 0 4px;
  color: #0d2436;
  font: 600 12px/1 Ubuntu, system-ui, sans-serif;
  white-space: nowrap;
}
.boffo-share__status:empty {
  display: none;
}
@media (max-width: 1023px) {
  main.boffo-idx-wrapper.boffo-ridx { padding-bottom: 160px; }
  .boffo-savestack,
  .boffo-savestack.is-visible {
    display: flex !important;
    left: 12px;
    right: 80px;
    width: auto;
    max-width: none;
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    transform: none;
    opacity: 1;
    pointer-events: auto;
    align-items: stretch;
  }
  .boffo-savestack .boffo-pill { display: none !important; }
  .boffo-share { justify-content: center; width: 100%; box-sizing: border-box; }
  .boffo-share__btn { width: 32px; height: 32px; }
  .boffo-mbar {
    left: 12px;
    right: 80px;
  }
}
@media (max-width: 420px) {
  .boffo-share__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .boffo-savestack { transition: none; }
}
/* END boffo-savebar-share */

/* BEGIN boffo-cream-sweep (William, 7:24 PM ET: no cream box with a tan or gold border, sitewide. Backgrounds and box borders only.) */
.boffo-chat-hint {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}
/* END boffo-cream-sweep */

/* BEGIN boffo-share-bar-red (William, 8:06 PM ET: SHARE in red; bottom bar white, uppercase, red call button. Red #b91c1c: 6.47:1 with white.) */
.boffo-share__label {
	color: #b91c1c;
}
/* Room for the uppercase text on one line on desktop (the 1023px rule below the old block still applies on smaller screens). */
@media (min-width: 1024px) {
	.boffo-savestack {
		max-width: min(760px, calc(100vw - 48px));
	}
}
.boffo-pill,
.boffo-savestack .boffo-pill {
	background: #fff;
	color: #0d2436;
	border: 1px solid #e5e7eb;
	box-shadow: 0 8px 20px rgba(13, 36, 54, 0.16);
	text-transform: uppercase;
}
.boffo-pill .boffo-pill__btn {
	color: #0d2436;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
a.boffo-pill__call.boffo-pill__call {
	background: #b91c1c;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
a.boffo-pill__call.boffo-pill__call:hover,
a.boffo-pill__call.boffo-pill__call:focus-visible {
	background: #991b1b;
	color: #fff;
}
.boffo-mbar > * {
	text-transform: uppercase;
	letter-spacing: 0;
	white-space: nowrap;
	padding-left: 6px;
	padding-right: 6px;
}
@media (max-width: 379px) {
	.boffo-mbar > * {
		font-size: 13px;
	}
}
a.boffo-mbar__call.boffo-mbar__call {
	background: #b91c1c;
	color: #fff;
}
a.boffo-mbar__call.boffo-mbar__call:hover,
a.boffo-mbar__call.boffo-mbar__call:focus-visible {
	background: #991b1b;
	color: #fff;
}
/* END boffo-share-bar-red */
