/* AlfaStrada consent banner (T2a). Tokens from the child theme (assets/css/tokens.css); fallbacks for pages without them. */
.as-consent {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 180;
	font-family: var(--as-font-body, 'DM Sans', system-ui, sans-serif); font-size: var(--as-fs-sm, 15px); line-height: 1.4; color: var(--as-ink, #1a1a1a);
	background: var(--as-bg, #fff); border-top: 1px solid var(--as-line, #e5e5e5); box-shadow: var(--as-shadow-bar, 0 -4px 12px rgba(0, 0, 0, .06));
	padding-bottom: env(safe-area-inset-bottom);
	transform: translateY(100%); opacity: 0;
	transition: transform var(--as-dur-base, 220ms), opacity var(--as-dur-base, 220ms);
}
.as-consent[hidden] { display: none; }
.as-consent.is-on { transform: none; opacity: 1; }
/* Mobile (T2a2): compact, max ~110 px: the sentence on top, below it the two buttons with "Instellingen / Privacy" stacked next to them on the same row. */
.as-consent__bar { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'text text' 'actions links'; align-items: center; gap: 6px var(--as-sp-3, 12px); padding: 8px var(--as-gutter, 16px); }
.as-consent__text { grid-area: text; margin: 0; font-size: var(--as-fs-xs, 14px); line-height: 1.3; }
.as-consent__actions { grid-area: actions; display: grid; grid-template-columns: 1fr 1fr; gap: var(--as-sp-2, 8px); }
.as-consent__btn {
	min-height: var(--as-tap, 44px); padding: 0 var(--as-sp-4, 16px); box-sizing: border-box;
	font: 600 var(--as-fs-base, 16px)/1 var(--as-font-body, 'DM Sans', system-ui, sans-serif);
	border-radius: var(--as-radius-soft, 8px); cursor: pointer; border: 1px solid transparent;
}
.as-consent__btn--accept { background: var(--as-red, #dd060b); color: #fff; border-color: var(--as-red, #dd060b); }
.as-consent__btn--accept:hover { background: var(--as-red-dark, #b00509); border-color: var(--as-red-dark, #b00509); }
.as-consent__btn--reject { background: var(--as-bg, #fff); color: var(--as-ink, #1a1a1a); border-color: var(--as-muted, #666); }
.as-consent__btn--reject:hover { background: var(--as-bg-soft, #f5f5f4); }
.as-consent__btn:focus-visible, .as-consent__link:focus-visible, .as-consent__switch:focus-visible { outline: 2px solid var(--as-red, #dd060b); outline-offset: 2px; }
.as-consent__links { grid-area: links; margin: 0; display: flex; flex-direction: column; align-items: flex-start; font-size: var(--as-fs-xs, 14px); }
.as-consent__link { appearance: none; background: none; border: 0; padding: 4px 0; margin: 0; font: inherit; line-height: 1.2; color: var(--as-muted, #666); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.as-consent__link:hover { color: var(--as-ink, #1a1a1a); }

.as-consent__panel { display: grid; gap: var(--as-sp-2, 8px); padding: 0 var(--as-gutter, 16px) var(--as-sp-3, 12px); border-top: 1px solid var(--as-line, #e5e5e5); }
.as-consent__panel[hidden] { display: none; }
.as-consent__paneltitle { margin: var(--as-sp-3, 12px) 0 0; font-weight: 600; }
.as-consent__row { display: flex; align-items: center; justify-content: space-between; gap: var(--as-sp-4, 16px); cursor: pointer; }
.as-consent__rowtext { display: grid; gap: 2px; font-size: var(--as-fs-xs, 14px); color: var(--as-muted, #666); }
.as-consent__rowtext strong { font-size: var(--as-fs-sm, 15px); color: var(--as-ink, #1a1a1a); }
.as-consent__switch {
	appearance: none; flex: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: var(--as-radius-pill, 999px);
	background: var(--as-line-2, #ccc); cursor: pointer; transition: background var(--as-dur-fast, 150ms);
}
.as-consent__switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform var(--as-dur-fast, 150ms); }
.as-consent__switch:checked { background: var(--as-red, #dd060b); }
.as-consent__switch:checked::after { transform: translateX(18px); }
.as-consent__switch:disabled { opacity: .55; cursor: default; }
.as-consent__save { justify-self: stretch; }

/* From 640 px: a narrow bar in the bottom left, max 720 px; buttons side by side to the right of the text */
@media (min-width: 640px) {
	.as-consent { left: var(--as-gutter-d, 24px); right: auto; bottom: var(--as-gutter-d, 24px); width: min(720px, calc(100vw - 2 * var(--as-gutter-d, 24px))); border: 1px solid var(--as-line, #e5e5e5); border-radius: var(--as-radius-soft, 8px); box-shadow: var(--as-shadow-overlay, 0 8px 24px rgba(0, 0, 0, .10)); padding-bottom: 0; }
	.as-consent__bar { grid-template-columns: 1fr auto; grid-template-areas: 'text actions' 'links actions'; align-items: center; gap: var(--as-sp-2, 8px) var(--as-sp-5, 24px); padding: var(--as-sp-4, 16px) var(--as-sp-5, 24px); }
	.as-consent__text { font-size: var(--as-fs-sm, 15px); line-height: 1.4; }
	.as-consent__links { flex-direction: row; gap: var(--as-sp-4, 16px); }
	.as-consent__link { padding: 0; line-height: inherit; }
	.as-consent__actions { grid-area: actions; grid-template-columns: 130px 130px; }
	.as-consent__panel { padding: 0 var(--as-sp-5, 24px) var(--as-sp-4, 16px); }
	.as-consent__save { justify-self: end; min-width: 130px; }
}

/* Make room: the fixed cart bar on a product page sits above the banner, and the page can scroll clear of it. */
html.as-consent-on .as-buybar { bottom: var(--as-consent-h, 0px); }
html.as-consent-on body { padding-bottom: var(--as-consent-h, 0px); }

/* The footer link */
.as-footer__cookie { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--as-on-dark-2, #b3b3b3); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.as-footer__cookie:hover { color: var(--as-on-dark, #f2f2f2); }

@media (prefers-reduced-motion: reduce) { .as-consent, .as-consent__switch, .as-consent__switch::after { transition: none; } }
