/* Woo Cookie Banner — colours come from the settings as CSS variables on :root. */

:root {
	--wcb-accent: #E0561F;
	--wcb-accent-text: #FFFFFF;
	--wcb-bg: #FFFFFF;
	--wcb-text: #1A1A1A;
	--wcb-border: rgba(0, 0, 0, 0.12);
	--wcb-muted: color-mix(in srgb, var(--wcb-text) 75%, var(--wcb-bg));
	--wcb-tint: color-mix(in srgb, var(--wcb-accent) 10%, var(--wcb-bg));
	--wcb-bar-height: 0px;
}

/* Leave room under the page so the bar never hides the last content (e.g. "Place order"). */
html.wcb-has-bar body {
	padding-bottom: var(--wcb-bar-height) !important;
}

html.wcb-locked,
html.wcb-locked body {
	overflow: hidden;
}

.wcb,
.wcb *,
.wcb *::before,
.wcb *::after {
	box-sizing: border-box;
}

.wcb [hidden],
.wcb[hidden] {
	display: none !important;
}

.wcb {
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--wcb-text);
}

.wcb-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Titles, text, links ---------- */

.wcb .wcb-title {
	margin: 0 0 0.5em;
	padding: 0;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wcb-text);
	border: 0;
}

.wcb .wcb-title:focus {
	outline: none;
}

.wcb .wcb-title:focus-visible {
	outline: 2px solid var(--wcb-accent);
	outline-offset: 4px;
}

.wcb .wcb-text,
.wcb .wcb-text p {
	margin: 0 0 0.5em;
	font-size: 0.9rem;
	color: var(--wcb-text);
}

.wcb .wcb-text p:last-child {
	margin-bottom: 0;
}

/* Text colour + accent underline: keeps a 4.5:1 contrast for the link text. */
.wcb a,
.wcb a:visited {
	color: var(--wcb-text);
	text-decoration: underline;
	text-decoration-color: var(--wcb-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.wcb a:hover {
	color: var(--wcb-accent);
}

.wcb a:focus-visible,
.wcb button:focus-visible,
.wcb input:focus-visible,
.wcb-open-settings:focus-visible {
	outline: 2px solid var(--wcb-accent);
	outline-offset: 2px;
}

.wcb-icon {
	display: block;
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
}

/* ---------- Buttons: the three choices always look identical ---------- */

.wcb .wcb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 0.6em 1.2em;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: center;
	white-space: normal;
	color: var(--wcb-text);
	background: var(--wcb-bg);
	border: 2px solid var(--wcb-accent);
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wcb .wcb-btn:hover,
.wcb .wcb-btn:focus-visible {
	color: var(--wcb-text);
	background: var(--wcb-tint);
}

.wcb .wcb-btn--filled {
	color: var(--wcb-accent-text);
	background: var(--wcb-accent);
}

.wcb .wcb-btn--filled:hover,
.wcb .wcb-btn--filled:focus-visible {
	color: var(--wcb-accent-text);
	background: color-mix(in srgb, var(--wcb-accent) 85%, #000);
}

.wcb .wcb-actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

/* ---------- Banner ---------- */

.wcb-banner {
	position: fixed;
	z-index: 2147483000;
	color: var(--wcb-text);
	background: var(--wcb-bg);
}

.wcb--bar .wcb-banner {
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 85vh;
	overflow-y: auto;
	border-top: 1px solid var(--wcb-border);
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
}

.wcb-banner__inner {
	display: flex;
	align-items: center;
	gap: 1.25rem 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;
}

.wcb-banner__icon {
	color: var(--wcb-accent);
	align-self: flex-start;
}

.wcb-banner__icon .wcb-icon {
	width: 36px;
	height: 36px;
}

.wcb-banner__content {
	flex: 1 1 auto;
	min-width: 0;
}

.wcb--bar .wcb-banner .wcb-actions {
	flex: 0 0 auto;
	width: min(100%, 540px);
}

/* Centred window */
.wcb--modal .wcb-banner {
	top: 50%;
	left: 50%;
	width: min(560px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	transform: translate(-50%, -50%);
	border: 1px solid var(--wcb-border);
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
}

.wcb--modal .wcb-banner__inner {
	flex-direction: column;
	align-items: stretch;
	padding: 2rem;
}

.wcb--modal .wcb-banner__icon {
	align-self: flex-start;
}

.wcb-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2147482999;
	background: rgba(0, 0, 0, 0.45);
}

/* ---------- Settings dialog ---------- */

.wcb-prefs {
	position: fixed;
	z-index: 2147483001;
	top: 50%;
	left: 50%;
	display: flex;
	flex-direction: column;
	width: min(640px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	color: var(--wcb-text);
	background: var(--wcb-bg);
	border: 1px solid var(--wcb-border);
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
	transform: translate(-50%, -50%);
}

.wcb-prefs__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--wcb-border);
}

.wcb-prefs__header .wcb-title {
	margin: 0;
}

.wcb .wcb-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -10px -10px -10px 0;
	padding: 0;
	color: var(--wcb-text);
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}

.wcb .wcb-close:hover {
	color: var(--wcb-accent);
	background: transparent;
}

.wcb-prefs__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 1.25rem 1.5rem;
}

.wcb .wcb-cats {
	margin: 1rem 0;
	padding: 0;
	list-style: none;
}

.wcb .wcb-cat {
	margin: 0;
	padding: 1rem 0;
	list-style: none;
	border-top: 1px solid var(--wcb-border);
}

.wcb .wcb-cat:last-child {
	border-bottom: 1px solid var(--wcb-border);
}

.wcb-cat__head {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.wcb .wcb-cat__label {
	flex: 1 1 auto;
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}

.wcb .wcb-cat__desc {
	margin: 0.4rem 0 0;
	font-size: 0.875rem;
	color: var(--wcb-muted);
}

.wcb-cat__always {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.8rem;
	color: var(--wcb-muted);
}

.wcb-cat__always .wcb-icon {
	width: 16px;
	height: 16px;
	color: var(--wcb-accent);
}

/* Switch (a real checkbox with role="switch") */
.wcb .wcb-switch {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 48px;
	height: 28px;
	margin: 0;
	background: var(--wcb-bg);
	border: 2px solid color-mix(in srgb, var(--wcb-text) 55%, var(--wcb-bg));
	border-radius: 14px;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wcb .wcb-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: color-mix(in srgb, var(--wcb-text) 55%, var(--wcb-bg));
	border-radius: 50%;
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.wcb .wcb-switch:checked {
	background: var(--wcb-accent);
	border-color: var(--wcb-accent);
}

.wcb .wcb-switch:checked::after {
	background: #fff;
	transform: translateX(20px);
}

.wcb .wcb-switch:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

/* Necessary: show the state text, hide the disabled switch from sight (still announced). */
.wcb .wcb-cat__always + .wcb-switch {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.wcb-prefs__footer {
	padding: 1rem 1.5rem 1.25rem;
	border-top: 1px solid var(--wcb-border);
}

/* ---------- Reopen controls ---------- */

.wcb-footer-link {
	padding: 1rem;
	text-align: center;
	background: var(--wcb-bg);
}

.wcb-link-button,
.wcb-link-button:hover,
.wcb-link-button:focus {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	font-size: 0.875rem;
	color: var(--wcb-text);
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-decoration: underline;
	text-decoration-color: var(--wcb-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	cursor: pointer;
}

.wcb-link-button:focus-visible {
	outline: 2px solid var(--wcb-accent);
	outline-offset: 2px;
}

.wcb-floating,
.wcb-floating:hover,
.wcb-floating:focus {
	position: fixed;
	z-index: 2147482990;
	left: 1rem;
	bottom: calc(1rem + var(--wcb-bar-height));
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	color: var(--wcb-accent);
	background: var(--wcb-bg);
	border: 1px solid var(--wcb-border);
	border-radius: 50%;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	cursor: pointer;
}

.wcb-floating:focus-visible {
	outline: 2px solid var(--wcb-accent);
	outline-offset: 2px;
}

html.wcb-has-bar .wcb-floating {
	display: none;
}

/* Language switchers (GTranslate…) above the banner and the backdrop, so visitors can
   read the banner in their own language before choosing. */
.wcb-keep-visible {
	z-index: 2147483002 !important;
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
	.wcb--bar .wcb-banner__inner {
		flex-wrap: wrap;
	}

	.wcb--bar .wcb-banner .wcb-actions {
		width: 100%;
	}
}

@media (max-width: 600px) {
	.wcb-banner__inner,
	.wcb--modal .wcb-banner__inner {
		padding: 1rem;
		gap: 0.75rem;
	}

	.wcb-banner__icon {
		display: none;
	}

	.wcb .wcb-actions {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.wcb-prefs {
		top: auto;
		bottom: 0;
		left: 0;
		width: 100%;
		max-height: 92vh;
		transform: none;
	}

	.wcb-prefs__header,
	.wcb-prefs__body,
	.wcb-prefs__footer {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	/* Storefront's handheld footer bar sits at the bottom on phones. */
	.wcb-floating,
	.wcb-floating:hover,
	.wcb-floating:focus {
		bottom: calc(5rem + var(--wcb-bar-height));
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcb *,
	.wcb *::before,
	.wcb *::after {
		transition: none !important;
	}
}

@media print {
	.wcb,
	.wcb-footer-link,
	.wcb-floating {
		display: none !important;
	}
}
