/* Businesses-for-sale search --------------------------------------------- */

.biz-search {
  --biz-ink: #1c2733;
  --biz-muted: #5b6b7c;
  --biz-line: #dde3e9;
  --biz-accent: #0b6ec6;
  --biz-accent-soft: #eaf3fb;
  --biz-bg: #fff;
  --biz-radius: 8px;

  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  color: var(--biz-ink);
  max-width: 1180px;
  margin: 0 auto;
}

.biz-search *,
.biz-search *::before,
.biz-search *::after { box-sizing: border-box; }

/* Several elements below set an explicit display, which would otherwise win
   over the user-agent rule for [hidden]. */
.biz-search [hidden] { display: none !important; }

/* Search bar -------------------------------------------------------------- */

.bizs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  padding: 12px;
  background: var(--biz-bg);
  border: 1px solid var(--biz-line);
  border-radius: var(--biz-radius);
}

.bizs-box { position: relative; display: flex; align-items: center; min-width: 0; }
.bizs-box--location { flex: 1 1 260px; }
.bizs-box--industry { flex: 1 1 280px; }

.bizs-box input {
  width: 100%;
  padding: 11px 34px 11px 12px;
  font-size: 15px;
  border: 1px solid var(--biz-line);
  border-radius: var(--biz-radius);
  background: var(--biz-bg);
  color: var(--biz-ink);
}

.bizs-box--location input { padding-left: 36px; }

.bizs-box input:focus {
  outline: none;
  border-color: var(--biz-accent);
  box-shadow: 0 0 0 3px rgba(11, 110, 198, .15);
}

.bizs-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: var(--biz-muted);
  pointer-events: none;
}

.bizs-clear-one {
  position: absolute;
  right: 8px;
  width: 22px;
  height: 22px;
  font-size: 18px;
  line-height: 1;
  color: var(--biz-muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.bizs-suggest {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--biz-bg);
  border: 1px solid var(--biz-line);
  border-radius: var(--biz-radius);
  box-shadow: 0 12px 28px rgba(28, 39, 51, .16);
  max-height: 320px;
  overflow-y: auto;
}

.bizs-suggest li { padding: 9px 12px; font-size: 14px; cursor: pointer; }
.bizs-suggest li:hover,
.bizs-suggest li.is-active { background: var(--biz-accent-soft); }

/* Industry panel ---------------------------------------------------------- */

.bizs-panel {
  position: absolute;
  z-index: 45;
  top: calc(100% + 4px);
  left: 0;
  width: min(92vw, 360px);
  background: var(--biz-bg);
  border: 1px solid var(--biz-line);
  border-radius: var(--biz-radius);
  box-shadow: 0 12px 32px rgba(28, 39, 51, .2);
}

.bizi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 6px;
}

.bizi-title { margin: 0; font-size: 16px; font-weight: 700; }

.bizi-close {
  width: 26px;
  height: 26px;
  font-size: 20px;
  line-height: 1;
  color: var(--biz-muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.bizi-list {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
}

.bizi-list li {
  padding: 9px 14px;
  font-size: 15px;
  color: var(--biz-accent);
  cursor: pointer;
}

.bizi-list li:hover { background: var(--biz-accent-soft); }
.bizi-list li.is-selected { font-weight: 700; }

.bizi-all {
  display: block;
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  text-align: left;
  color: var(--biz-accent);
  background: none;
  border: 0;
  border-top: 1px solid var(--biz-line);
  cursor: pointer;
}

.bizi-all:hover { background: var(--biz-accent-soft); }

/* Price / More Filters dropdowns ------------------------------------------ */

.bizf-drop { position: relative; }

.bizf-drop > summary {
  display: flex;
  align-items: center;
  height: 100%;
  list-style: none;
  cursor: pointer;
  padding: 11px 32px 11px 14px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--biz-line);
  border-radius: var(--biz-radius);
  background: var(--biz-bg);
  user-select: none;
  white-space: nowrap;
}

.bizf-drop > summary::-webkit-details-marker { display: none; }

.bizf-drop > summary::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 2px solid #c0392b;
  border-bottom: 2px solid #c0392b;
  transform: rotate(45deg);
}

.bizf-drop[open] > summary { border-color: var(--biz-accent); }
.bizf-drop[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.bizf-drop > summary.is-set { border-color: var(--biz-accent); color: var(--biz-accent); }

.bizf-count {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: var(--biz-accent);
  border-radius: 9px;
}

.bizf-panel {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  background: var(--biz-bg);
  border: 1px solid var(--biz-line);
  border-radius: var(--biz-radius);
  box-shadow: 0 12px 32px rgba(28, 39, 51, .2);
}

/* Price panel */

/* Both triggers sit at the right end of the bar, so their panels hang from
   the right edge — anchoring left would push them off screen. */
.bizf-panel--price { width: 320px; left: auto; right: 0; }

.bizp-cols { display: grid; grid-template-columns: 1fr 1fr; }

.bizp-col {
  margin: 0;
  padding: 10px 0;
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
}

.bizp-col + .bizp-col { border-left: 1px solid var(--biz-line); }

.bizp-col li {
  padding: 7px 16px;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}

.bizp-col li:hover { background: var(--biz-accent-soft); }
.bizp-col li.is-selected { color: var(--biz-accent); font-weight: 600; }

/* More Filters panel */

.bizf-panel--more { width: min(94vw, 720px); left: auto; right: 0; padding: 22px 24px 0; }

.bizf-panel--more > .bizi-close { position: absolute; top: 10px; right: 12px; }

.bizm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 36px; }

.bizm-col { min-width: 0; }

.bizm-field { display: block; margin: 0 0 18px; border: 0; padding: 0; }

.bizm-field > span,
.bizm-field > legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--biz-ink);
}

.bizm-field input[type=text],
.bizm-field select {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid var(--biz-line);
  border-radius: 4px;
  background: var(--biz-bg);
  color: var(--biz-ink);
}

.bizm-field input[type=text]:focus,
.bizm-field select:focus {
  outline: none;
  border-color: var(--biz-accent);
  box-shadow: 0 0 0 3px rgba(11, 110, 198, .15);
}

.bizm-range { display: flex; align-items: center; gap: 10px; }
.bizm-range span { font-size: 14px; color: var(--biz-muted); }

.bizm-check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 15px;
  cursor: pointer;
}

.bizm-check input { width: 17px; height: 17px; }

/* Panel footers */

.bizf-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 14px;
  border-top: 1px solid var(--biz-line);
}

.bizf-actions--more {
  justify-content: flex-end;
  margin: 8px -24px 0;
  padding: 14px 24px;
  background: #fafbfc;
}

.bizf-apply,
.bizf-cancel {
  min-width: 108px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
}

.bizf-apply {
  color: #fff;
  background: #c0392b;
  border: 1px solid #c0392b;
}

.bizf-cancel {
  color: #c0392b;
  background: var(--biz-bg);
  border: 1px solid #c0392b;
}

.bizf-reset {
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--biz-ink);
  background: var(--biz-bg);
  border: 1px solid var(--biz-line);
  border-radius: var(--biz-radius);
  cursor: pointer;
}

.bizf-reset:hover { border-color: var(--biz-accent); color: var(--biz-accent); }

/* Chips ------------------------------------------------------------------- */

.bizf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.bizf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 13px;
  color: var(--biz-ink);
  background: var(--biz-accent-soft);
  border: 1px solid #cfe3f4;
  border-radius: 40px;
  cursor: pointer;
}

.bizf-chip i { font-style: normal; font-size: 15px; line-height: 1; color: var(--biz-muted); }
.bizf-chip:hover i { color: #b3261e; }

/* Results header ---------------------------------------------------------- */

.bizr-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--biz-line);
}

.bizr-count { margin: 0; font-size: 14px; color: var(--biz-muted); }

.bizr-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.bizr-sort select { padding: 8px 10px; border: 1px solid var(--biz-line); border-radius: 6px; }

.bizr-notice {
  margin: 0 0 14px;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: var(--biz-radius);
}

.bizr-notice--stale { background: #fff6e0; border: 1px solid #f0d79a; color: #6b4e08; }
.bizr-notice--error { background: #fdecea; border: 1px solid #f2c2bd; color: #8a1c12; }

/* Cards ------------------------------------------------------------------- */

.bizr-list { display: grid; gap: 14px; }

.bizc {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding: 14px;
  background: var(--biz-bg);
  border: 1px solid var(--biz-line);
  border-radius: var(--biz-radius);
  transition: box-shadow .15s ease, border-color .15s ease;
}

.bizc:hover { border-color: #bcd3e6; box-shadow: 0 6px 18px rgba(28, 39, 51, .1); }

.bizc-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #eef2f5;
}

.bizc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bizc-media.is-empty::after {
  content: 'No photo';
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 13px;
  color: var(--biz-muted);
}

.bizc-body { min-width: 0; }

.bizc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }

.bizc-badge {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: 3px;
  background: #eef2f5;
  color: var(--biz-muted);
}

.bizc-badge--new { background: #e3f5e8; color: #1c6b34; }
.bizc-badge--reduced { background: #fdecea; color: #a8261a; }
.bizc-badge--re { background: var(--biz-accent-soft); color: #0a5596; }

.bizc-title { margin: 0 0 4px; font-size: 19px; line-height: 1.3; }
.bizc-title a { color: var(--biz-ink); text-decoration: none; }
.bizc-title a:hover { color: var(--biz-accent); text-decoration: underline; }

.bizc-loc { margin: 0 0 10px; font-size: 14px; color: var(--biz-muted); }

.bizc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 0 0 10px;
}

.bizc-stat { min-width: 0; }

.bizc-stats dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--biz-muted);
}

.bizc-stats dd {
  margin: 1px 0 0;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.bizc-summary {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #3d4c5a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.bizc--skeleton {
  min-height: 190px;
  border-style: dashed;
  background: linear-gradient(90deg, #f5f7f9 25%, #eef2f5 37%, #f5f7f9 63%);
  background-size: 400% 100%;
  animation: bizc-shimmer 1.3s ease infinite;
}

@keyframes bizc-shimmer {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

.bizr-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 15px;
  color: var(--biz-muted);
  border: 1px dashed var(--biz-line);
  border-radius: var(--biz-radius);
}

/* Pagination -------------------------------------------------------------- */

.bizr-pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 24px 0 8px;
}

.bizr-pager button[disabled] { opacity: .45; cursor: not-allowed; }
.bizr-pageno { font-size: 14px; color: var(--biz-muted); }

/* Layout for narrow screens ---------------------------------------------- */

@media (max-width: 900px) {
  .bizs-box--location,
  .bizs-box--industry { flex: 1 1 100%; }
  .bizf-drop { flex: 1 1 calc(50% - 4px); }
  .bizf-drop > summary { justify-content: center; }
  .bizf-reset { flex: 1 1 100%; }
  .bizc { grid-template-columns: 1fr; }
  .bizc-media { aspect-ratio: 16 / 9; }
}

@media (max-width: 700px) {
  /* Panels become sheets — they no longer fit beside their trigger. */
  .bizf-panel,
  .bizs-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-height: 82vh;
    overflow-y: auto;
    border-radius: var(--biz-radius) var(--biz-radius) 0 0;
  }

  .bizm-grid { grid-template-columns: 1fr; }
  .bizf-panel--more { padding: 22px 18px 0; }
  .bizf-actions--more { margin: 8px -18px 0; padding: 14px 18px; }
}

/* Single listing ---------------------------------------------------------- */

.biz-detail { max-width: 1000px; margin: 0 auto; }

.biz-detail-loc {
  margin: -6px 0 4px;
  font-size: 16px;
  color: #5b6b7c;
}

.biz-detail-adline {
  margin: 0 0 18px;
  font-size: 15px;
  font-style: italic;
  color: #3d4c5a;
}

.biz-detail .business-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 22px 0;
  padding: 18px;
  background: #f5f8fb;
  border-radius: 8px;
}

.biz-detail .detail-item { display: flex; flex-direction: column; gap: 2px; }

.biz-detail .detail-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #5b6b7c;
}

.biz-detail .detail-value { font-size: 19px; font-weight: 700; color: #1c2733; }

.biz-detail .summary { margin: 0 0 24px; }
.biz-detail .summary h2 { font-size: 20px; margin: 0 0 8px; }
.biz-detail .summary p { line-height: 1.65; }

.biz-detail .image-container img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 8px;
}

.bizf-reset[disabled] { opacity: .45; cursor: default; }
.bizf-reset[disabled]:hover { border-color: var(--biz-line); color: var(--biz-ink); }

/* Detail page: content + contact card -------------------------------------
   Desktop: two columns, the contact card sticky so it never scrolls away.
   Mobile: the card docks to the bottom edge and expands upward on tap. */

.biz-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  align-items: start;
}

.biz-pages .biz-detail { max-width: 1200px; }

/* Neutralise the old float layout from style.css */
.biz-pages .contact-now {
  width: auto;
  float: none;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
}

/* position:sticky dies if any ancestor establishes a scroll container
   (overflow other than visible/clip). Divi puts overflow:hidden on its
   wrappers, so on listing pages force the chain open; overflow-x:clip keeps
   the horizontal-scroll protection Divi wanted without breaking sticky. */
.biz-pages,
.biz-pages #page-container,
.biz-pages #et-boc,
.biz-pages #et-main-area,
.biz-pages #main-content,
.biz-pages #entry-content {
  overflow: visible !important;
}

body.biz-pages { overflow-x: clip !important; }

.biz-detail-aside {
  position: sticky;
  top: 110px; /* clears the fixed site header */
  align-self: start; /* never stretch — a full-height item has no room to stick */
}

.contact-now-body { padding: 22px; }
.contact-now-body h2 { margin: 0 0 14px; font-size: 22px; }

/* The collapse toggle only exists on mobile */
.contact-now-toggle { display: none; }

@media (max-width: 980px) {
  .biz-detail-layout { display: block; }
  .biz-detail-aside { position: static; }

  /* Docked bar, expanding upward from the bottom edge */
  .biz-pages .contact-now {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998; /* under WP admin bar popovers, over page content */
    margin: 0;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 28px rgba(12, 20, 59, .25);
  }

  .contact-now-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    font-family: 'Montserrat', Helvetica, Arial, Lucida, sans-serif;
    font-size: 16px;
    color: #fff;
    background: #000c3b;
    border: 0;
    cursor: pointer;
  }

  .contact-now-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-135deg); /* points up: tapping expands upward */
    transition: transform .25s ease;
    margin-left: 12px;
  }

  .contact-now.is-open .contact-now-chevron {
    transform: rotate(45deg); /* points down: tapping collapses */
  }

  .contact-now-body {
    max-height: 0;
    padding: 0 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: max-height .3s ease, padding .3s ease;
  }

  .contact-now.is-open .contact-now-body {
    /* Tall enough for the whole form; dvh tracks the real visible area on
       phones. Scrolls only if the form outgrows the screen itself. */
    max-height: calc(100vh - 130px);
    max-height: calc(100dvh - 130px);
    padding: 18px 20px 24px;
  }

  /* Keep the docked bar from covering the end of the page content */
  .biz-pages #main-content { padding-bottom: 90px; }
}


/* Breadcrumbs on the listing page ----------------------------------------- */

.biz-crumbs {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--biz-muted);
}

.biz-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.biz-crumbs li { display: flex; align-items: center; gap: 4px; }

.biz-crumbs li + li::before {
  content: '\203A'; /* › */
  color: var(--biz-muted);
}

.biz-crumbs a { color: var(--biz-accent); text-decoration: none; }
.biz-crumbs a:hover { text-decoration: underline; }

.biz-crumbs [aria-current] {
  color: var(--biz-ink);
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mandatory location ------------------------------------------------------- */

.bizs-box--location.is-required input {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .15);
}

/* Floating callout: the bar sits on arbitrary page backgrounds (the footer's
   navy included), so the message brings its own surface instead of relying on
   contrast underneath. */
.bizs-required {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  left: 10px;
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #b3261e;
  background: #fff;
  border: 1px solid #f3c1bd;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(28, 39, 51, .18);
  white-space: nowrap;
}

/* Little arrow pointing up at the input */
.bizs-required::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 18px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-left: 1px solid #f3c1bd;
  border-top: 1px solid #f3c1bd;
  transform: rotate(45deg);
}

/* A nudge, not a scold: brief shake when the requirement trips */
.bizs-box--location.is-required input {
  animation: bizs-shake .3s ease;
}

@keyframes bizs-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
