/* =============================================================
   AskPerTask Vendor Profile Page — apt-profile.css

   Scope:
   • body.hp-template--vendor-view-page  — /vendor/{slug}/

   Loaded only on this route via APT_Profile_Template::enqueue_assets().
   All selectors are scoped to body.hp-template--vendor-view-page to
   prevent bleed to any other HivePress page.

   DOM structure (HivePress Page_Sidebar_Left layout — LOCAL-PRO-PAGE-2C-FIX
   restyles this as a full-width hero + main column stack; the underlying
   DOM/block tree is unchanged, only .hp-row's flex direction and the
   sidebar's own styling are overridden):
     body.hp-template--vendor-view-page
       .hp-vendor.hp-vendor--view-page              ← page wrapper
         .hp-row                                    ← stacked (flex-direction:column)
           aside.hp-page__sidebar                   ← full-width identity HERO surface
             .hp-vendor__summary.hp-widget.widget   ← avatar + name(h1) + meta
             .apt-trust-snapshot.hp-widget.widget   ← Trust Snapshot strip (APT)
             .hp-vendor__actions--primary.hp-widget  ← Action Panel (Call/Message/Request/Website + safety note)
           .hp-page__content                        ← main column (APT sections, below hero)

   PROVIDER-HELPER-3A changes:
   - HP vendor_verified_badge suppressed (not APT verification)
   - Trust Snapshot card: new sidebar widget between hero and action panel
   - Action Panel safety note: below CTAs
   - Main column reordered: services → coverage → about → trust → reviews → safety
   - New sections: apt-trust-snapshot, apt-verify-disclaimer, apt-reviews-section,
     apt-safety-section, apt-action-safety-note, apt-pro-category-chip

   LOCAL-PRO-PAGE-2C-FIX changes:
   - aside.hp-page__sidebar is now the full-width hero surface (was a narrow
     sticky sidebar); vendor_name renders as h1 (see class-apt-profile-template.php)
   - Call/Website moved from a main-column Contact card into the hero's own
     Action Panel — hp-vendor__action--call/--website
   - HP core page_title ("Services by %s") is unset; no longer rendered
   - Main column: only Coverage & Availability + Service details pair up
     side by side — everything else runs full width

   LOCAL-PRO-PAGE-2C-FIX2 changes:
   - Hero is compacted (smaller avatar, tighter gaps/padding); vendor_name is
     larger again for stronger dominance.
   - vendor_actions_primary is now a 2-column button grid that sits BELOW the
     identity block (flex-basis:100%), not a detached fixed-width side column.
   - Service details is gone as a separate card — its content now renders as
     extra rows inside apt-profile-section--coverage.
   - apt-profile-section--helper/--pro no longer exist — replaced by one
     apt-profile-section--services ("Services & expertise").
   - apt-services-empty(--compact) is gone — replaced by a single compact
     apt-services-empty-note line, attached inside apt-profile-section--services.
   ============================================================= */

/* ---- Design tokens ---- */
body.hp-template--vendor-view-page {
  --apt-vp-green:        #1FA34A;
  --apt-vp-green-dark:   #168238;
  --apt-vp-green-light:  #EAF7EE;
  --apt-vp-blue:         #2D6CDF;
  --apt-vp-blue-light:   #EAF1FD;
  --apt-vp-text:         #1A1A1A;
  --apt-vp-muted:        #6B7280;
  --apt-vp-muted-light:  #9CA3AF;
  --apt-vp-border:       #E5E7EB;
  --apt-vp-bg:           #F4F5F7;
  --apt-vp-white:        #FFFFFF;
  --apt-vp-radius:       10px;
  --apt-vp-shadow:       0 2px 12px rgba(16, 24, 40, 0.07);
}

/* ============================================================
   SUPPRESS HP verified badge — reflects HivePress-internal state,
   not APT verification. APT trust signal lives in Trust Snapshot card.
   ============================================================ */

body.hp-template--vendor-view-page .hp-vendor__verified-badge {
  display: none !important;
}

/* ============================================================
   SIDEBAR — role chips (Helper / Professional pills)
   Injected at _order 23 into .hp-vendor__summary
   ============================================================ */

body.hp-template--vendor-view-page .apt-sidebar-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}

body.hp-template--vendor-view-page .apt-sidebar-role-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}

body.hp-template--vendor-view-page .apt-sidebar-role-chip--helper {
  background: var(--apt-vp-blue-light);
  color: var(--apt-vp-blue);
}

body.hp-template--vendor-view-page .apt-sidebar-role-chip--pro {
  background: var(--apt-vp-green-light);
  color: var(--apt-vp-green-dark);
}

/* ============================================================
   SIDEBAR — entity type (neutral public label)
   Injected at _order 24 — LOCAL-PRO-PAGE-2C. Rendered only for a
   valid apt_entity_type value; omitted entirely otherwise.
   ============================================================ */

body.hp-template--vendor-view-page .apt-sidebar-entity-type {
  font-size: 0.75rem;
  color: var(--apt-vp-muted);
  margin: 2px 0 4px;
  line-height: 1.4;
}

/* ============================================================
   SIDEBAR — rating placeholder (no reviews state)
   Injected at _order 25 when hp_rating == 0
   ============================================================ */

body.hp-template--vendor-view-page .apt-rating-placeholder {
  margin: 4px 0;
  line-height: 1.4;
}

body.hp-template--vendor-view-page .apt-rating-placeholder__label {
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  font-style: italic;
}

/* ============================================================
   SIDEBAR — location signal (masked sector only)
   Injected at _order 27
   ============================================================ */

body.hp-template--vendor-view-page .apt-sidebar-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  margin: 4px 0;
  line-height: 1.4;
}

body.hp-template--vendor-view-page .apt-sidebar-location__pin {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apt-vp-muted-light);
  flex-shrink: 0;
}

/* ============================================================
   SIDEBAR — profile headline
   Injected at _order 29
   ============================================================ */

body.hp-template--vendor-view-page .apt-sidebar-headline {
  font-size: 0.875rem;
  color: var(--apt-vp-text);
  line-height: 1.5;
  margin: 3px 0;
  font-style: italic;
}

/* ============================================================
   SIDEBAR — business / trading name
   Injected at _order 30 (professionals only)
   ============================================================ */

body.hp-template--vendor-view-page .apt-sidebar-biz-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  margin: 4px 0;
  line-height: 1.4;
}

body.hp-template--vendor-view-page .apt-sidebar-biz-name i {
  color: var(--apt-vp-muted-light);
  font-size: 0.6875rem;
  flex-shrink: 0;
}

/* ============================================================
   SIDEBAR — Trust Snapshot card
   Separate hp-widget sibling injected at page_sidebar _order 15.
   Between vendor_summary (10) and vendor_actions_primary (30).
   Hidden when no approved verifications exist.
   ============================================================ */

body.hp-template--vendor-view-page .apt-trust-snapshot {
  padding: 16px;
}

body.hp-template--vendor-view-page .apt-trust-snapshot__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--apt-vp-muted);
  margin: 0 0 10px;
  line-height: 1;
}

body.hp-template--vendor-view-page .apt-trust-snapshot__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.hp-template--vendor-view-page .apt-trust-snapshot__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--apt-vp-green-light);
  color: var(--apt-vp-green-dark);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}

body.hp-template--vendor-view-page .apt-trust-snapshot__item i {
  font-size: 0.6875rem;
  flex-shrink: 0;
}

body.hp-template--vendor-view-page .apt-trust-snapshot__item-label {
  /* Always visible — not hidden on narrow screens unlike the old sidebar icons */
  display: inline;
}

/* ============================================================
   SIDEBAR — Action Panel safety note
   Injected at _order 40 inside vendor_actions_primary.blocks.
   Rendered below Send Message (_order 10) and Request (_order 20).
   ============================================================ */

body.hp-template--vendor-view-page .apt-action-safety-note {
  font-size: 0.75rem;
  color: var(--apt-vp-muted);
  line-height: 1.55;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--apt-vp-border);
  text-align: center;
}

/* ============================================================
   MAIN COLUMN — About / description section
   Injected at _order 30 (after services and coverage)
   ============================================================ */

body.hp-template--vendor-view-page .apt-about {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--apt-vp-border);
}

body.hp-template--vendor-view-page .apt-about__heading {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--apt-vp-text);
  margin: 0 0 12px;
  line-height: 1.3;
}

body.hp-template--vendor-view-page .apt-about__body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--apt-vp-text);
}

body.hp-template--vendor-view-page .apt-about__body p {
  margin: 0 0 1em;
}

body.hp-template--vendor-view-page .apt-about__body p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   MAIN COLUMN — Profile data sections
   Helper (_order 10), Professional (_order 12), Coverage (_order 22),
   Verification (_order 35), Reviews (_order 40) — shared base style.
   ============================================================ */

body.hp-template--vendor-view-page .apt-profile-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--apt-vp-border);
}

body.hp-template--vendor-view-page .apt-profile-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

body.hp-template--vendor-view-page .apt-profile-section__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--apt-vp-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
  line-height: 1;
}

/* ============================================================
   MAIN COLUMN — Professional Services category chip
   Shown at top of pro section when HP taxonomy category is resolved.
   ============================================================ */

body.hp-template--vendor-view-page .apt-pro-category-row {
  margin-bottom: 10px;
}

body.hp-template--vendor-view-page .apt-pro-category-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--apt-vp-bg);
  border: 1px solid var(--apt-vp-border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--apt-vp-muted);
  line-height: 1.5;
}

/* ============================================================
   MAIN COLUMN — Profile data rows (label + value pairs)
   Used inside Helper, Professional, and Coverage sections.
   ============================================================ */

body.hp-template--vendor-view-page .apt-profile-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--apt-vp-border);
  align-items: baseline;
}

body.hp-template--vendor-view-page .apt-profile-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

body.hp-template--vendor-view-page .apt-profile-row__label {
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 140px;
  line-height: 1.45;
}

body.hp-template--vendor-view-page .apt-profile-row__value {
  font-size: 0.875rem;
  color: var(--apt-vp-text);
  font-weight: 400;
  line-height: 1.45;
}

/* ============================================================
   MAIN COLUMN — Coverage chips and emergency signal
   ============================================================ */

body.hp-template--vendor-view-page .apt-coverage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

body.hp-template--vendor-view-page .apt-coverage-chip {
  display: inline-block;
  padding: 4px 12px;
  background: var(--apt-vp-bg);
  border: 1px solid var(--apt-vp-border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--apt-vp-text);
  line-height: 1.5;
}

body.hp-template--vendor-view-page .apt-coverage-emergency {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  color: #D97706;
  font-weight: 600;
  margin: 8px 0 0;
  line-height: 1.4;
}

body.hp-template--vendor-view-page .apt-coverage-emergency i {
  font-size: 0.8125rem;
  flex-shrink: 0;
}

/* ============================================================
   MAIN COLUMN — Verified items grid
   ============================================================ */

body.hp-template--vendor-view-page .apt-verify-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

body.hp-template--vendor-view-page .apt-verify-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: var(--apt-vp-green-light);
  border-radius: var(--apt-vp-radius);
}

body.hp-template--vendor-view-page .apt-verify-item__icon {
  color: var(--apt-vp-green);
  font-size: 0.875rem;
  flex-shrink: 0;
}

body.hp-template--vendor-view-page .apt-verify-item__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--apt-vp-green-dark);
  line-height: 1.3;
}

/* ============================================================
   MAIN COLUMN — Verification disclaimer
   Below the verified items grid in apt-trust-details section.
   ============================================================ */

body.hp-template--vendor-view-page .apt-verify-disclaimer {
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  line-height: 1.6;
  margin: 0;
  padding: 12px 14px;
  background: var(--apt-vp-bg);
  border-radius: var(--apt-vp-radius);
  border: 1px solid var(--apt-vp-border);
}

/* ============================================================
   MAIN COLUMN — Safety / Report / Claim (_order 45)
   Low visual weight — always rendered.
   ============================================================ */

body.hp-template--vendor-view-page .apt-safety-section {
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid var(--apt-vp-border);
}

body.hp-template--vendor-view-page .apt-safety-section__reminder {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  line-height: 1.55;
  margin: 0 0 10px;
}

body.hp-template--vendor-view-page .apt-safety-section__reminder i {
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--apt-vp-muted-light);
}

body.hp-template--vendor-view-page .apt-safety-section__links {
  font-size: 0.75rem;
  color: var(--apt-vp-muted-light);
  margin: 0;
  line-height: 1.5;
}

body.hp-template--vendor-view-page .apt-safety-section__stub {
  cursor: default;
  text-decoration: none;
  color: var(--apt-vp-muted-light);
}

/* APT-SAFETY-REPORT-1C: real link variant of the stub above — same quiet
   visual weight, but underlines on interaction so it reads as clickable. */
body.hp-template--vendor-view-page .apt-safety-section__link {
  color: var(--apt-vp-muted-light);
  text-decoration: none;
}

body.hp-template--vendor-view-page .apt-safety-section__link:hover,
body.hp-template--vendor-view-page .apt-safety-section__link:focus {
  text-decoration: underline;
  color: var(--apt-vp-muted);
}

body.hp-template--vendor-view-page .apt-safety-section__sep {
  margin: 0 4px;
  color: var(--apt-vp-border);
}

/* ============================================================
   MAIN COLUMN — Services & expertise sub-headings and empty-services note
   LOCAL-PRO-PAGE-2C-FIX2 — replaces the old apt-services-empty(--compact)
   card + decorative icon entirely.
   ============================================================ */

body.hp-template--vendor-view-page .apt-services-subhead {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--apt-vp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 14px 0 6px;
}

body.hp-template--vendor-view-page .apt-services-subhead:first-child {
  margin-top: 0;
}

body.hp-template--vendor-view-page .apt-services-empty-note {
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  font-style: italic;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--apt-vp-border);
}

body.hp-template--vendor-view-page .apt-profile-section__heading + .apt-services-empty-note {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* ============================================================
   MAIN COLUMN — Helper intro (pure helper, no saved profile meta)
   ============================================================ */

body.hp-template--vendor-view-page .apt-helper-intro {
  padding: 20px;
  background: var(--apt-vp-bg);
  border: 1px solid var(--apt-vp-border);
  border-radius: var(--apt-vp-radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.hp-template--vendor-view-page .apt-helper-intro__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--apt-vp-text);
  margin: 0;
  line-height: 1.3;
}

body.hp-template--vendor-view-page .apt-helper-intro__body {
  font-size: 0.875rem;
  color: var(--apt-vp-muted);
  margin: 0;
  line-height: 1.55;
}

body.hp-template--vendor-view-page .apt-helper-intro__cta-hint {
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  margin: 0;
  line-height: 1.45;
}

/* ============================================================
   MOBILE / RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  /* Profile rows stack vertically on narrow screens */
  body.hp-template--vendor-view-page .apt-profile-row {
    flex-direction: column;
    gap: 3px;
  }

  body.hp-template--vendor-view-page .apt-profile-row__label {
    min-width: 0;
    font-size: 0.75rem;
  }

  /* Verification items: 2-col grid on mobile */
  body.hp-template--vendor-view-page .apt-verify-items {
    grid-template-columns: 1fr 1fr;
  }

  /* Trust Snapshot items wrap freely on mobile */
  body.hp-template--vendor-view-page .apt-trust-snapshot__items {
    gap: 5px;
  }

  /* LOCAL-PRO-PAGE-2C-FIX: sidebar card padding now lives on the hero
     surface itself (.hp-page__sidebar, see the mobile blocks below) —
     vendor_summary is no longer its own padded card. */
}

/* =============================================================
   VISUAL-FIRST VENDOR PROFILE FOUNDATION — SVC-5B

   CSS-only additive layer on top of PROVIDER-HELPER-3A. Restyles the
   real, already-rendered DOM (verified live against /vendor/dz/) into
   a premium identity card + card-based main-column dashboard, matching
   the approved visual reference. No PHP touched — all icon accents use
   ::before pseudo-elements against the Font Awesome 5 Free webfont
   already enqueued site-wide (fontawesome.min.css 5.15.3), not new
   markup. No new copy is introduced anywhere real data isn't already
   present in the DOM.

   Confirmed real DOM anchors used below (curl-verified against the
   live /vendor/dz/ output, not assumed from PHP source alone):
     .hp-vendor__summary.hp-widget.widget      sidebar identity card
     .hp-vendor__image > img                   avatar
     .hp-vendor__name > .hp-vendor__online-badge + span
     .hp-vendor__details--primary .hp-vendor__registered-date
     .hp-vendor__attributes--secondary .hp-vendor__attribute--*
     .hp-vendor__actions--primary .hp-vendor__action--message/--request
     .apt-action-safety-note
     .hp-page__title ("Services by {name}")
     .apt-profile-section(--helper|--pro|--coverage|--verify)
     .apt-services-empty(--compact)
     .apt-reviews-section, .apt-safety-section
   ============================================================= */

/* ---- Extra design tokens (foundation) ---- */
body.hp-template--vendor-view-page {
  --apt-vp-radius-lg:   16px;
  --apt-vp-shadow-card: 0 4px 24px rgba(16, 24, 40, 0.08);
  --apt-vp-shadow-hover: 0 8px 28px rgba(16, 24, 40, 0.12);
}

/* -------------------------------------------------------------
   PAGE — kill horizontal overflow risk; stack sidebar above content
   (LOCAL-PRO-PAGE-2C-FIX: the sidebar is now a full-width hero, not a
   side column, so the row stacks instead of splitting 33/66).
   ------------------------------------------------------------- */

body.hp-template--vendor-view-page .hp-row {
  max-width: 100%;
  flex-direction: column;
}

body.hp-template--vendor-view-page .hp-page__sidebar,
body.hp-template--vendor-view-page .hp-page__content {
  box-sizing: border-box;
  flex-basis: 100%;
  max-width: 100%;
  width: 100%;
}

/* -------------------------------------------------------------
   HERO — full-width identity band (LOCAL-PRO-PAGE-2C-FIX)

   aside.hp-page__sidebar is the hero surface itself. Its three direct
   children — vendor_summary (avatar/name/meta), the Trust Snapshot strip,
   and the Action Panel (Call/Message/Request/Website) — wrap as a flex
   row: identity left, actions right, trust strip full width beneath.
   ------------------------------------------------------------- */

body.hp-template--vendor-view-page .hp-page__sidebar {
  background: var(--apt-vp-white);
  border: 1px solid var(--apt-vp-border);
  border-radius: var(--apt-vp-radius-lg);
  box-shadow: var(--apt-vp-shadow-card);
  padding: 18px 22px 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

body.hp-template--vendor-view-page .hp-page__sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--apt-vp-green) 0%, var(--apt-vp-blue) 100%);
}

/* ---- Identity block — avatar spans the text column's full height,
   the rest (name, chips, meta) auto-flows down column 2.

   LOCAL-PRO-PAGE-2C-FIX3: CDP computed-style audit of the live /vendor/dz/
   page found the excess hero whitespace was NOT caused by anything in this
   stylesheet — it was ~196px of theme-inherited spacing this stylesheet
   never contested (or contested with too little specificity to win):
     .hp-vendor--view-page .hp-vendor__summary { padding: 4rem 2rem 2rem }
     — 96px, from askpertask-child/style.css, never overridden at all.
     Three separate theme rules (.hp-widget:not(:last-child), the vendor
     view-page widget list, .site-sidebar .widget:not(:last-child)) each
     add margin-bottom: 2rem (32px) to this element as a "sidebar widget".
     .hp-vendor__name/__image/__details--primary/__attributes--secondary
     each pick up an uncontested or out-specificity'd margin-bottom
     (1rem/1.25rem) from theme :not(:last-child) rules — see the specific
     child rules below for the exact selector each one beats.
   Every rule below that exists purely to win one of these specificity
   contests is prefixed with .hp-page__sidebar (already a true DOM
   ancestor) to push its class-count above the theme's, instead of using
   !important. ---- */

body.hp-template--vendor-view-page .hp-page__sidebar .hp-vendor__summary.hp-widget {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px 18px;
  text-align: left;
  flex: 1 1 380px;
  min-width: 260px;
  padding: 0;
  margin: 0;
}

body.hp-template--vendor-view-page .hp-vendor__summary.hp-widget > .hp-vendor__image {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
}

body.hp-template--vendor-view-page .hp-vendor__summary.hp-widget > *:not(.hp-vendor__image) {
  grid-column: 2;
}

/* ---- Avatar.
   LOCAL-PRO-PAGE-2C-FIX3: askpertask-child/style.css has
   ".hp-vendor--view-page .hp-vendor__image:not(:last-child) { margin-bottom:
   1.25rem }" (20px, specificity 0,0,3,0) — beat the old 2-class selector
   here. 92px sits in the requested 88–104px desktop range (was 76px). ---- */

body.hp-template--vendor-view-page .hp-page__sidebar .hp-vendor__summary .hp-vendor__image {
  display: flex;
  margin: 0;
}

body.hp-template--vendor-view-page .hp-vendor__image img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px var(--apt-vp-white),
    0 0 0 5px var(--apt-vp-green-light),
    0 4px 14px rgba(16, 24, 40, 0.14);
}

/* ---- Name (h1) + online status — the page's one dominant heading.
   LOCAL-PRO-PAGE-2C-FIX2: larger again (was 1.75rem) — a compact hero still
   needs the name to visually lead, not shrink along with everything else.

   LOCAL-PRO-PAGE-2C-FIX3: CDP audit found this rule's font-size/font-weight
   were being silently beaten — askpertask-child/style.css has
   ".apt-vendor-profile .hp-vendor__summary .hp-vendor__name" and the
   .apt-helper-profile equivalent (3-class selectors, specificity 0,0,3,0)
   still setting font-size:1.25rem/font-weight:700 from an earlier design
   pass, both outranking the 2-class selector this used to be. The computed
   name was rendering at 20px/700, not the intended 36px/800 — the real
   cause of "name not dominant enough". Matching the selector's own
   ancestor chain (.hp-page__sidebar .hp-vendor__summary) reaches 4 classes
   and wins outright, without !important and without touching the theme. */

body.hp-template--vendor-view-page .hp-page__sidebar .hp-vendor__summary .hp-vendor__name {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--apt-vp-text);
  margin: 0;
  line-height: 1.15;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

body.hp-template--vendor-view-page .hp-vendor__online-badge {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--apt-vp-muted-light);
  flex-shrink: 0;
}

body.hp-template--vendor-view-page .hp-vendor__online-badge--active {
  background: var(--apt-vp-green);
  box-shadow: 0 0 0 3px var(--apt-vp-green-light);
}

/* ---- Role chips + supporting identity metadata — left-aligned ---- */

body.hp-template--vendor-view-page .apt-sidebar-role-chips {
  justify-content: flex-start;
  gap: 6px;
  margin: 2px 0;
}

body.hp-template--vendor-view-page .apt-sidebar-role-chip {
  padding: 5px 14px;
  font-size: 0.75rem;
  border: 1px solid transparent;
}

body.hp-template--vendor-view-page .apt-sidebar-role-chip--helper {
  border-color: rgba(45, 108, 223, 0.25);
}

body.hp-template--vendor-view-page .apt-sidebar-role-chip--pro {
  border-color: rgba(31, 163, 74, 0.25);
}

body.hp-template--vendor-view-page .apt-rating-placeholder,
body.hp-template--vendor-view-page .apt-sidebar-headline {
  text-align: left;
}

body.hp-template--vendor-view-page .apt-sidebar-location {
  justify-content: flex-start;
}

/* ---- Member-since — quiet inline meta line, no longer a divided block.
   LOCAL-PRO-PAGE-2C-FIX3: askpertask-child/style.css's shared
   ":not(:last-child)" list (also covering --attributes--secondary/
   --ternary/__image/__name) adds an uncontested margin-bottom:1rem (16px)
   here — this rule never declared margin-bottom at all before, so it just
   applied. Same .hp-page__sidebar .hp-vendor__summary prefix as the other
   fixes above to keep it winning deterministically. ---- */

body.hp-template--vendor-view-page .hp-page__sidebar .hp-vendor__summary .hp-vendor__details--primary {
  margin-top: 3px;
  margin-bottom: 0;
  padding-top: 0;
  border-top: none;
  text-align: left;
}

body.hp-template--vendor-view-page .hp-vendor__registered-date {
  font-size: 0.8125rem;
  color: var(--apt-vp-muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1.4;
}

body.hp-template--vendor-view-page .hp-vendor__registered-date::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f073";
  color: var(--apt-vp-muted-light);
  font-size: 0.8125rem;
}

/* ---- Availability / experience — quiet inline stats, not a bordered
   dashboard grid (these are secondary operational details).
   LOCAL-PRO-PAGE-2C-FIX3: same shared theme ":not(:last-child)" rule as
   __details--primary above adds an uncontested margin-bottom:1rem (16px)
   here too — same .hp-page__sidebar .hp-vendor__summary specificity fix. ---- */

body.hp-template--vendor-view-page .hp-page__sidebar .hp-vendor__summary .hp-vendor__attributes--secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
  margin-top: 3px;
  margin-bottom: 0;
  border-top: none;
}

/* ---- Experience self-declared disclaimer — _order 41 ---- */

body.hp-template--vendor-view-page .apt-experience-disclaimer {
  font-size: 0.6875rem;
  color: var(--apt-vp-muted-light);
  font-style: italic;
  margin: 3px 0 0;
  line-height: 1.4;
}

body.hp-template--vendor-view-page .hp-vendor__attributes--secondary .hp-vendor__attribute {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--apt-vp-muted);
  line-height: 1.4;
}

body.hp-template--vendor-view-page .hp-vendor__attributes--secondary .hp-vendor__attribute:first-child {
  border-right: none;
}

body.hp-template--vendor-view-page .hp-vendor__attributes--secondary .hp-vendor__attribute i {
  color: var(--apt-vp-green);
  font-size: 0.8125rem;
}

/* ---- Action panel — Call / Message / Request / Website —
   LOCAL-PRO-PAGE-2C-FIX2: a compact 2-column button grid that sits directly
   below the identity block (flex-basis:100% forces it onto its own row in
   the hero's flex-wrap layout), not a detached fixed-width side column. The
   safety note spans both columns underneath. ---- */

body.hp-template--vendor-view-page .hp-vendor__actions--primary.hp-widget {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  flex-basis: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

/* LOCAL-PRO-PAGE-2C-FIX3: owner self-view can leave exactly one action
   button (e.g. Call only, no Website — Message/Send Request are always
   suppressed for the owner). A lone .hp-vendor__action in the 2-col grid
   would leave the second column empty; spanning it full width instead
   avoids that gap. Two buttons already fill both columns evenly and are
   unaffected by this rule (:only-of-type only matches when there is
   exactly one). */
body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action:only-of-type {
  grid-column: 1 / -1;
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 11px 14px;
  margin: 0;
  min-height: 44px;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--message {
  background: var(--apt-vp-green);
  border-color: var(--apt-vp-green);
  color: var(--apt-vp-white);
  box-shadow: 0 4px 14px rgba(31, 163, 74, 0.28);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--message::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f075";
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--message:hover {
  background: var(--apt-vp-green-dark);
  border-color: var(--apt-vp-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(31, 163, 74, 0.34);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--request {
  background: var(--apt-vp-white);
  border: 1.5px solid var(--apt-vp-border);
  color: var(--apt-vp-text);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--request::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f1d8";
  color: var(--apt-vp-muted);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--request:hover {
  border-color: var(--apt-vp-green);
  color: var(--apt-vp-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.1);
}

/* Call / Website — LOCAL-PRO-PAGE-2C-FIX, moved into the hero Action Panel */

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--call {
  background: var(--apt-vp-green-light);
  border: 1.5px solid rgba(31, 163, 74, 0.25);
  color: var(--apt-vp-green-dark);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--call::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f095";
  color: var(--apt-vp-green);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--call:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.1);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--website {
  background: var(--apt-vp-blue-light);
  border: 1.5px solid rgba(45, 108, 223, 0.25);
  color: var(--apt-vp-blue);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--website::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f0ac";
  color: var(--apt-vp-blue);
}

body.hp-template--vendor-view-page .hp-vendor__actions--primary .hp-vendor__action--website:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.1);
}

/* Safety note restyled as a trust card, not a plain caption line */

body.hp-template--vendor-view-page .apt-action-safety-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  background: var(--apt-vp-bg);
  border: 1px solid var(--apt-vp-border);
  border-radius: var(--apt-vp-radius);
  padding: 10px 12px;
  margin: 2px 0 0;
  font-size: 0.75rem;
}

body.hp-template--vendor-view-page .apt-action-safety-note::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f023";
  color: var(--apt-vp-muted-light);
  font-size: 0.8125rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Trust Snapshot — full-width strip along the bottom of the hero
   (LOCAL-PRO-PAGE-2C-FIX: was a separate narrow sidebar widget; now a
   quiet footer strip inside the same hero surface). ---- */

body.hp-template--vendor-view-page .apt-trust-snapshot {
  flex-basis: 100%;
  order: 3;
  padding: 14px 0 0;
  margin: 0;
  border-top: 1px solid var(--apt-vp-border);
}

/* -------------------------------------------------------------
   MAIN COLUMN — card grid
   LOCAL-PRO-PAGE-2C-FIX2: Service details is merged into Coverage &
   Availability and Helper/Pro are merged into one Services & expertise
   section (see class-apt-profile-template.php), removing the old
   side-by-side card pairing entirely — every remaining section now runs
   full width, reducing the dashboard-grid feel this batch corrects.
   ------------------------------------------------------------- */

body.hp-template--vendor-view-page .hp-page__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

body.hp-template--vendor-view-page .hp-page__content > * {
  min-width: 0;
}

/* Grid items default to order:0 when unset, which sorts before any item
   given an explicit positive order — every section gets an explicit order
   mirroring the _order values in class-apt-profile-template.php, so the
   visual order is correct regardless of which subset of sections a given
   vendor actually has. */
body.hp-template--vendor-view-page .apt-owner-notice              { order: 0; }
body.hp-template--vendor-view-page .apt-profile-section--services { order: 1; }
body.hp-template--vendor-view-page .apt-helper-intro               { order: 1; }
body.hp-template--vendor-view-page .hp-page__content > .hp-listings { order: 2; }
body.hp-template--vendor-view-page .apt-profile-section--coverage { order: 3; }
body.hp-template--vendor-view-page .apt-about                     { order: 4; }
body.hp-template--vendor-view-page .apt-profile-section--verify   { order: 5; }
body.hp-template--vendor-view-page .apt-safety-section            { order: 6; }

/* ---- Card surface — LOCAL-PRO-PAGE-2C-FIX2: reduced padding (was
   22px 22px 24px) — every section now runs full width with no paired
   card to height-match against, so the old height:100% stretch is gone
   too. ---- */

body.hp-template--vendor-view-page .apt-profile-section,
body.hp-template--vendor-view-page .apt-about,
body.hp-template--vendor-view-page .apt-safety-section {
  background: var(--apt-vp-white);
  border: 1px solid var(--apt-vp-border);
  border-radius: var(--apt-vp-radius-lg);
  box-shadow: var(--apt-vp-shadow-card);
  padding: 18px 20px 20px;
  margin: 0;
  transition: box-shadow 0.15s ease;
}

body.hp-template--vendor-view-page .apt-profile-section:hover {
  box-shadow: var(--apt-vp-shadow-hover);
}

/* ---- Section heading — icon badge + label ---- */

body.hp-template--vendor-view-page .apt-profile-section__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  margin: 0 0 14px;
}

body.hp-template--vendor-view-page .apt-profile-section__heading::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

body.hp-template--vendor-view-page .apt-profile-section--services .apt-profile-section__heading::before {
  content: "\f0ad";
  background: var(--apt-vp-green-light);
  color: var(--apt-vp-green-dark);
}

body.hp-template--vendor-view-page .apt-profile-section--coverage .apt-profile-section__heading::before {
  content: "\f3c5";
  background: var(--apt-vp-green-light);
  color: var(--apt-vp-green-dark);
}

body.hp-template--vendor-view-page .apt-profile-section--verify .apt-profile-section__heading::before {
  content: "\f3ed";
  background: var(--apt-vp-green-light);
  color: var(--apt-vp-green-dark);
}

/* ---- Coverage emergency flag reads as a small badge, not a bare line ---- */

body.hp-template--vendor-view-page .apt-coverage-emergency {
  background: #FEF3C7;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  width: fit-content;
}

/* ---- HP native listings grid — let it breathe full width in the new card rhythm ---- */

body.hp-template--vendor-view-page .hp-page__content .hp-listings {
  grid-column: 1 / -1;
}

/* =============================================================
   LOCAL-PRO-PAGE-2C-PUBLIC-SHELL

   - Owner-only profile-completion notice (top of main column, server-side
     gated — see render_owner_completion_notice()).
   - The Contact actions (Call / Website) originally added here now live in
     the hero Action Panel — see .hp-vendor__action--call/--website above
     and render_action_call()/render_action_website() — LOCAL-PRO-PAGE-2C-FIX.
   ============================================================= */

/* ---- Owner-only profile-completion notice ---- */

body.hp-template--vendor-view-page .apt-owner-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--apt-vp-blue-light);
  border: 1px solid rgba(45, 108, 223, 0.25);
  border-radius: var(--apt-vp-radius-lg);
  padding: 16px 20px;
  margin: 0;
}

body.hp-template--vendor-view-page .apt-owner-notice__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--apt-vp-text);
  line-height: 1.5;
}

body.hp-template--vendor-view-page .apt-owner-notice__link {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--apt-vp-blue);
  white-space: nowrap;
}

body.hp-template--vendor-view-page .apt-owner-notice__link:hover {
  color: var(--apt-vp-green-dark);
}

/* -------------------------------------------------------------
   MOBILE / RESPONSIVE — 768px and down (375px verified)
   ------------------------------------------------------------- */

@media (max-width: 768px) {
  body.hp-template--vendor-view-page .hp-page__sidebar {
    padding: 16px 18px;
  }

  body.hp-template--vendor-view-page .hp-vendor__image img {
    width: 64px;
    height: 64px;
  }

  body.hp-template--vendor-view-page .apt-profile-section,
  body.hp-template--vendor-view-page .apt-about,
  body.hp-template--vendor-view-page .apt-safety-section {
    padding: 16px;
  }
}

/* Phones — LOCAL-PRO-PAGE-2C-FIX: the hero's avatar-left/text-right grid
   gets cramped below ~600px, so it collapses to the same centred vertical
   stack the identity card already used before this batch (avatar top,
   text and actions centred beneath), rather than risking wrapped/clipped
   text beside a 120px avatar in ~150px of remaining width. */
@media (max-width: 600px) {
  body.hp-template--vendor-view-page .hp-page__sidebar {
    flex-direction: column;
    align-items: stretch;
  }

  body.hp-template--vendor-view-page .hp-page__sidebar .hp-vendor__summary.hp-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-basis: auto;
    min-width: 0;
  }

  /* LOCAL-PRO-PAGE-2C-FIX3: this and the .hp-vendor__name rule just below
     were being silently defeated by this file's OWN desktop rules, which
     — after the FIX3 specificity fix above — now outrank these mobile
     overrides at every width, desktop or not (an unconditional 4-class
     rule always wins over a 2/3-class one regardless of viewport). Both
     bumped to the same .hp-page__sidebar .hp-vendor__summary prefix so
     they tie in specificity and win by simply appearing later in the file. */
  body.hp-template--vendor-view-page .hp-page__sidebar .hp-vendor__summary .hp-vendor__image {
    margin: 0 0 12px;
  }

  body.hp-template--vendor-view-page .hp-page__sidebar .hp-vendor__summary .hp-vendor__name {
    font-size: 1.75rem;
    justify-content: center;
  }

  body.hp-template--vendor-view-page .apt-sidebar-role-chips,
  body.hp-template--vendor-view-page .apt-sidebar-location,
  body.hp-template--vendor-view-page .hp-vendor__attributes--secondary {
    justify-content: center;
  }

  body.hp-template--vendor-view-page .apt-rating-placeholder,
  body.hp-template--vendor-view-page .apt-sidebar-headline,
  body.hp-template--vendor-view-page .hp-vendor__details--primary,
  body.hp-template--vendor-view-page .apt-experience-disclaimer {
    text-align: center;
  }

  body.hp-template--vendor-view-page .hp-vendor__actions--primary.hp-widget {
    margin-top: 8px;
  }
}

/* =============================================================
   SVC-5D: Old Elementor header removed from vendor profile route

   SVC-5C / SVC-5C-F1 (below, now removed) cleaned up and compacted the
   global Elementor site header (template id 2156) on this route. As of
   SVC-5D that header is no longer rendered on vendor profile pages at
   all — it is bypassed in favor of the AskPerTask V2 header (shared
   `template-parts/apt-header.php`, injected via wp_body_open), the same
   mechanism already used on /requests/, /services/, and single listing
   pages. See askpertask-child/inc/apt-header-conditions.php
   (apt_uses_new_header()). The SVC-5C/5C-F1 overrides targeted
   Elementor-specific classes that no longer appear in the DOM on this
   route, so they were deleted rather than left as dead CSS.
   ============================================================= */

/* =============================================================
   BUSINESS-PROFILE-SERVICES-LAUNCH-CLOSURE-1A: native hp_vendor cover
   banner + gallery. Omitted from the DOM entirely when unset (see
   class-apt-profile-template.php) — no placeholder styling needed.
   ============================================================= */

body.hp-template--vendor-view-page .apt-vendor-cover {
  margin: -1px -1px 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  line-height: 0;
}

body.hp-template--vendor-view-page .apt-vendor-cover img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

@media (max-width: 782px) {
  body.hp-template--vendor-view-page .apt-vendor-cover img {
    height: 140px;
  }
}

body.hp-template--vendor-view-page .apt-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

body.hp-template--vendor-view-page .apt-gallery__item {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
}

body.hp-template--vendor-view-page .apt-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
