/* EU legal-guarantee notice: product/checkout line + dialog + page (inc/legal-guarantee.php). */

.ed-lg {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 1.4;
}
.ed-lg--checkout {
	margin: 0 0 14px;
}
.ed-lg__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #274C4F;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.ed-lg__link:hover,
.ed-lg__link:focus-visible {
	color: #192c27;
}
.ed-lg__link svg {
	flex: none;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ed-lg-dialog {
	width: min(820px, calc(100vw - 24px));
	max-width: none;
	max-height: calc(100dvh - 24px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #fff;
	color: #192c27;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}
.ed-lg-dialog[open] {
	display: flex;
	flex-direction: column;
}
.ed-lg-dialog::backdrop {
	background: rgba(25, 44, 39, 0.6);
}
html:has(.ed-lg-dialog[open]) {
	overflow: hidden;
}
.ed-lg-dialog__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px 10px 16px;
	border-bottom: 1px solid #E2EDEF;
}
.ed-lg-dialog__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
	color: #192c27;
}
.ed-lg-dialog__close {
	flex: none;
	width: 36px;
	height: 36px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #EEF4F5;
	color: #192c27;
	font-size: 24px;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
	box-shadow: none;
}
.ed-lg-dialog__close:hover,
.ed-lg-dialog__close:focus-visible {
	background: #E2EDEF;
}
.ed-lg-dialog__body {
	padding: 16px;
	overflow: auto;
	overscroll-behavior: contain;
}
.ed-lg-dialog__body img {
	display: block;
	width: 100%;
	height: auto;
}
.ed-lg-dialog__links {
	margin: 12px 0 0;
	font-size: 14px;
	text-align: center;
}
.ed-lg-dialog__links a {
	color: #274C4F;
	text-decoration: underline;
}

/* /garantie-legala/ page: keep the notice readable, not page-wide. */
.ed-lg-notice img {
	width: 100%;
	max-width: 820px;
	height: auto;
}

/* Phones: the EU guidelines want the notice "legible at default display
   size". Squeezed to ~350px its body text drops to ~7px, so keep it 640px
   wide (~12px text) and let the reader scroll it instead. */
@media (max-width: 680px) {
	.ed-lg-dialog__body img,
	.ed-lg-notice img {
		width: 640px;
		max-width: none;
	}
	/* Core gives centred image figures display:table (shrink-to-fit), which
	   cannot scroll — make it a plain block so overflow-x works. */
	figure.wp-block-image.ed-lg-notice {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}
