/* ==========================================================================
   Placeholder-graphic system (Session 04.6)

   Every image slot site-wide is currently empty (no real photography
   configured anywhere yet). Rather than the pre-existing "no image -> just
   collapse/adapt the layout, show nothing" pattern, this composes the
   established diagnostic-grid + viewfinder-frame motifs (previously only
   used inline inside the no-media hero / hero-frame rules — see
   sections.css) into one reusable, mood-tinted component with real visual
   weight. `aspect-ratio` is set by the calling context (inline style, to
   match whatever real-image slot it stands in for), so swapping in an
   actual photo later is a pure content change with zero layout change.
   ========================================================================== */

.art-placeholder {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	width: 100%;
	height: 100%;
	min-height: 220px;
	border-radius: var(--art-radius-panel);
	background-color: var(--art-color-background-alt);
	/* De-template pass (2026-12-04): thin border instead of shadow_card, same
	   as every other frame/card in this pass. */
	border: var(--art-border-width) solid var(--art-color-border-strong);
	box-shadow: none;
}

.art-placeholder__grid {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		repeating-linear-gradient(90deg, var(--art-color-border) 0 1px, transparent 1px 44px),
		repeating-linear-gradient(0deg, var(--art-color-border) 0 1px, transparent 1px 44px);
	opacity: 0.35;
	mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 0%, transparent 75%);
}

.art-placeholder__frame {
	position: absolute;
	inset: 14px;
	z-index: 1;
	pointer-events: none;
}

.art-placeholder__frame::before,
.art-placeholder__frame::after {
	content: "";
	position: absolute;
	width: 28px;
	height: 28px;
}

.art-placeholder__frame::before {
	top: 0;
	left: 0;
	border-top: 2.5px solid var(--art-placeholder-accent, var(--art-color-accent));
	border-left: 2.5px solid var(--art-placeholder-accent, var(--art-color-accent));
}

.art-placeholder__frame::after {
	bottom: 0;
	right: 0;
	border-bottom: 2.5px solid var(--art-placeholder-accent, var(--art-color-accent));
	border-right: 2.5px solid var(--art-placeholder-accent, var(--art-color-accent));
}

/* Session 18: a soft radial glow behind the icon gives the slot real depth
   instead of a flat tint — the icon now reads as a deliberate mark, not an
   apologetic filler. */
.art-placeholder__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--art-space-sm);
}

.art-placeholder__content::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 140px;
	height: 140px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient( circle, var(--art-placeholder-icon-color, var(--art-color-primary)) 0%, transparent 70% );
	opacity: 0.12;
	z-index: -1;
}

.art-placeholder__icon {
	width: 72px;
	height: 72px;
	color: var(--art-placeholder-icon-color, var(--art-color-primary));
	opacity: 0.75;
	position: relative;
	z-index: 1;
}

.art-placeholder__initials {
	font-family: var(--art-font-primary, sans-serif);
	font-size: 1.75rem;
	font-weight: var(--art-font-weight-heading);
	color: var(--art-placeholder-icon-color, var(--art-color-primary));
	opacity: 0.7;
}

.art-placeholder__label {
	font-family: var(--art-font-primary);
	font-size: var(--art-font-size-small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--art-color-text-muted);
}

/* Mood tints: one CSS variable feeds both the icon/frame accent color and
   a very faint background wash — declared twice (plain fallback, then
   color-mix() as a progressive enhancement) so an older engine still gets
   a sensible flat tint instead of an invalid/ignored rule. */
.art-placeholder--workshop {
	--art-placeholder-icon-color: var(--art-color-primary);
	background-color: var(--art-color-background-alt);
	background-color: color-mix(in srgb, var(--art-color-primary) 14%, var(--art-color-surface));
}

.art-placeholder--diagnostics {
	--art-placeholder-icon-color: var(--art-color-accent-hover);
	--art-placeholder-accent: var(--art-color-accent-hover);
	background-color: var(--art-color-background-alt);
	background-color: color-mix(in srgb, var(--art-color-accent) 16%, var(--art-color-surface));
}

.art-placeholder--fleet {
	--art-placeholder-icon-color: var(--art-color-secondary);
	background-color: var(--art-color-background-alt);
	background-color: color-mix(in srgb, var(--art-color-secondary) 10%, var(--art-color-surface));
}

.art-placeholder--mobility {
	--art-placeholder-icon-color: var(--art-color-primary);
	background-color: var(--art-color-background-alt);
	background-color: color-mix(in srgb, var(--art-color-primary) 14%, var(--art-color-surface));
}

.art-placeholder--team {
	--art-placeholder-icon-color: var(--art-color-secondary);
	background-color: var(--art-color-background-alt);
	background-color: color-mix(in srgb, var(--art-color-secondary) 10%, var(--art-color-surface));
}

.art-placeholder--parts {
	--art-placeholder-icon-color: var(--art-color-accent-hover);
	--art-placeholder-accent: var(--art-color-accent-hover);
	background-color: var(--art-color-background-alt);
	background-color: color-mix(in srgb, var(--art-color-accent) 16%, var(--art-color-surface));
}

.art-placeholder--generic {
	--art-placeholder-icon-color: var(--art-color-text-muted);
	background-color: var(--art-color-background-alt);
}

/* Inverse contexts (e.g. an editorial-dark hero) need the tint/frame to
   read against a dark background instead of the light surface above. */
.art-section--inverse .art-placeholder,
.art-page-hero--editorial-dark .art-placeholder {
	background-color: var(--art-color-surface-inverse);
}

.art-section--inverse .art-placeholder__label,
.art-page-hero--editorial-dark .art-placeholder__label {
	color: var(--art-color-text-inverse);
	opacity: 0.7;
}

/* ---- Empty-slot treatment (quiet) — art_empty_slot(), inc/components.php --
   A section that normally carries a real photo but has none configured yet
   keeps its frame's exact box — a flat surface tone, a thin icon, a small
   label, no grid texture / corner brackets / glow. Deliberately quieter than
   `.art-placeholder` above, which the owner found too decorative for an
   empty slot (reverted for the hero for that reason — see
   `art_render_hero()`). min-width:0 for the same reason as every other
   frame wrapper: it may sit in a flex/grid row that must let it shrink. */
.art-empty-slot {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--art-space-xs, 0.5rem);
	min-width: 0;
	overflow: hidden;
	border-radius: var(--art-radius-panel);
	background-color: var(--art-color-background-alt);
	box-shadow: inset 0 0 0 1px var(--art-hairline, var(--art-color-border));
}

.art-empty-slot__icon {
	width: 2rem;
	height: 2rem;
	color: var(--art-color-text-muted);
	opacity: 0.6;
}

.art-empty-slot__label {
	font-family: var(--art-font-primary);
	font-size: var(--art-font-size-small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--art-color-text-muted);
	opacity: 0.8;
}

.art-section--inverse .art-empty-slot,
.art-page-hero--editorial-dark .art-empty-slot {
	background-color: var(--art-color-surface-inverse);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}

.art-section--inverse .art-empty-slot__icon,
.art-section--inverse .art-empty-slot__label,
.art-page-hero--editorial-dark .art-empty-slot__icon,
.art-page-hero--editorial-dark .art-empty-slot__label {
	color: var(--art-color-text-inverse);
}
