/**
 * Halk Cookie Widget — frontend styles
 * Brand: #0018A8 · Accent: #F48139 · Font: Inter
 */

.elementor-widget-halk-cookie {
	width: 100% !important;
	max-width: none !important;
}

.elementor-widget-halk-cookie > .elementor-widget-container {
	width: 100%;
	max-width: none;
	padding: 0 !important;
}

.halk-cookie {
	--halk-cookie-brand: #0018a8;
	--halk-cookie-accent: #f48139;
	--halk-cookie-max: 820px;
	--halk-cookie-emblem-opacity: 0.12;
	--halk-cookie-parallax: 90px;
	--halk-cookie-emblem-size: 560px;
	--halk-cookie-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--halk-cookie-text: #0b1638;
	--halk-cookie-muted: #4a5878;
	--halk-cookie-line: rgba(0, 24, 168, 0.12);
	--halk-cookie-surface: rgba(255, 255, 255, 0.72);
	--halk-cookie-surface-open: #ffffff;
	--halk-cookie-bg-1: #eef2ff;
	--halk-cookie-bg-2: #f7f9ff;
	--halk-cookie-bg-3: #ffffff;
	--halk-cookie-edge-fade: 18%;

	position: relative;
	isolation: isolate;
	overflow: hidden;
	width: 100%;
	font-family: var(--halk-cookie-font);
	color: var(--halk-cookie-text);
	/* Page-white base so left/right edges dissolve into the site background */
	background: #ffffff;
	padding: clamp(56px, 8vw, 112px) 0;
	box-sizing: border-box;
}

/* Keep Inter on all policy copy even if the theme overrides headings/buttons */
.halk-cookie__title,
.halk-cookie__intro,
.halk-cookie__meta,
.halk-cookie__updated,
.halk-cookie__question,
.halk-cookie__question-text,
.halk-cookie__heading-text,
.halk-cookie__num,
.halk-cookie__body,
.halk-cookie__body p,
.halk-cookie__body li {
	font-family: var(--halk-cookie-font);
}

/* Soft brand wash — fades to white on left & right (no hard edges) */
.halk-cookie::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(1200px 600px at 12% -10%, rgba(0, 24, 168, 0.14), transparent 55%),
		radial-gradient(900px 500px at 100% 20%, rgba(244, 129, 57, 0.1), transparent 50%),
		linear-gradient(180deg, var(--halk-cookie-bg-1) 0%, var(--halk-cookie-bg-2) 42%, var(--halk-cookie-bg-3) 100%);
	-webkit-mask-image: linear-gradient(
		90deg,
		transparent 0%,
		#000 var(--halk-cookie-edge-fade),
		#000 calc(100% - var(--halk-cookie-edge-fade)),
		transparent 100%
	);
	mask-image: linear-gradient(
		90deg,
		transparent 0%,
		#000 var(--halk-cookie-edge-fade),
		#000 calc(100% - var(--halk-cookie-edge-fade)),
		transparent 100%
	);
}

.halk-cookie,
.halk-cookie * {
	box-sizing: border-box;
}

.halk-cookie button {
	font-family: inherit;
}

/* ——— Dark / brand-blue theme ——— */
.halk-cookie--dark {
	--halk-cookie-text: #ffffff;
	--halk-cookie-muted: rgba(255, 255, 255, 0.78);
	--halk-cookie-line: rgba(255, 255, 255, 0.18);
	--halk-cookie-surface: rgba(255, 255, 255, 0.06);
	--halk-cookie-surface-open: rgba(255, 255, 255, 0.1);
	--halk-cookie-bg-1: #00106e;
	--halk-cookie-bg-2: #0018a8;
	--halk-cookie-bg-3: #0626c4;
	background: var(--halk-cookie-bg-2);
}

.halk-cookie--dark::before {
	background:
		radial-gradient(1000px 520px at 8% 0%, rgba(244, 129, 57, 0.22), transparent 55%),
		radial-gradient(800px 480px at 92% 30%, rgba(255, 255, 255, 0.12), transparent 50%),
		linear-gradient(165deg, var(--halk-cookie-bg-1) 0%, var(--halk-cookie-bg-2) 48%, var(--halk-cookie-bg-3) 100%);
	/* Keep full-bleed blue; edge fade only for light theme */
	-webkit-mask-image: none;
	mask-image: none;
}

.halk-cookie--dark .halk-cookie__emblem-img {
	filter: brightness(0) invert(1);
}

.halk-cookie--dark .halk-cookie__item.is-open {
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

/* ——— Amblem watermark (scroll parallax via JS) ——— */
.halk-cookie__emblem {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
	/* Soften Amblem into white at the sides */
	-webkit-mask-image: linear-gradient(
		90deg,
		transparent 0%,
		#000 calc(var(--halk-cookie-edge-fade) + 4%),
		#000 calc(100% - var(--halk-cookie-edge-fade)),
		transparent 100%
	);
	mask-image: linear-gradient(
		90deg,
		transparent 0%,
		#000 calc(var(--halk-cookie-edge-fade) + 4%),
		#000 calc(100% - var(--halk-cookie-edge-fade)),
		transparent 100%
	);
}

.halk-cookie--dark .halk-cookie__emblem {
	-webkit-mask-image: none;
	mask-image: none;
}

.halk-cookie__emblem-img {
	position: absolute;
	top: 8%;
	right: -6%;
	width: var(--halk-cookie-emblem-size);
	height: auto;
	max-width: min(72vw, 720px);
	opacity: var(--halk-cookie-emblem-opacity);
	transform: translate3d(0, 0, 0);
	will-change: transform;
	user-select: none;
	transition: opacity 0.4s ease;
}

.halk-cookie__glow {
	position: absolute;
	left: -12%;
	bottom: -18%;
	width: min(58vw, 520px);
	height: min(58vw, 520px);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0, 24, 168, 0.12), transparent 68%);
	pointer-events: none;
	z-index: 0;
	animation: halk-cookie-glow 10s ease-in-out infinite alternate;
}

.halk-cookie--dark .halk-cookie__glow {
	background: radial-gradient(circle, rgba(244, 129, 57, 0.18), transparent 68%);
}

@keyframes halk-cookie-glow {
	from {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 0.7;
	}
	to {
		transform: translate3d(24px, -30px, 0) scale(1.08);
		opacity: 1;
	}
}

/* ——— Content ——— */
.halk-cookie__inner {
	position: relative;
	z-index: 1;
	width: min(100% - 2 * clamp(16px, 4vw, 40px), var(--halk-cookie-max));
	margin: 0 auto;
}

.halk-cookie__header {
	margin-bottom: clamp(28px, 5vw, 48px);
	animation: halk-cookie-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Eyebrow removed from the widget — hide any cached/old markup */
.halk-cookie__eyebrow,
.halk-cookie__eyebrow-mark {
	display: none !important;
}

.halk-cookie__title {
	margin: 0 0 14px;
	font-size: clamp(1.75rem, 3.6vw, 2.75rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--halk-cookie-text);
}

.halk-cookie__intro {
	margin: 0;
	max-width: 42rem;
	font-size: clamp(1rem, 1.5vw, 1.125rem);
	line-height: 1.65;
	font-weight: 400;
	color: var(--halk-cookie-muted);
}

/* ——— Accordion list ——— */
.halk-cookie__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.halk-cookie__item {
	position: relative;
	border: 1px solid var(--halk-cookie-line);
	border-radius: 18px;
	background: var(--halk-cookie-surface);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	overflow: hidden;
	transition:
		border-color 0.28s ease,
		background-color 0.28s ease,
		box-shadow 0.35s ease,
		transform 0.35s ease;
	animation: halk-cookie-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.halk-cookie__item:nth-child(1) { animation-delay: 0.05s; }
.halk-cookie__item:nth-child(2) { animation-delay: 0.1s; }
.halk-cookie__item:nth-child(3) { animation-delay: 0.15s; }
.halk-cookie__item:nth-child(4) { animation-delay: 0.2s; }
.halk-cookie__item:nth-child(5) { animation-delay: 0.25s; }
.halk-cookie__item:nth-child(6) { animation-delay: 0.3s; }
.halk-cookie__item:nth-child(7) { animation-delay: 0.35s; }
.halk-cookie__item:nth-child(8) { animation-delay: 0.4s; }
.halk-cookie__item:nth-child(n + 9) { animation-delay: 0.45s; }

.halk-cookie__item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, var(--halk-cookie-brand), var(--halk-cookie-accent));
	opacity: 0;
	transform: scaleY(0.4);
	transform-origin: center;
	transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.halk-cookie__item:hover {
	border-color: color-mix(in srgb, var(--halk-cookie-brand) 35%, transparent);
	transform: translateY(-1px);
}

.halk-cookie__item.is-open {
	background: var(--halk-cookie-surface-open);
	border-color: color-mix(in srgb, var(--halk-cookie-brand) 45%, transparent);
	box-shadow:
		0 16px 40px rgba(0, 24, 168, 0.1),
		0 2px 0 rgba(255, 255, 255, 0.5) inset;
}

.halk-cookie__item.is-open::before {
	opacity: 1;
	transform: scaleY(1);
}

.halk-cookie__question {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 14px 16px;
	width: 100%;
	margin: 0;
	padding: 20px 20px 20px 18px;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.halk-cookie__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	min-width: 2.4rem;
	padding: 0;
	border-radius: 12px;
	color: var(--halk-cookie-brand);
	background: color-mix(in srgb, var(--halk-cookie-brand) 10%, transparent);
	transition: background-color 0.28s ease, color 0.28s ease, transform 0.28s ease;
}

.halk-cookie__num-mark {
	display: block;
	width: 1.15rem;
	height: 1.15rem;
	object-fit: contain;
	filter: brightness(0) saturate(100%) invert(12%) sepia(96%) saturate(4000%) hue-rotate(220deg) brightness(0.85);
}

.halk-cookie--dark .halk-cookie__num {
	color: #ffd2ae;
	background: rgba(255, 255, 255, 0.1);
}

.halk-cookie--dark .halk-cookie__num-mark {
	filter: none;
}

.halk-cookie__item.is-open .halk-cookie__num {
	color: #fff;
	background: var(--halk-cookie-brand);
	transform: scale(1.04);
}

.halk-cookie__item.is-open .halk-cookie__num-mark {
	filter: none;
}

.halk-cookie--dark .halk-cookie__item.is-open .halk-cookie__num {
	background: var(--halk-cookie-accent);
	color: #fff;
}

.halk-cookie__question-text {
	font-size: clamp(1rem, 1.5vw, 1.125rem);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -0.015em;
}

.halk-cookie__icon {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--halk-cookie-brand) 8%, transparent);
	flex: 0 0 36px;
	transition: background-color 0.28s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.halk-cookie--dark .halk-cookie__icon {
	background: rgba(255, 255, 255, 0.1);
}

.halk-cookie__item.is-open .halk-cookie__icon {
	background: var(--halk-cookie-accent);
	transform: rotate(180deg);
}

.halk-cookie__icon-plus,
.halk-cookie__icon-plus::before {
	content: "";
	position: absolute;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.halk-cookie__icon-plus {
	width: 14px;
	height: 2px;
	color: var(--halk-cookie-brand);
}

.halk-cookie__icon-plus::before {
	left: 6px;
	top: -6px;
	width: 2px;
	height: 14px;
}

.halk-cookie--dark .halk-cookie__icon-plus {
	color: #fff;
}

.halk-cookie__item.is-open .halk-cookie__icon-plus {
	color: #fff;
}

.halk-cookie__item.is-open .halk-cookie__icon-plus::before {
	opacity: 0;
	transform: scaleY(0);
}

/* ——— Answer panel ——— */
.halk-cookie__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.halk-cookie__item.is-open .halk-cookie__panel {
	grid-template-rows: 1fr;
}

.halk-cookie__panel[hidden] {
	display: grid;
}

.halk-cookie__body {
	overflow: hidden;
	min-height: 0;
	padding: 0 20px 0 18px;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.3s ease, transform 0.35s ease, padding 0.35s ease;
}

.halk-cookie__item.is-open .halk-cookie__body {
	padding: 0 20px 22px calc(18px + 2.4rem + 16px);
	opacity: 1;
	transform: translateY(0);
}

.halk-cookie__body p {
	margin: 0 0 0.75em;
	font-size: 0.9875rem;
	line-height: 1.7;
	color: var(--halk-cookie-muted);
	font-weight: 400;
}

.halk-cookie__body p:last-child {
	margin-bottom: 0;
}

.halk-cookie__body ul,
.halk-cookie__body ol {
	margin: 0 0 0.75em;
	padding-left: 1.2em;
	color: var(--halk-cookie-muted);
}

@keyframes halk-cookie-rise {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 640px) {
	.halk-cookie {
		padding: 48px 0;
	}

	.halk-cookie__question {
		grid-template-columns: auto 1fr auto;
		gap: 10px 12px;
		padding: 16px 14px;
	}

	.halk-cookie__item.is-open .halk-cookie__body {
		padding: 0 14px 18px 14px;
	}

	.halk-cookie__emblem-img {
		right: -28%;
		top: 4%;
		max-width: 88vw;
	}

	.halk-cookie__num {
		min-width: 2.1rem;
		height: 2.1rem;
		font-size: 0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.halk-cookie__item,
	.halk-cookie__header,
	.halk-cookie__glow,
	.halk-cookie__emblem-img,
	.halk-cookie__panel,
	.halk-cookie__body,
	.halk-cookie__icon,
	.halk-cookie__num {
		animation: none !important;
		transition: none !important;
	}
}

/* ——— Cookie-specific ——— */
.halk-cookie__meta,
.halk-cookie__updated {
	margin: 0 0 8px;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--halk-cookie-brand);
	font-family: var(--halk-cookie-font);
}

.halk-cookie--dark .halk-cookie__meta,
.halk-cookie--dark .halk-cookie__updated {
	color: #ffd2ae;
}

.halk-cookie__updated {
	margin-bottom: 18px;
	opacity: 0.85;
	font-weight: 400;
	color: var(--halk-cookie-muted);
}

.halk-cookie--dark .halk-cookie__updated {
	color: var(--halk-cookie-muted);
}

.halk-cookie__heading {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 14px 16px;
	padding: 20px 20px 8px 18px;
}

.halk-cookie__heading-text {
	margin: 0;
	font-size: clamp(1rem, 1.5vw, 1.125rem);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -0.015em;
	font-family: var(--halk-cookie-font);
	color: inherit;
}

.halk-cookie--open .halk-cookie__item {
	background: var(--halk-cookie-surface-open);
}

.halk-cookie--open .halk-cookie__item::before {
	opacity: 1;
	transform: scaleY(1);
}

.halk-cookie--open .halk-cookie__panel {
	grid-template-rows: 1fr;
}

.halk-cookie--open .halk-cookie__body {
	padding: 0 20px 22px calc(18px + 2.4rem + 16px);
	opacity: 1;
	transform: none;
}

.halk-cookie__body {
	/* alias of answer area from FAQ rename */
}

.halk-cookie__body ul {
	margin: 0 0 0.85em;
	padding-left: 1.15em;
	color: var(--halk-cookie-muted);
}

.halk-cookie__body li {
	margin-bottom: 0.45em;
	line-height: 1.65;
}

.halk-cookie__body strong {
	color: var(--halk-cookie-text);
	font-weight: 600;
}

@media (max-width: 640px) {
	.halk-cookie--open .halk-cookie__body {
		padding: 0 14px 18px 14px;
	}
}

/* Cookie inventory table */
.halk-cookie__table-wrap {
	width: 100%;
	overflow-x: auto;
	margin: 0.75em 0 1em;
	border-radius: 12px;
	border: 1px solid var(--halk-cookie-line);
	background: rgba(255, 255, 255, 0.55);
}

.halk-cookie--dark .halk-cookie__table-wrap {
	background: rgba(0, 0, 0, 0.18);
}

.halk-cookie__table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
	font-size: 0.875rem;
	font-family: var(--halk-cookie-font);
}

.halk-cookie__table th,
.halk-cookie__table td {
	padding: 12px 14px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--halk-cookie-line);
	color: var(--halk-cookie-muted);
	line-height: 1.5;
}

.halk-cookie__table th {
	font-weight: 600;
	color: var(--halk-cookie-text);
	background: color-mix(in srgb, var(--halk-cookie-brand) 8%, transparent);
	white-space: nowrap;
}

.halk-cookie__table tr:last-child td {
	border-bottom: 0;
}
