/* GDPR module: request form, confirmation page and cookie banner.
   Everything is scoped to .gdpr-* so it cannot leak into the store theme.
   The accent colour comes from the --gdpr-accent variable (set in the module settings). */

.gdpr-wrap,
.gdpr-banner,
.gdpr-modal,
.gdpr-reopen {
	--gdpr-accent: #4f46e5;
	--gdpr-ink: #1c1f26;
	--gdpr-muted: #5b6472;
	--gdpr-line: #dfe3ea;
	--gdpr-surface: #ffffff;
	--gdpr-danger: #c62828;
	--gdpr-ok: #177245;
	--gdpr-soft: #eef0fd;
	--gdpr-ring: rgba(79, 70, 229, .22);
}

@supports (color: color-mix(in srgb, red 10%, white)) {
	.gdpr-wrap,
	.gdpr-banner,
	.gdpr-modal,
	.gdpr-reopen {
		--gdpr-soft: color-mix(in srgb, var(--gdpr-accent) 8%, #ffffff);
		--gdpr-ring: color-mix(in srgb, var(--gdpr-accent) 24%, transparent);
	}
}

.gdpr-wrap *,
.gdpr-wrap *::before,
.gdpr-wrap *::after,
.gdpr-banner *,
.gdpr-banner *::before,
.gdpr-banner *::after,
.gdpr-modal,
.gdpr-modal *,
.gdpr-modal *::before,
.gdpr-modal *::after {
	box-sizing: border-box;
}

.gdpr-wrap {
	margin: 0 0 32px;
	color: var(--gdpr-ink);
	font-size: 15px;
	line-height: 1.55;
}

.gdpr-wrap[hidden],
.gdpr-wrap [hidden],
.gdpr-banner[hidden],
.gdpr-modal[hidden],
.gdpr-reopen[hidden] {
	display: none !important;
}

/* ---------------------------------------------------------------- card */

.gdpr-card {
	width: 100%;
	max-width: none;
	padding: 28px;
	background: var(--gdpr-surface);
	border: 1px solid var(--gdpr-line);
	border-radius: 18px;
	box-shadow: 0 18px 40px -24px rgba(28, 31, 38, .35);
}

.gdpr-head {
	display: flex;
	gap: 20px;
	align-items: center;
	margin-bottom: 30px;
	padding: 30px 32px;
	border-radius: 18px;
	background: var(--gdpr-accent);
	color: #fff;
}

.gdpr-badge {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
	background: rgba(255, 255, 255, .18);
	color: #fff;
}

.gdpr-badge svg {
	width: 30px;
	height: 30px;
}

.gdpr-wrap .gdpr-title {
	margin: 0 0 6px;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.01em;
	color: #fff;
}

.gdpr-wrap .gdpr-intro {
	margin: 0;
	max-width: 80ch;
	color: #fff;
}

/* ------------------------------------------------------------- groups */

.gdpr-group {
	min-width: 0;
	margin: 0 0 26px;
	padding: 0 6px;
	border: 0;
}

.gdpr-legend {
	display: block;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	font-size: 17px;
	font-weight: 600;
	color: var(--gdpr-ink);
}

/* -------------------------------------------------------- type picker */

.gdpr-types {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.gdpr-wrap label.gdpr-type {
	position: relative;
	display: block;
	margin: 0;
	font-weight: inherit;
	max-width: none;
	cursor: pointer;
}

.gdpr-type input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.gdpr-type-body {
	position: relative;
	display: flex;
	gap: 14px;
	align-items: flex-start;
	height: 100%;
	padding: 16px 44px 16px 16px;
	background: var(--gdpr-surface);
	border: 1.5px solid var(--gdpr-line);
	border-radius: 12px;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.gdpr-type:hover .gdpr-type-body {
	border-color: #b9c0cc;
}

.gdpr-type-icon {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: var(--gdpr-soft);
	color: var(--gdpr-accent);
	transition: background-color .15s ease, color .15s ease;
}

.gdpr-type-icon svg {
	width: 21px;
	height: 21px;
}

.gdpr-type-text {
	display: block;
	min-width: 0;
}

.gdpr-type-text strong {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.gdpr-type-text small {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--gdpr-muted);
}

.gdpr-type-check {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--gdpr-accent);
	color: #fff;
	opacity: 0;
	transform: scale(.5);
	transition: opacity .15s ease, transform .2s cubic-bezier(.34, 1.56, .64, 1);
}

.gdpr-type-check svg {
	width: 13px;
	height: 13px;
}

.gdpr-type input:checked + .gdpr-type-body {
	border-color: var(--gdpr-accent);
	background: var(--gdpr-soft);
	box-shadow: 0 0 0 3px var(--gdpr-ring);
}

.gdpr-type input:checked + .gdpr-type-body .gdpr-type-icon {
	background: var(--gdpr-accent);
	color: #fff;
}

.gdpr-type input:checked + .gdpr-type-body .gdpr-type-check {
	opacity: 1;
	transform: scale(1);
}

.gdpr-type input:focus-visible + .gdpr-type-body {
	outline: 2px solid var(--gdpr-accent);
	outline-offset: 2px;
}

/* ------------------------------------------------------------- fields */

.gdpr-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 16px;
}

.gdpr-field {
	position: relative;
	margin-bottom: 16px;
}

.gdpr-field input,
.gdpr-field textarea {
	display: block;
	width: 100%;
	height: 58px;
	margin: 0;
	padding: 24px 15px 8px;
	background: var(--gdpr-surface);
	border: 1.5px solid var(--gdpr-line);
	border-radius: 10px;
	box-shadow: none;
	color: var(--gdpr-ink);
	font: inherit;
	font-size: 15px;
	line-height: 1.3;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.gdpr-field textarea {
	height: auto;
	min-height: 128px;
	padding-top: 28px;
	resize: vertical;
}

.gdpr-field input:focus,
.gdpr-field textarea:focus {
	border-color: var(--gdpr-accent);
	box-shadow: 0 0 0 3px var(--gdpr-ring);
}

.gdpr-field input[readonly] {
	background: #f5f6f8;
	color: var(--gdpr-muted);
}

.gdpr-wrap .gdpr-field label {
	position: absolute;
	top: 18px;
	left: 16px;
	right: 16px;
	margin: 0;
	max-width: none;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 15px;
	font-weight: 400;
	color: var(--gdpr-muted);
	pointer-events: none;
	transform-origin: left top;
	transition: transform .15s ease, color .15s ease;
}

.gdpr-field input:focus ~ label,
.gdpr-field input:not(:placeholder-shown) ~ label,
.gdpr-field textarea:focus ~ label,
.gdpr-field textarea:not(:placeholder-shown) ~ label {
	transform: translateY(-11px) scale(.8);
}

.gdpr-field input:focus ~ label,
.gdpr-field textarea:focus ~ label {
	color: var(--gdpr-accent);
}

.gdpr-hint {
	margin-top: 6px;
	font-size: 13px;
	color: var(--gdpr-muted);
}

/* ------------------------------------------------------------- errors */

.gdpr-error {
	margin: 6px 2px 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--gdpr-danger);
}

.gdpr-error:empty {
	display: none;
}

.gdpr-field.has-error input,
.gdpr-field.has-error textarea {
	border-color: var(--gdpr-danger);
}

.gdpr-field.has-error input:focus,
.gdpr-field.has-error textarea:focus {
	box-shadow: 0 0 0 3px rgba(198, 40, 40, .18);
}

.gdpr-group.has-error .gdpr-type-body {
	border-color: var(--gdpr-danger);
}

.gdpr-alert {
	margin: 0 0 20px;
	padding: 12px 16px;
	border: 1px solid #f1c4c4;
	border-radius: 10px;
	background: #fdf0f0;
	color: #8e1b1b;
	font-size: 14px;
}

/* ----------------------------------------------------------- consent */

.gdpr-wrap .gdpr-consent label {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0;
	max-width: none;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.5;
	color: var(--gdpr-ink);
	cursor: pointer;
}

.gdpr-consent input {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--gdpr-accent);
	cursor: pointer;
}

.gdpr-consent a {
	color: var(--gdpr-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* honeypot: invisible to people, tempting to bots */
.gdpr-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ----------------------------------------------------------- buttons */

.gdpr-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 20px;
	align-items: center;
}

.gdpr-note {
	flex: 1 1 240px;
	margin: 0;
	font-size: 13px;
	color: var(--gdpr-muted);
}

.gdpr-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 28px;
	border: 1.5px solid var(--gdpr-accent);
	border-radius: 10px;
	background: var(--gdpr-accent);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease, transform .1s ease;
}

.gdpr-btn:hover {
	filter: brightness(1.08);
	color: #fff;
	text-decoration: none;
}

.gdpr-btn:active {
	transform: translateY(1px);
}

.gdpr-btn:focus-visible {
	outline: 2px solid var(--gdpr-accent);
	outline-offset: 3px;
}

.gdpr-btn.is-loading {
	pointer-events: none;
	opacity: .85;
}

.gdpr-btn.is-loading::before {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: gdpr-spin .7s linear infinite;
}

.gdpr-btn-ghost {
	background: transparent;
	color: var(--gdpr-ink);
	border-color: var(--gdpr-line);
}

.gdpr-btn-ghost:hover {
	background: #f5f6f8;
	color: var(--gdpr-ink);
	filter: none;
}

@keyframes gdpr-spin {
	to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------- success */

.gdpr-success,
.gdpr-result {
	padding: 24px 8px 8px;
	text-align: center;
}

.gdpr-result {
	max-width: 520px;
	margin: 0 auto;
}

.gdpr-success:focus {
	outline: 0;
}

.gdpr-success-icon {
	width: 68px;
	height: 68px;
	margin: 0 auto 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--gdpr-ok);
	color: #fff;
	animation: gdpr-pop .45s cubic-bezier(.34, 1.56, .64, 1) both;
}

.gdpr-success-icon.is-bad {
	background: var(--gdpr-danger);
}

.gdpr-success-icon svg {
	width: 34px;
	height: 34px;
}

.gdpr-success-icon path {
	stroke-dasharray: 30;
	stroke-dashoffset: 30;
	animation: gdpr-draw .4s .2s ease forwards;
}

.gdpr-success-title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
	color: var(--gdpr-ink);
}

.gdpr-success-text {
	max-width: 46ch;
	margin: 0 auto 22px;
	color: var(--gdpr-muted);
}

@keyframes gdpr-pop {
	from { transform: scale(.4); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

@keyframes gdpr-draw {
	to { stroke-dashoffset: 0; }
}

/* ------------------------------------------------------- cookie banner */

.gdpr-banner {
	position: fixed;
	z-index: 99990;
	bottom: 20px;
	width: 420px;
	max-width: calc(100% - 24px);
	padding: 22px;
	background: var(--gdpr-surface);
	border: 1px solid var(--gdpr-line);
	border-radius: 18px;
	box-shadow: 0 24px 60px -20px rgba(28, 31, 38, .45);
	color: var(--gdpr-ink);
	font-size: 14px;
	line-height: 1.55;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .25s ease, transform .25s ease;
}

.gdpr-banner.is-visible {
	opacity: 1;
	transform: none;
}

.gdpr-banner.gdpr-pos-left { left: 20px; }
.gdpr-banner.gdpr-pos-right { right: 20px; }

.gdpr-banner.gdpr-pos-center {
	left: 50%;
	width: 680px;
	margin-left: -340px;
}

.gdpr-banner-head {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 8px;
	font-size: 16px;
}

.gdpr-banner-icon {
	display: flex;
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	border-radius: 9px;
	background: var(--gdpr-accent);
	color: #fff;
}

.gdpr-banner-icon svg {
	width: 19px;
	height: 19px;
}

.gdpr-banner-text {
	margin: 0 0 10px;
	color: var(--gdpr-muted);
}

.gdpr-banner-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0 0 16px;
	font-size: 13px;
}

.gdpr-banner-links a {
	color: var(--gdpr-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.gdpr-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.gdpr-banner-actions .gdpr-btn {
	flex: 1 1 140px;
	min-height: 44px;
	padding: 0 16px;
	font-size: 14px;
}

.gdpr-reopen {
	position: fixed;
	z-index: 99980;
	bottom: 16px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: var(--gdpr-surface);
	border: 1px solid var(--gdpr-line);
	border-radius: 50%;
	box-shadow: 0 8px 22px -8px rgba(28, 31, 38, .4);
	color: var(--gdpr-accent);
	cursor: pointer;
	transition: transform .15s ease;
}

.gdpr-reopen:hover { transform: scale(1.06); }
.gdpr-reopen:focus-visible { outline: 2px solid var(--gdpr-accent); outline-offset: 3px; }
.gdpr-reopen svg { width: 22px; height: 22px; }
.gdpr-reopen.gdpr-pos-left,
.gdpr-reopen.gdpr-pos-center { left: 16px; }
.gdpr-reopen.gdpr-pos-right { right: 16px; }

/* ----------------------------------------------------- cookie settings */

.gdpr-link-btn {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 13px;
	color: var(--gdpr-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

html.gdpr-modal-open {
	overflow: hidden;
}

.gdpr-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(28, 31, 38, .5);
	color: var(--gdpr-ink);
	font-size: 14px;
	line-height: 1.55;
	opacity: 0;
	transition: opacity .2s ease;
}

.gdpr-modal.is-visible {
	opacity: 1;
}

.gdpr-modal-panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 580px;
	max-height: calc(100vh - 32px);
	background: var(--gdpr-surface);
	border-radius: 18px;
	box-shadow: 0 30px 70px -20px rgba(28, 31, 38, .55);
	outline: 0;
	transform: translateY(14px);
	transition: transform .2s ease;
}

.gdpr-modal.is-visible .gdpr-modal-panel {
	transform: none;
}

.gdpr-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px 18px 24px;
	border-bottom: 1px solid var(--gdpr-line);
	font-size: 18px;
}

.gdpr-modal-close {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--gdpr-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.gdpr-modal-close:hover {
	background: #f1f2f5;
	color: var(--gdpr-ink);
}

.gdpr-modal-body {
	overflow-y: auto;
	padding: 4px 24px;
}

.gdpr-cat {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 18px 0;
	border-bottom: 1px solid var(--gdpr-line);
}

.gdpr-cat:last-child {
	border-bottom: 0;
}

.gdpr-cat-text strong {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
}

.gdpr-cat-text p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--gdpr-muted);
}

.gdpr-modal .gdpr-switch {
	position: relative;
	flex: 0 0 46px;
	width: 46px;
	height: 26px;
	margin: 2px 0 0;
	cursor: pointer;
}

.gdpr-switch input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.gdpr-switch input:disabled {
	cursor: not-allowed;
}

.gdpr-switch-track {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 13px;
	background: #c5cbd5;
	transition: background-color .2s ease;
}

.gdpr-switch-track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .2s ease;
}

.gdpr-switch input:checked + .gdpr-switch-track {
	background: var(--gdpr-accent);
}

.gdpr-switch input:checked + .gdpr-switch-track::after {
	transform: translateX(20px);
}

.gdpr-switch input:disabled + .gdpr-switch-track {
	opacity: .55;
}

.gdpr-switch input:focus-visible + .gdpr-switch-track {
	outline: 2px solid var(--gdpr-accent);
	outline-offset: 2px;
}

.gdpr-modal-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	padding: 16px 24px 20px;
	border-top: 1px solid var(--gdpr-line);
}

.gdpr-modal-foot .gdpr-btn {
	flex: 1 1 160px;
	min-height: 44px;
	padding: 0 18px;
	font-size: 14px;
}

/* ------------------------------------------------------------ mobile */

@media (max-width: 720px) {
	.gdpr-card { padding: 14px; border-radius: 16px; }
	.gdpr-head { gap: 14px; margin-bottom: 22px; padding: 20px 18px; border-radius: 14px; align-items: flex-start; }
	.gdpr-badge { flex-basis: 44px; width: 44px; height: 44px; border-radius: 12px; }
	.gdpr-wrap .gdpr-title { font-size: 22px; }
	.gdpr-types,
	.gdpr-row { grid-template-columns: minmax(0, 1fr); }
	.gdpr-btn { width: 100%; }
	.gdpr-banner-actions .gdpr-btn { width: auto; }

	.gdpr-banner.gdpr-pos-left,
	.gdpr-banner.gdpr-pos-right,
	.gdpr-banner.gdpr-pos-center {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gdpr-wrap *,
	.gdpr-banner,
	.gdpr-reopen {
		animation: none !important;
		transition: none !important;
	}

	.gdpr-success-icon path {
		stroke-dashoffset: 0;
	}
}
