/*
 * Single-listing detail page - v2 visual identity, light theme.
 *
 * Purely a re-skin: every selector here targets markup that already exists
 * in Templates/single-ait-dir-item.php and its existing companion
 * item-page-polish.css - nothing about the page's structure, conditional
 * logic, schema.org output, or tracking attributes changes. This file
 * only needs to be enqueued after item-page-polish.css to win the cascade
 * (same specificity, later source order) rather than fighting it with
 * !important.
 *
 * Deliberately light, not dark like the /v2 map - long-form business
 * info (address, hours, bio, reviews) reads better on light, and most
 * serious directory detail pages stay light for that reason. What carries
 * the shared identity is the teal accent and the same pill/card visual
 * language used throughout /v2, not a matching dark background.
 */

:root {
	--ip-accent: #1f8f86;       /* teal, AA-safe as text/border on white */
	--ip-accent-bright: #34d3c9; /* the actual /v2 brand teal - for fills, not small text */
	--ip-accent-tint: rgba(31,143,134,0.08);
	--ip-accent-tint-strong: rgba(31,143,134,0.14);
	--ip-ink: #142027;
	--ip-ink-dim: #64727a;
	--ip-card-bg: #f6f9f9;
	--ip-border: #e2e9e8;
}

/* --- hero: .item-detail-top already wraps exactly the thumbnail + title +
   badges + breadcrumb + rating as one unit in the existing template, so it
   becomes the gradient hero card entirely through CSS - float layout
   swapped for flex (clearfix's ::after is inert once the container is
   flex, so this is safe to change without touching the markup). Approved
   via a mockup built from this firm's real data before shipping. --- */
.item-detail-top {
	display: flex;
	align-items: center;
	gap: 24px;
	background: linear-gradient(135deg, #0f2a27 0%, #143530 55%, #1a4a43 100%);
	border-radius: 16px;
	padding: 32px;
	position: relative;
	overflow: hidden;
}
.item-detail-top::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 85% 20%, rgba(52,211,201,0.25), transparent 55%);
	pointer-events: none;
}
.item-detail-thumbnail {
	float: none;
	flex-shrink: 0;
	width: 110px;
	height: 110px;
	border-radius: 14px;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(0,0,0,0.35);
	position: relative;
	z-index: 1;
	overflow: hidden;
	padding: 8px;
}
.item-detail-thumbnail img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 0;
	box-shadow: none;
}
.item-detail-header {
	float: none;
	position: relative;
	z-index: 1;
	min-width: 0;
}

/* --- header: title, breadcrumb, rating (all white/translucent now that
   this sits on the dark hero, not the light page background) --- */
.item-detail-header .entry-title { color: #ffffff; margin: 0 0 10px; }

.item-detail-breadcrumb, .item-detail-breadcrumb a { color: rgba(255,255,255,0.7); }
.item-detail-breadcrumb a:hover { color: #fff; }
.item-detail-breadcrumb .title { color: #fff; font-weight: 600; }

.item-detail-rating .star.active { color: var(--ip-accent-bright); }

/* --- trust badges: unified teal-family pills instead of four unrelated
   colors, so they read as one visual system rather than four different
   third-party-plugin-style badges. Translucent-white here since badges
   only ever appear inside the dark hero above, not elsewhere on the page. --- */
.item-badge {
	background: rgba(255,255,255,0.14) !important;
	color: #ffffff !important;
	border: 1px solid rgba(255,255,255,0.24);
}
.item-badge.top-rated { background: rgba(216,160,44,0.1) !important; color: #a37116 !important; border-color: rgba(216,160,44,0.25); }
.item-badge.award { background: rgba(90,90,200,0.1) !important; color: #4a4ad0 !important; border-color: rgba(90,90,200,0.22); }
.item-badge.custom { background: var(--ip-card-bg) !important; color: var(--ip-ink-dim) !important; border-color: var(--ip-border); }

.item-detail-response-time { color: var(--ip-accent); }

/* --- contact + hours card --- */
.item-detail-info {
	background: var(--ip-card-bg);
	box-shadow: none;
	border: 1px solid var(--ip-border);
}
.item-detail-info-term { color: var(--ip-ink-dim); }
.item-detail-info-desc { color: var(--ip-ink); }
.item-detail-info-desc a { color: var(--ip-accent); text-decoration: none; }
.item-detail-info-desc a:hover { text-decoration: underline; }
.item-detail-hours-title { color: var(--ip-ink-dim); }
.item-detail-hours .item-detail-info-term { color: var(--ip-ink); }

/* --- CTAs: contact owner / claim listing --- */
.item-detail-info .contact-owner,
.item-detail-info .claim-listing-button {
	background: var(--ip-accent);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	padding: 10px 18px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	transition: background 0.15s ease;
}
.item-detail-info .contact-owner:hover,
.item-detail-info .claim-listing-button:hover { background: #17726b; color: #fff; }
.item-detail-info .claim-listing-button {
	background: transparent;
	color: var(--ip-accent);
	border: 1px solid var(--ip-accent);
}
.item-detail-info .claim-listing-button:hover { background: var(--ip-accent-tint); color: var(--ip-accent); }

/* --- social icons: teal base state instead of neutral grey, brand-color
   hover kept as-is (that part already works well) --- */
.item-social-icon a { background: var(--ip-accent-tint); color: var(--ip-accent); }

/* --- external reviews --- */
.item-external-review-row .star-rating { color: var(--ip-accent-bright); }
.item-external-review-row .review-source { color: var(--ip-ink); }
.item-external-review-row .review-count { color: var(--ip-ink-dim); }

/* --- practice area / specialty tags: same teal family as the badges
   above, rather than the two separate greenish/blueish tones the inline
   <style> blocks in the template originally used --- */
.practice-area-tag, .specialty-tag {
	background: var(--ip-accent-tint) !important;
	color: var(--ip-accent) !important;
}
.practice-area-tag:hover, .specialty-tag:hover {
	background: var(--ip-accent) !important;
	color: #ffffff !important;
}
.item-practice-areas-label, .item-specialties-label { color: var(--ip-ink); }
.item-practice-areas, .item-specialties { border-color: var(--ip-border) !important; }

/* --- team / staff grid --- */
.item-team-title { color: var(--ip-ink); }
.item-team-member { background: var(--ip-card-bg); box-shadow: none; border: 1px solid var(--ip-border); }
.item-team-name { color: var(--ip-ink); }
.item-team-role { color: var(--ip-accent); }
.item-team-bio { color: var(--ip-ink-dim); }
.item-team-photo-placeholder { background: var(--ip-accent-tint); color: var(--ip-accent); }

/* --- other locations of the same firm --- */
.item-other-locations { background: var(--ip-card-bg); box-shadow: none; border: 1px solid var(--ip-border); }
.item-other-locations-title { color: var(--ip-ink); }
.item-other-locations-list li { border-bottom-color: var(--ip-border); }
.item-other-locations-list a { color: var(--ip-accent); }
.item-other-locations-address { color: var(--ip-ink-dim); }

/* --- gallery --- */
.item-gallery-large { border-radius: 10px; }
.item-gallery-thumbnails li { border-radius: 6px; overflow: hidden; }

/* --- body copy --- */
.entry-content { color: var(--ip-ink); }
.entry-content a { color: var(--ip-accent); }

/* --- this listing's own map (Leaflet + OpenStreetMap, same stack as the
   /v2 map - Templates/snippets/map-single-javascript.php renders it into
   #mapcontainer and .item-map). Reuses the exact dark-tint filter trick
   from internal/web/static/v2-map.css so this small per-listing map reads
   as the same product as the main map instead of a plain default-styled
   embed, rather than trying to reskin OpenStreetMap's raster tiles
   themselves (not possible from CSS - the filter is what /v2 already
   does for the same reason). --- */
#mapcontainer .leaflet-tile-pane,
.item-map .leaflet-tile-pane {
	filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9);
}
#mapcontainer, .item-map {
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--ip-border);
}
#mapcontainer .leaflet-popup-content-wrapper,
.item-map .leaflet-popup-content-wrapper {
	background: var(--ip-card-bg);
	color: var(--ip-ink);
	border-radius: 8px;
}
#mapcontainer .leaflet-popup-tip,
.item-map .leaflet-popup-tip {
	background: var(--ip-card-bg);
}
