/* ==========================================================================
   ebg choose - ebg h08: photo half and an icon list. Port of Layout H08
   "Choose the Best" (container 0284381). A tinted panel (radius 12) inset
   15px from the page edges: an image block fills the left half (rounded on
   the outer corners); the right half (padding 120 / 15 / 120 / 120) holds
   the subtitle, the heading (48 / 54) and the list. Each item: a 90px dark
   circle with a white glyph (Lucide mask, by modifier), title 24 / 600 and
   a line, 23px above and below, dashed hairlines between. 1024 and below the photo
   is left out and the list takes the width.
   Icons: --voice (headset), --receipt (euro receipt), --key (key), --edit
   (pencil); add a modifier with its own --ebg-chl-icon for another.
   ========================================================================== */

@layer components {

	.ebg-chl {
		--ebg-chl-panel: var(--ebg-surface-3);
		--ebg-chl-circle: var(--ebg-ink-2);
		--ebg-chl-glyph: var(--ebg-surface-1);
		--ebg-chl-icon-size: 90px;

		margin-block: 0;
		padding: 30px 15px 0;
	}

	.ebg-chl .ebg-chl__panel {
		display: grid;
		grid-template-columns: 1fr 1fr;
		margin: 0;
		border-radius: 12px;
		background: var(--ebg-chl-panel);
		overflow: hidden;
	}

	.ebg-chl .ebg-chl__media {
		position: relative;
		margin: 0;
		min-block-size: 100%;
		img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
	}

	.ebg-chl .ebg-chl__body {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		margin: 0;
		padding: 120px 15px 120px 120px;
		> * { margin: 0; }
	}

	.ebg-chl .ebg-chl__sub { margin-block-end: 20px; }

	.ebg-chl .ebg-chl__title {
		max-inline-size: 500px;
		margin-block-end: 30px;
		font-family: var(--font-display);
		font-size: 3rem;
		font-weight: 500;
		line-height: 1.125;
		color: var(--ebg-heading-ink);
	}

	.ebg-chl .ebg-chl__list {
		display: flex;
		flex-direction: column;
		max-inline-size: 460px;
		margin: 0;
	}

	.ebg-chl .ebg-chl__item {
		position: relative;
		display: grid;
		grid-template-columns: var(--ebg-chl-icon-size) 1fr;
		column-gap: 15px;
		align-content: start;
		margin: 0;
		padding-block: 23px;
		border-block-end: 1px dashed color-mix(in srgb, var(--ebg-heading-ink) 14%, transparent);
		&:last-child { border-block-end: 0; }
		> * { grid-column: 2; margin: 0; }

		&::before {
			content: "";
			grid-column: 1;
			grid-row: 1 / span 2;
			inline-size: var(--ebg-chl-icon-size);
			aspect-ratio: 1;
			margin-block-start: 6px;
			border-radius: 50%;
			background: var(--ebg-chl-circle);
		}
		&::after {
			content: "";
			position: absolute;
			inset-block-start: calc(23px + 6px + var(--ebg-chl-icon-size) * 0.25);
			inset-inline-start: calc(var(--ebg-chl-icon-size) * 0.25);
			inline-size: calc(var(--ebg-chl-icon-size) * 0.5);
			aspect-ratio: 1;
			background: var(--ebg-chl-glyph);
			mask: var(--ebg-chl-icon) center / contain no-repeat;
		}

		&.ebg-chl__item--voice { --ebg-chl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z'/%3E%3Cpath d='M21 16v2a4 4 0 0 1-4 4h-5'/%3E%3C/svg%3E"); }
		&.ebg-chl__item--receipt { --ebg-chl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cpath d='M8 12h5M16 9.5a4 4 0 1 0 0 5.2'/%3E%3C/svg%3E"); }
		&.ebg-chl__item--key { --ebg-chl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z'/%3E%3Ccircle cx='16.5' cy='7.5' r='.5' fill='%23000'/%3E%3C/svg%3E"); }
		&.ebg-chl__item--wrench { --ebg-chl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E"); }
		&.ebg-chl__item--edit { --ebg-chl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z'/%3E%3Cpath d='m15 5 3 3'/%3E%3C/svg%3E"); }

		@media (prefers-reduced-motion: no-preference) {
			&:hover::before {
				border-color: var(--ebg-accent);
				box-shadow: 0 0 12px color-mix(in srgb, var(--ebg-accent) 30%, transparent);
			}
		}
	}

	.ebg-chl .ebg-chl__item-title {
		margin-block-end: 18px;
		font-family: var(--font-display);
		font-size: 1.5rem;
		font-weight: 600;
		line-height: 1.333;
		color: var(--ebg-heading-ink);
	}

	.ebg-chl .ebg-chl__desc {
		font-size: var(--text-base, 16px);
		line-height: 1.5;
		color: var(--ebg-ink-2);
	}

	/* Variant ebg-chl--deco (pattern-deco.php): no photo. The panel is one block
	   with background layers on its right (a line drawing of our own, assets/deco.svg,
	   over a very light gradient); the body is an .ebg-shell, so the content lines
	   up with the other sections. A container query drops the drawing where it
	   would start running into the text. */
	.ebg-chl--deco {
		--ebg-chl-deco: url("../../img/library/choose-h08/deco.svg") right center / auto 100% no-repeat;
		--ebg-chl-wash: linear-gradient(100deg, transparent 45%, color-mix(in srgb, var(--ebg-surface-anchor) 5%, transparent));

		--ebg-chl-sheen: linear-gradient(160deg, color-mix(in srgb, var(--ebg-surface-1) 45%, transparent), transparent 60%);

		container-type: inline-size;
	}

	.ebg-chl--deco .ebg-chl__panel {
		display: block;
		background: var(--ebg-chl-deco), var(--ebg-chl-wash), var(--ebg-chl-sheen), var(--ebg-chl-panel);
	}

	/* Line the text up with the other sections' .ebg-shell: the panel is inset
	   15px, so the shell is 30px narrower and its gutter 15px smaller (at least
	   20px inside the panel). (0,3,0) so the base and breakpoint paddings of
	   .ebg-chl__body do not override it. */
	.ebg-chl.ebg-chl--deco .ebg-chl__body {
		max-inline-size: calc(var(--container) - 30px);
		margin-inline: auto;
		padding-inline: max(calc(var(--gutter) - 15px), 20px);
	}

	.ebg-chl--deco .ebg-chl__body {
		display: block;
		padding-block: 120px;
		.ebg-chl__title { max-inline-size: none; }
		.ebg-chl__list { inline-size: fit-content; max-inline-size: 100%; }
	}

	/* Below a 1400 screen (content box 1370 = 1400 minus the 15px insets) the drawing and its wash would run too far into the text: keep the sheen. Owner relaxed it from 1440 (2026-11-12): some blending under the list ends is fine. */
	@container (width < 1370px) {
		.ebg-chl--deco .ebg-chl__panel { background: var(--ebg-chl-sheen), var(--ebg-chl-panel); }
	}

	@media (max-width: 1024px) {
		.ebg-chl { --ebg-chl-icon-size: 80px; }
		.ebg-chl .ebg-chl__panel { grid-template-columns: 1fr; }
		.ebg-chl .ebg-chl__media { display: none; }
		.ebg-chl .ebg-chl__body { padding: 60px 30px; }
		.ebg-chl .ebg-chl__title { max-inline-size: none; font-size: 2.5rem; }
		.ebg-chl .ebg-chl__list { max-inline-size: none; }
		.ebg-chl .ebg-chl__item-title { margin-block-end: 10px; font-size: 1.125rem; }
	}

	@media (max-width: 767px) {
		.ebg-chl { --ebg-chl-icon-size: 64px; }
		.ebg-chl .ebg-chl__body { padding: 50px 20px; }
		.ebg-chl .ebg-chl__title { font-size: 1.875rem; }
	}
}
