/* BUSINESS-PROFILE-V2-VENDOR-ROUTE-INTEGRATION-1E
   Loaded ONLY alongside apt-business-profile-demo.css, ONLY when
   class-apt-business-profile-v2-route.php's preview is active (admin +
   ?apt_profile_v2=1 on a real /vendor/{slug}/ page). The bulk of the V2
   visual language (.apt-bpd-* component rules) is already unscoped in
   apt-business-profile-demo.css and applies here automatically once that
   stylesheet is enqueued too.

   This file exists only to re-provide the demo's body-level design tokens
   and base resets WITHOUT touching the real page's <body> or `*` the way
   apt-business-profile-demo.css does on its own isolated standalone page
   -- doing that here would leak font/color/box-sizing/link resets into
   the real theme header, nav, and footer that also live on this page.
   Everything below is scoped to .apt-bpd-wrap / .apt-bpd-sticky (the two
   containers render_fragment() actually outputs outside the theme's own
   markup) instead of body/*. */

body.apt-profile-v2-preview {
	--apt-bpd-blue: #2D6CDF;
	--apt-bpd-blue-dark: #1E4FA8;
	--apt-bpd-blue-light: #EAF1FD;
	--apt-bpd-green: #1FA34A;
	--apt-bpd-green-dark: #168238;
	--apt-bpd-navy: #1A2E52;
	--apt-bpd-amber: #92400E;
	--apt-bpd-amber-bg: #FEF3C7;
	--apt-bpd-border: #E5E7EB;
	--apt-bpd-bg: #F4F5F7;
	--apt-bpd-text: #1A1A1A;
	--apt-bpd-muted: #6B7280;
	--apt-bpd-muted-light: #9CA3AF;
	--apt-bpd-white: #FFFFFF;
	--apt-bpd-radius-lg: 16px;
	--apt-bpd-radius-md: 12px;
	--apt-bpd-radius-sm: 8px;
	--apt-bpd-shadow: 0 2px 12px rgba(16, 24, 40, 0.07);
	--apt-bpd-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
}

body.apt-profile-v2-preview .apt-bpd-wrap {
	background: var(--apt-bpd-bg);
	color: var(--apt-bpd-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* Not the shared .apt-bpd-wrap background rule above -- the sticky bar is
   a white bar, not a page-canvas container, but it still needs the same
   font-family/antialiasing reset since it also renders outside the
   theme's own header/nav markup this preview otherwise leaves untouched. */
body.apt-profile-v2-preview .apt-bpd-sticky {
	color: var(--apt-bpd-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

body.apt-profile-v2-preview .apt-bpd-wrap *,
body.apt-profile-v2-preview .apt-bpd-sticky * {
	box-sizing: border-box;
}

body.apt-profile-v2-preview .apt-bpd-wrap a,
body.apt-profile-v2-preview .apt-bpd-sticky a {
	text-decoration: none;
	color: inherit;
}

body.apt-profile-v2-preview .apt-bpd-wrap h1,
body.apt-profile-v2-preview .apt-bpd-wrap h2,
body.apt-profile-v2-preview .apt-bpd-wrap h3 {
	margin: 0;
	font-weight: 700;
}

body.apt-profile-v2-preview .apt-bpd-wrap :focus-visible,
body.apt-profile-v2-preview .apt-bpd-sticky :focus-visible {
	outline: 2px solid var(--apt-bpd-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

/* The main column's native content is emptied by the route class (see its
   docblock) once the V2 fragment above carries everything -- collapse the
   now-empty container instead of leaving a blank themed panel below it. */
body.apt-profile-v2-preview .hp-page__content:empty {
	display: none;
}

/* BUSINESS-PROFILE-V2-INTEGRATION-POLISH-1F: strip the canonical "hero
   surface" card (apt-profile.css:694, body.hp-template--vendor-view-page
   .hp-page__sidebar) that wraps whatever page_sidebar contains --
   background, border, radius, shadow, padding, and the green/blue
   ::before top-accent bar. V2's own .apt-bpd-hero card (apt-business-
   profile-demo.css) already supplies an equivalent card look, so leaving
   the ancestor card in place was rendering a visible "card inside a
   card" / old-shell-behind-new-profile effect. Selector combines two
   real, always-co-occurring body classes (this preview's own class plus
   the vendor-view-page template class) for 3 total classes, deliberately
   outranking apt-profile.css's 2-class selector without !important and
   without touching that rule -- the canonical (non-preview) page keeps
   its hero-card look completely unchanged. */
body.apt-profile-v2-preview.hp-template--vendor-view-page .hp-page__sidebar {
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	margin-bottom: 0;
	display: block;
}

body.apt-profile-v2-preview.hp-template--vendor-view-page .hp-page__sidebar::before {
	content: none;
}

@media (max-width: 768px) {
	body.apt-profile-v2-preview.hp-template--vendor-view-page .hp-page__sidebar {
		padding: 0;
	}
}

@media (max-width: 600px) {
	body.apt-profile-v2-preview.hp-template--vendor-view-page .hp-page__sidebar {
		flex-direction: column;
	}
}

/* FALLBACK ONLY (see class-apt-business-profile-v2-route.php docblock --
   this path is not expected to run in normal operation): the real,
   untouched canonical action panel kept as its own visible card only if
   inlining it into the hero ever comes back empty. No control inside it
   is modified. */
body.apt-profile-v2-preview .apt-bpd-real-actions {
	max-width: 720px;
	margin: 0 auto 40px;
	padding: 20px 24px;
	background: var(--apt-bpd-white);
	border: 1px solid var(--apt-bpd-border);
	border-radius: var(--apt-bpd-radius-md);
	box-shadow: var(--apt-bpd-shadow-sm);
}

/* BUSINESS-PROFILE-V2-INTEGRATION-POLISH-1F: normal path -- the real
   Call/Message/Request/Website/Save controls rendered inline in the V2
   hero (see APT_Business_Profile_V2_Route::render_real_actions() and
   APT_Business_Profile_Demo::render_fragment()'s $real_actions_html
   branch). None of the underlying elements, hrefs, data-attributes, or
   nonces are touched -- only their visual treatment, to express the
   required hierarchy (Send Request primary, Message secondary, Call/
   Website/Save tertiary) regardless of HivePress's own native classes
   (e.g. Message natively carries button--primary; Request does not --
   deliberately overridden here, not upstream). Selectors target
   HivePress's/APT's own stable class names (hp-vendor__action--*,
   apt-favorite-toggle, apt-action-safety-note), scoped under this
   preview's hero wrapper only. */
/* ASKPERTASK-BUSINESS-PROFILE-2A REBUILD: vertical stacked card (approved
   Figma's actual hero actions composition -- Request/Message/Save as
   three full-width stacked buttons inside a bordered w-64 card), not a
   horizontal row. .apt-bpd-hero__actionscard (apt-business-profile-
   demo.css) supplies the card chrome (border/radius/padding/shadow/
   width); this only sets the internal stack + per-control styling. */
body.apt-profile-v2-preview .apt-bpd-hero__actions--real {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
}

body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	background: none;
}

/* PRIMARY -- Send a request/quote. */
body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--request {
	order: 1;
	padding: 11px 22px;
	border: 0;
	border-radius: var(--apt-bpd-radius-sm);
	background: var(--apt-bpd-green);
	color: var(--apt-bpd-white);
	font-weight: 700;
}

body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--request:hover {
	background: var(--apt-bpd-green-dark);
}

/* SECONDARY -- Message (native classes make this look primary/filled by
   default; overridden here to sit visually below Request). */
body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--message {
	order: 2;
	padding: 10px 20px;
	border: 1px solid var(--apt-bpd-border);
	border-radius: var(--apt-bpd-radius-sm);
	background: var(--apt-bpd-white);
	color: var(--apt-bpd-text);
	font-weight: 600;
}

body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--message:hover {
	background: var(--apt-bpd-bg);
}

/* Save -- same full-width secondary-button treatment as Message, matching
   the approved Figma's third stacked action (order 3, ahead of the
   tertiary Call/Website links Figma's own mock doesn't have a slot for --
   see docblock at .apt-bpd-hero__actionscard). */
body.apt-profile-v2-preview .apt-bpd-hero__actions--real .apt-favorite-toggle {
	order: 3;
	padding: 10px 20px;
	border: 1px solid var(--apt-bpd-border);
	border-radius: var(--apt-bpd-radius-sm);
	color: var(--apt-bpd-text);
	font-size: 0.95rem;
	font-weight: 600;
}

body.apt-profile-v2-preview .apt-bpd-hero__actions--real .apt-favorite-toggle:hover {
	background: var(--apt-bpd-bg);
}

/* TERTIARY -- Call / Website: real data with no equivalent slot in the
   approved Figma mock (its own hero card only has Request/Message/Save);
   kept as a small centered link row rather than dropped, since Data
   Truth rules favour surfacing real contact info over hiding it. */
body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--call,
body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--website {
	order: 4;
	padding: 4px 2px;
	color: var(--apt-bpd-blue);
	font-weight: 600;
	font-size: 0.85rem;
}

body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--call:hover,
body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--website:hover {
	text-decoration: underline;
}

/* ASKPERTASK-BUSINESS-PROFILE-2A VISUAL PARITY: the approved Figma hero
   actions card has no equivalent element for this real safety/payment
   caption -- hidden here PURELY as a presentation choice (display:none,
   this rule only). The real note, its markup, and its underlying
   safety/payment logic (class-apt-profile-template.php) are completely
   untouched and still render normally everywhere else this real action
   block is used outside the V2 hero. */
body.apt-profile-v2-preview .apt-bpd-hero__actions--real .apt-action-safety-note {
	display: none;
}

@media (max-width: 600px) {
	body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--request,
	body.apt-profile-v2-preview .apt-bpd-hero__actions--real .hp-vendor__action--message {
		text-align: center;
	}
}
