/* Global DPI stylesheet: shared design tokens + cross-widget utilities, loaded via get_style_depends whenever a DPI widget is on the page. */

/* On body, not :root: Elementor's --e-global-color-* live on body.elementor-kit-N, and custom properties don't inherit upward. */
body {
	--dpi-bg-dark: #0d0d0d;
	--dpi-fg-on-dark: var(--e-global-color-209c4f2, #ffffff);
	--dpi-lime: var(--e-global-color-text, #c9e94a);
	--dpi-lime-fg: var(--e-global-color-85decf9, #0a1855);
	--dpi-orange: var(--e-global-color-secondary, #ff6a1a);
	--dpi-orange-fg: var(--e-global-color-209c4f2, #ffffff);
	--dpi-blue: var(--e-global-color-accent, #1e3ae0);
	--dpi-blue-fg: var(--e-global-color-209c4f2, #ffffff);
	--dpi-dark: var(--e-global-color-83cd356, #121212);
	--dpi-black: var(--e-global-color-e124532, #000000);
	--dpi-light: var(--e-global-color-c9b06e9, #eeeeed);
	--dpi-muted: #8a8a8a;
	--dpi-radius: 4px;
	--dpi-gap: 20px;
	--dpi-max-width: 1200px;
	--dpi-font: var(--e-global-typography-primary-font-family, inherit);
}

/* Shared loading overlay for asynchronous Career and Saved grids. */
.dpi-grid-shell {
	position: relative;
	min-height: 300px;
}

.dpi-grid-loader {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.72);
	pointer-events: all;
}

.is-loading .dpi-grid-loader {
	display: flex;
}

.dpi-grid-loader__icon {
	width: 28px;
	height: 28px;
	border: 3px solid var(--dpi-blue);
	border-top-color: var(--dpi-orange);
	border-radius: 50%;
	animation: dpi-grid-loader-spin 0.8s linear infinite;
}

@keyframes dpi-grid-loader-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Pills – used by Hero, Intro Band and Hashtags. */

.dpi-pill {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	padding: 0 14px;
	border-radius: 0;
	background: var(--dpi-blue);
	color: var(--dpi-blue-fg);
	font-family: var(--dpi-font);
	font-size: 10.42px;
	font-weight: 700;
	line-height: 1em !important;
}

.dpi-pill--muted {
	background: transparent;
	border: 1px solid var(--dpi-muted);
	color: var(--dpi-muted);
}

.dpi-pill--hashtag {
	font-size: 14px;
}

.dpi-pill--hart {
	background: var(--dpi-orange);
	color: var(--dpi-orange-fg);
}

.dpi-pill--ehrlich {
	background: var(--dpi-lime);
	color: var(--dpi-lime-fg);
}

.dpi-pill--werte {
	background: var(--dpi-blue);
	color: var(--dpi-blue-fg);
}

/* Shared card-grid layout for every DPI grid widget (career, facts, benefits, honest). One .dpi-grid = a column of .dpi-grid__row rows; PHP chunks cards into rows via dpi_grid_rows() and colours them via dpi_grid_colors() (grid-colors.php). Card widths are thirds so a narrow card is always exactly one 3-column card wide, identical across every row type and widget. Below the breakpoint everything stacks full-width. */

.dpi-grid {
	display: flex;
	flex-direction: column;
	gap: var(--dpi-gap);
}

.dpi-grid__row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--dpi-gap);
}

.dpi-grid__row > * {
	flex: 1 1 100%;
	min-width: 0;
}

@media (min-width: 640px) {
	/* Narrow card = one 3-column card's width; wide card grows to fill the rest (= two thirds + one gap), so column edges line up across 70-30, 30-70 and three-column rows. */
	.dpi-grid__row--70-30 > :nth-child(2),
	.dpi-grid__row--30-70 > :nth-child(1),
	.dpi-grid__row--three > * {
		flex: 0 0 calc(33.333% - var(--dpi-gap) * 2 / 3);
	}

	.dpi-grid__row--70-30 > :nth-child(1),
	.dpi-grid__row--30-70 > :nth-child(2) {
		flex: 1 1 0;
	}

	/* The narrow card on the left of a 30-70 row reads right-aligned – kept from the old split-grid pattern. Widgets whose card content is absolutely positioned (e.g. career photo tiles) reset this on their own card. */
	.dpi-grid__row--30-70 > :nth-child(1) {
		align-items: flex-end;
		text-align: right;
	}
}

/* Explicit card colours – for grids that assign colour in PHP instead of by position (e.g. Facts, whose rotation depends on each box's 70/30 size + side, not just its index). */

.dpi-card--orange {
	background: var(--dpi-orange);
	color: var(--dpi-orange-fg);
}

.dpi-card--blue {
	background: var(--dpi-blue);
	color: var(--dpi-blue-fg);
}

.dpi-card--lime {
	background: var(--dpi-lime);
	color: var(--dpi-lime-fg);
}

/* Shared label/value typography for fact-style cards (Facts, Benefits, Honest). Widget-specific classes (e.g. .dpi-profile-facts__label) still exist alongside these for Elementor's own Style-tab typography controls per widget – equal specificity, so Elementor's generated CSS (enqueued after this stylesheet) wins when an admin sets an override. */

.dpi-fact-label {
	font-family: var(--dpi-font);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.03em;
	letter-spacing: 0.02em;
	text-wrap: balance;
	hyphens: auto;
	overflow-wrap: break-word;
}

.dpi-fact-value {
	font-family: var(--dpi-font);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.25;
	text-wrap: pretty;
	hyphens: auto;
	overflow-wrap: break-word;
}

/* Numeric value override – used by Facts only (Benefits/Honest have no numeric-vs-text distinction). */
.dpi-fact-value--number {
	font-size: 100px;
	font-weight: 800;
}

/* Shared empty-state panel for frontend content and editor fallbacks. */

.dpi-empty-state {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 180px;
	margin: 0;
	padding: 40px 32px;
	border: 0;
	border-radius: 0;
	background: var(--dpi-empty-state-background, var(--dpi-lime));
	color: var(--dpi-empty-state-color, var(--dpi-lime-fg));
	font-family: var(--dpi-font);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
}
