/* The listing page header (owner handoff "Listing Header Card", 2026-12-02, docs section DQ; it replaces the old title block with the logo beside the name and the Email / Website
   pills). Loaded by the listing page alone, after web.css. Above the two columns, the container's full width: a logo tile on the left (320 x 184, 16px corners) and a rounded
   details card on the right - the name with the status circles, the address and service-area rows, three contact buttons, then a divider and the category pills. Phone and tablet
   (under 992px): one column - the logo tile (full width x 140 on a phone, 320 x 184 left-aligned on a tablet), then the card. Tokens wherever the design system has one; the
   one value it has none for (the card's shadow) is the handoff's own; every colour is one the site already had (owner 2026-12-02: "don't change the color"). */

.listing-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5, 24px);
  margin: 0 0 var(--space-5, 24px);
}
.listing-header__logo {
  flex: none;
  width: 320px;
  height: 184px;
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
}
.listing-header__logo img,
.listing-header__logo .cat-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.listing-header__card {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 16px);
  padding: var(--space-5, 24px);
  background: var(--surface);
  border: 1px solid var(--info-border, #d3e2ec);
  border-radius: var(--radius-xl, 16px);
  box-shadow: 0 2px 8px rgba(68, 85, 91, 0.12);
  color: var(--ink);
}

/* Row 1: the name and the status circles (the .listing-status-icons component, unchanged). */
.listing-header .listing-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4, 16px);
  margin: 0;
}
.listing-header .listing-title-row h1 {
  margin: 0;
  font-size: 28px;
  line-height: 34px;
  font-weight: 400;
  color: var(--ink);
}
.listing-header .listing-status-icons {
  flex: none;
  position: static;
}

/* Row 2: the address line only - the same icon + text row it always was (a 20px icon column, 8px, 14px / 20px text), written here because web.css scopes it to the old title block. The
   service area moved to the lower box (Row 4). */
.listing-header__address > p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}
.listing-header__address > p + p {
  margin-top: var(--space-1, 4px);
}
.listing-header .company_address__row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: var(--space-2, 8px);
  align-items: start;
  line-height: 20px;
}
.listing-header .company_address__row .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
}
.listing-header .company_address__text {
  min-width: 0;
}

/* Row 3: the contact buttons - equal width, one row, 8px apart. */
.listing-contact-buttons {
  display: flex;
  gap: var(--space-2, 8px);
}
.listing-contact-btn {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2, 8px);
  height: 40px;
  padding: 0 var(--space-4, 16px);
  border: 1px solid var(--button-outline-border);
  border-radius: var(--radius-pill, 999px);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.listing-contact-btn .ph {
  flex: none;
  font-size: 18px;
  line-height: 1;
}
a.listing-contact-btn:hover {
  background: var(--button-outline-hover, #eef3f7);
  color: var(--brand-blue, #3270a2);
  text-decoration: none;
}
a.listing-contact-btn:focus-visible {
  outline: 2px solid var(--brand-blue, #3270a2);
  outline-offset: 2px;
}
.listing-contact-btn--static {
  color: var(--ink-muted);
  border-color: var(--border, #dedede);
}

/* Row 4: the lower box - a divider, then "Categories:" with the category links on the same line and "Other locations:" with the service-area links under it (owner handoff "Listing Header Card"
   v2, 2026-12-02): 14px / 22px, 6px between the two lines, the label the same size and weight as the line, links in the site's link colour with no underline (hover: the brand red). */
.listing-header__lower {
  padding-top: var(--space-4, 16px);
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 22px;
}
.listing-header__line {
  margin: 0;
}
.listing-header__line + .listing-header__line {
  margin-top: 6px;
}
.listing-header__lower a {
  color: var(--brand-blue, #3270a2);
  text-decoration: none;
}
.listing-header__lower a:hover {
  color: var(--brand-red, #d4213d);
  text-decoration: none;
}
.listing-header__lower a:focus-visible {
  outline: 2px solid var(--brand-blue, #3270a2);
  outline-offset: 2px;
}

/* Tablet: the phone order, the logo tile at its desktop size and left-aligned. */
@media (max-width: 991.98px) {
  .listing-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3, 12px);
    margin-bottom: var(--space-3, 12px);
  }
  .listing-header__logo {
    align-self: flex-start;
  }
}
/* Phone: the logo tile the full width, 140px high, 12px corners; the card tighter; the buttons three equal columns, 44px. */
@media (max-width: 575.98px) {
  .listing-header__logo {
    align-self: stretch;
    width: 100%;
    height: 140px;
    border-radius: var(--radius-lg, 12px);
  }
  .listing-header__card {
    padding: var(--space-4, 16px);
  }
  .listing-header .listing-title-row h1 {
    font-size: 22px;
    line-height: 28px;
  }
  /* three equal columns at 390px: the icon above the label, so no label wraps or is cut */
  .listing-contact-btn {
    flex-direction: column;
    height: 44px;
    padding: 0 var(--space-1, 4px);
    gap: 2px;
    font-size: 12px;
    line-height: 16px;
  }
}
