/**
 * AskPerTask — Local Directory business profile (/local/{slug}/).
 * LOCAL-DIRECTORY-VISUAL-MODERNISATION-1A.
 *
 * Loaded ONLY on the Local Directory business-detail virtual route (see
 * APT_Local_Business_Profile::enqueue_assets()) — no sitewide dependency.
 * Every selector is scoped under .apt-local-business-profile so nothing
 * here can leak onto any other page.
 *
 * Tokens below reuse the exact values already used sitewide (the same
 * blue used by apt-offer-modal.css/apt-checkout-context.css/the Boost
 * card, and the same card border/radius/shadow used by the Service
 * Request success card) — no new brand color is introduced. The old
 * inline teal (#0D9488) is fully removed.
 */

.apt-local-business-profile {
	--apt-lbp-blue: #2D6CDF;
	--apt-lbp-blue-light: #EAF1FD;
	--apt-lbp-blue-dark: #1E4FA8;
	--apt-lbp-text: #1A1A1A;
	--apt-lbp-text-muted: #6B7280;
	--apt-lbp-text-light: #9CA3AF;
	--apt-lbp-border: #E4E7EC;
	--apt-lbp-radius: 16px;
	--apt-lbp-radius-sm: 10px;
	--apt-lbp-shadow: 0 2px 12px rgba(16, 24, 40, 0.06);
	--apt-lbp-chip-bg: #F1F5F9;
	--apt-lbp-chip-text: #475569;

	max-width: 720px;
	margin: 40px auto 60px;
	padding: 0 20px;
	box-sizing: border-box;
}

.apt-local-business-profile *,
.apt-local-business-profile *::before,
.apt-local-business-profile *::after {
	box-sizing: border-box;
}

/* ---------- Owner banner ---------- */

.apt-local-business-profile__owner-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 24px;
	padding: 16px 20px;
	background: var(--apt-lbp-blue);
	color: #fff;
	border-radius: var(--apt-lbp-radius-sm);
}

.apt-local-business-profile__owner-banner strong {
	font-weight: 600;
}

.apt-local-business-profile__owner-banner-links a {
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	margin-right: 16px;
}

.apt-local-business-profile__owner-banner-links a:last-child {
	margin-right: 0;
}

/* ---------- Hero / summary ---------- */

.apt-local-business-profile__hero {
	background: #fff;
	border: 1px solid var(--apt-lbp-border);
	border-radius: var(--apt-lbp-radius);
	box-shadow: var(--apt-lbp-shadow);
	overflow: hidden;
	margin-bottom: 24px;
}

.apt-local-business-profile__cover-img {
	display: block;
	width: 100%;
	max-height: 240px;
	object-fit: cover;
}

.apt-local-business-profile__summary {
	padding: 28px 28px 24px;
}

.apt-local-business-profile__identity {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 14px;
}

.apt-local-business-profile__logo {
	flex-shrink: 0;
	border-radius: 12px;
	object-fit: cover;
}

.apt-local-business-profile__name {
	margin: 0;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--apt-lbp-text);
	word-break: break-word;
}

.apt-local-business-profile__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.apt-local-business-profile__chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	background: var(--apt-lbp-chip-bg);
	color: var(--apt-lbp-chip-text);
	line-height: 1.4;
}

.apt-local-business-profile__chip--status-owner {
	background: var(--apt-lbp-blue-light);
	color: var(--apt-lbp-blue-dark);
}

/* ---------- Cards (About / Contact / Gallery / empty state) ---------- */

.apt-local-business-profile__card {
	background: #fff;
	border: 1px solid var(--apt-lbp-border);
	border-radius: var(--apt-lbp-radius);
	box-shadow: var(--apt-lbp-shadow);
	padding: 24px 28px;
	margin-bottom: 24px;
}

.apt-local-business-profile__card-title {
	margin: 0 0 14px;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--apt-lbp-text);
}

.apt-local-business-profile__card--empty {
	background: #FAFAFA;
	border: 1px dashed #DDD;
	box-shadow: none;
	color: var(--apt-lbp-text-muted);
	font-size: 0.9rem;
}

/* About */

.apt-local-business-profile__about-text {
	margin: 0;
	max-width: 60ch;
	color: var(--apt-lbp-text);
	line-height: 1.65;
	font-size: 0.95rem;
	white-space: pre-line;
	overflow-wrap: break-word;
}

/* Contact */

.apt-local-business-profile__contact-row {
	margin: 0 0 10px;
	font-size: 0.9375rem;
	color: var(--apt-lbp-text);
	line-height: 1.5;
}

.apt-local-business-profile__contact-row:last-child {
	margin-bottom: 0;
}

.apt-local-business-profile__contact-link {
	color: var(--apt-lbp-blue);
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: break-word;
}

.apt-local-business-profile__contact-link:hover {
	text-decoration: underline;
}

/* Gallery */

.apt-local-business-profile__gallery-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.apt-local-business-profile__gallery-img {
	border-radius: 10px;
	object-fit: cover;
}

/* ---------- Owner-managed notice (deliberately neutral — see class docblock) ---------- */

.apt-local-business-profile__notice {
	background: #F9FAFB;
	border: 1px solid #E5E7EB;
	color: var(--apt-lbp-text-muted);
	padding: 14px 18px;
	border-radius: var(--apt-lbp-radius-sm);
	font-size: 0.85rem;
	line-height: 1.5;
	margin-bottom: 24px;
}

.apt-local-business-profile__linked-vendor-note {
	/* --apt-lbp-text-light (#9CA3AF) measures ~2.5:1 on white, below WCAG
	   AA's 4.5:1 for normal text — --apt-lbp-text-muted (~4.8:1) already
	   exists on this page and keeps this note reading as secondary info. */
	margin: 0 0 12px;
	font-size: 0.85rem;
	color: var(--apt-lbp-text-muted);
}

/* ---------- Actions ---------- */

.apt-local-business-profile__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.apt-local-business-profile__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.3;
	border: 1.5px solid transparent;
}

.apt-local-business-profile__btn--primary {
	background: var(--apt-lbp-blue);
	color: #fff !important;
}

.apt-local-business-profile__btn--primary:hover {
	background: var(--apt-lbp-blue-dark);
}

.apt-local-business-profile__btn--secondary {
	background: #fff;
	color: var(--apt-lbp-text) !important;
	border-color: var(--apt-lbp-border);
}

.apt-local-business-profile__btn--secondary:hover {
	border-color: #9CA3AF;
	background: #F9FAFB;
}

.apt-local-business-profile__btn--tertiary {
	/* --apt-lbp-text-light (#9CA3AF) measures ~2.5:1 on white, below WCAG
	   AA's 4.5:1 for normal text — using the existing --apt-lbp-text-muted
	   token instead (~4.8:1) fixes contrast without raising this action's
	   visual hierarchy relative to primary/secondary. */
	padding: 10px 4px;
	color: var(--apt-lbp-text-muted) !important;
	font-weight: 600;
	text-decoration: underline;
}

.apt-local-business-profile__btn--tertiary:hover {
	color: var(--apt-lbp-text) !important;
}

/* ---------- Not-found state ---------- */

.apt-local-business-profile--not-found {
	max-width: 560px;
	margin: 60px auto;
	padding: 0 20px;
	text-align: left;
}

.apt-local-business-profile--not-found h1 {
	font-size: 1.5rem;
	color: var(--apt-lbp-text, #1A1A1A);
	margin-bottom: 10px;
}

.apt-local-business-profile--not-found p {
	color: var(--apt-lbp-text-muted, #6B7280);
	margin: 0 0 10px;
}

.apt-local-business-profile--not-found a {
	color: var(--apt-lbp-blue, #2D6CDF);
	font-weight: 600;
	text-decoration: none;
}

.apt-local-business-profile--not-found a:hover {
	text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
	.apt-local-business-profile__summary {
		padding: 22px 20px 20px;
	}

	.apt-local-business-profile__card {
		padding: 20px;
	}

	.apt-local-business-profile__name {
		font-size: 1.4rem;
	}

	.apt-local-business-profile__logo {
		width: 56px !important;
		height: 56px !important;
	}
}

@media (max-width: 480px) {
	.apt-local-business-profile__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.apt-local-business-profile__btn {
		width: 100%;
	}

	.apt-local-business-profile__btn--tertiary {
		padding: 6px 4px;
	}

	.apt-local-business-profile__owner-banner {
		flex-direction: column;
		align-items: flex-start;
	}
}
