/*
 * EU legal guarantee notice (functions/commerce/legal-guarantee.php) — the
 * trigger link under the add-to-cart form and the <dialog> with the official
 * notice. The ONE dialog ruleset: on the checkout takeover this file is
 * enqueued again under a handle OPC keeps (sisa-onepagecheckout-legal-
 * guarantee), the checkout trigger box lives in onepagecheckout-skin.css.
 */

/* Scroll lock while the dialog is open (no JS needed). */
html:has(.sisa-legal-guarantee__dialog[open]) { overflow: hidden; }

/* ---------- Trigger (product summary) ----------
   Flex order 6 = right after .ct-product-add-to-cart (single-product.css);
   without it the paragraph would sort to the top of the summary. */
.single-product .summary .sisa-legal-guarantee--product,
.single-product .entry-summary .sisa-legal-guarantee--product { order: 6; margin: 12px 0 0; }
.sisa-legal-guarantee__trigger {
	font-family: var(--sisa-body); font-size: 13px; line-height: 1.4; color: var(--sisa-text-2);
	text-decoration: underline; text-underline-offset: 2px;
}
.sisa-legal-guarantee__trigger:hover,
.sisa-legal-guarantee__trigger:focus-visible { color: var(--sisa-ink); }

/* ---------- Dialog ----------
   Up to 800px so the A4 notice keeps ~11px body text (an accordion in the
   ~400px summary column would shrink it to ~6px — not "legible at default
   display size"). Full screen on phones, pinch-zoom allowed. */
.sisa-legal-guarantee__dialog {
	width: calc(100% - 48px); max-width: 800px; max-height: calc(100dvh - 48px);
	margin: auto; padding: 0; border: 1px solid var(--sisa-hairline); border-radius: 0;
	background: var(--sisa-panel); color: var(--sisa-ink); overflow-y: auto;
	font-family: var(--sisa-body);
}
/* ::backdrop does not inherit custom properties in older engines — literal fallback. */
.sisa-legal-guarantee__dialog::backdrop { background: var(--sisa-veil, rgba(0, 0, 0, 0.45)); }
@media (max-width: 782px) {
	.sisa-legal-guarantee__dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; }
}
.sisa-legal-guarantee__inner { padding: 0 24px 24px; }
.sisa-legal-guarantee__header {
	position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px;
	padding: 20px 0 16px; background: var(--sisa-panel); border-bottom: 1px solid var(--sisa-hairline); margin-bottom: 20px;
}
.sisa-legal-guarantee__title { margin: 0; font-family: var(--sisa-display); font-size: 20px; font-weight: 700; letter-spacing: -.2px; color: var(--sisa-ink); }
/* Reset Blocksy's global button voice (yellow fill, uppercase, min-height) on the close ×. */
.sisa-legal-guarantee__close {
	appearance: none; min-height: 0; width: 36px; height: 36px; padding: 0; border: 1px solid var(--sisa-hairline); border-radius: 0;
	background: var(--sisa-panel); color: var(--sisa-ink); font-size: 24px; line-height: 1; font-weight: 400;
	text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer; flex: 0 0 auto;
}
.sisa-legal-guarantee__close:hover,
.sisa-legal-guarantee__close:focus-visible { background: var(--sisa-bg-input); color: var(--sisa-ink); }
/* The official notice: never recoloured, never cropped — it stays a white A4
   sheet in dark mode too (mix-blend would tint it). */
.sisa-legal-guarantee__notice { display: block; width: 100%; height: auto; background: #FFFFFF; }
.sisa-legal-guarantee__links {
	display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 20px 0 0; padding: 0; list-style: none;
	font-size: 13px; line-height: 1.5;
}
.sisa-legal-guarantee__links a { color: var(--sisa-ink); text-decoration: underline; text-underline-offset: 2px; }
.sisa-legal-guarantee__links a:hover { color: var(--sisa-text-2); }
