/*
 * CWS Suite cookie banner - Zadar Archipelago custom template.
 * Every rule is scoped to the plugin wrappers in custom mode
 * ([data-cws-tpl-style="custom"]), so nothing leaks onto a default banner and
 * the selectors outrank the Elementor kit's button rules without !important.
 */

/* ---------- tokens ---------- */
.cws-cookie-consent-notice-wrap[data-cws-tpl-style="custom"],
.cws-cookie-consent-modal[data-cws-tpl-style="custom"],
.cws-cookie-floating-wrap[data-cws-tpl-style="custom"] {
	--za-ck-blue: var(--e-global-color-18791ea, #1798c6);
	--za-ck-blue-dark: #0f7aa3;
	--za-ck-sky: var(--e-global-color-3b8b4bb, #47c1f1);
	--za-ck-yellow: var(--e-global-color-secondary, #ffc20e);
	--za-ck-ink: #22262b;
	--za-ck-text: #4a5058;
	--za-ck-muted: #5d646d;
	--za-ck-tint: #eef8fd;
	--za-ck-track: #c9d3db;
	--za-ck-font: var(--e-global-typography-primary-font-family, "Chivo"), sans-serif;
	--za-ck-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- shared pieces ---------- */
[data-cws-tpl-style="custom"] .za-ck-wave {
	display: block;
	width: 100%;
	height: 18px;
}

[data-cws-tpl-style="custom"] .za-ck-wave__back {
	fill: var(--za-ck-sky);
}

[data-cws-tpl-style="custom"] .za-ck-wave__front {
	fill: #fff;
}

[data-cws-tpl-style="custom"] .za-ck-panel {
	background: #fff;
	font-family: var(--za-ck-font);
	color: var(--za-ck-ink);
}

[data-cws-tpl-style="custom"] .za-ck-inner {
	box-sizing: border-box;
	max-width: 1158px;
	margin: 0 auto;
	padding: 16px 24px 22px;
	display: flex;
	align-items: center;
	gap: 48px;
}

[data-cws-tpl-style="custom"] .za-ck-badge {
	flex: none;
	position: relative;
	width: 60px;
	height: 60px;
}

[data-cws-tpl-style="custom"] .za-ck-badge__shadow,
[data-cws-tpl-style="custom"] .za-ck-badge__disc {
	position: absolute;
	inset: 0;
	border-radius: 50%;
}

[data-cws-tpl-style="custom"] .za-ck-badge__shadow {
	background: var(--za-ck-yellow);
	transform: translate(5px, 4px);
}

[data-cws-tpl-style="custom"] .za-ck-badge__disc {
	background: var(--za-ck-blue);
	display: flex;
	align-items: center;
	justify-content: center;
}

[data-cws-tpl-style="custom"] .za-ck-cookie {
	width: 30px;
	height: 30px;
	padding: 0;
}

[data-cws-tpl-style="custom"] .za-ck-cookie path {
	stroke: #fff;
}

[data-cws-tpl-style="custom"] .za-ck-cookie__crumb {
	fill: var(--za-ck-yellow);
}

[data-cws-tpl-style="custom"] .za-ck-copy {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

[data-cws-tpl-style="custom"] .za-ck-title {
	margin: 0;
	padding: 0;
	font-family: var(--za-ck-font);
	font-size: 15px;
	font-weight: 900;
	line-height: 1.3;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--za-ck-ink);
}

[data-cws-tpl-style="custom"] .za-ck-text {
	margin: 0;
	max-width: 720px;
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--za-ck-text);
	text-wrap: pretty;
}

[data-cws-tpl-style="custom"] .za-ck-text--small {
	max-width: 860px;
	font-size: 14px;
	line-height: 1.5;
}

/* ---------- buttons ---------- */
[data-cws-tpl-style="custom"] .za-ck-actions {
	flex: none;
	display: flex;
	align-items: center;
	gap: 10px;
}

[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn {
	box-sizing: border-box;
	height: 48px;
	margin: 0;
	padding: 0 26px;
	border: 2px solid var(--za-ck-blue);
	border-radius: 8px;
	background: #fff;
	color: var(--za-ck-blue);
	font-family: var(--za-ck-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--outline:hover,
[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--outline:focus-visible {
	background: var(--za-ck-tint);
	color: var(--za-ck-blue);
}

[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--primary {
	padding: 0 30px;
	background: var(--za-ck-blue);
	color: #fff;
	box-shadow: 4px 4px 0 var(--za-ck-yellow);
}

[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--primary:hover,
[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--primary:focus-visible {
	background: var(--za-ck-blue-dark);
	border-color: var(--za-ck-blue-dark);
	color: #fff;
}

[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--link {
	padding: 0 12px;
	border-color: transparent;
	background: transparent;
	color: var(--za-ck-ink);
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: var(--za-ck-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--link:hover,
[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--link:focus-visible {
	background: transparent;
	border-color: transparent;
	color: var(--za-ck-blue);
}

[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn:focus-visible {
	outline: 2px solid var(--za-ck-ink);
	outline-offset: 2px;
}

/* ---------- banner ---------- */
.cws-cookie-consent-notice-wrap[data-cws-tpl-style="custom"] {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: none;
	min-width: 0;
	padding: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	z-index: 99990;
	transform: translateY(105%);
	transition: transform 0.6s var(--za-ck-ease), opacity 0.4s, visibility 0.6s;
	filter: drop-shadow(0 -6px 18px rgba(0, 0, 0, 0.14));
}

.cws-cookie-consent-notice-wrap[data-cws-tpl-style="custom"].active {
	transform: translateY(0);
}

/* ---------- floating button ---------- */
.cws-cookie-floating-wrap[data-cws-tpl-style="custom"] {
	box-sizing: border-box;
	bottom: 24px;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--za-ck-blue);
	box-shadow: 4px 4px 0 var(--za-ck-yellow), 0 10px 24px -6px rgba(0, 0, 0, 0.45);
	z-index: 99;
	transform: scale(0.6) rotate(-30deg);
	transition: opacity 0.35s, visibility 0.5s, transform 0.5s var(--za-ck-ease), background-color 0.2s;
}

.cws-cookie-floating-wrap[data-cws-tpl-style="custom"].active {
	transform: scale(1) rotate(0deg);
}

.cws-cookie-floating-wrap[data-cws-tpl-style="custom"]:hover {
	background: var(--za-ck-blue-dark);
}

.cws-cookie-floating-wrap[data-cws-tpl-style="custom"] .za-ck-fab {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
}

.cws-cookie-floating-wrap[data-cws-tpl-style="custom"] .za-ck-cookie {
	width: 26px;
	height: 26px;
}

/* ---------- preferences dialog ---------- */
.cws-cookie-consent-modal[data-cws-tpl-style="custom"] {
	align-items: flex-end;
	justify-content: stretch;
	background: rgba(20, 30, 40, 0.28);
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-dialog {
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	transform: translateY(40px);
	transition: transform 0.6s var(--za-ck-ease);
	filter: drop-shadow(0 -6px 18px rgba(0, 0, 0, 0.14));
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"].active .za-ck-dialog {
	transform: translateY(0);
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-wave {
	flex: none;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-panel--dialog {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-inner--dialog {
	flex-direction: column;
	align-items: stretch;
	gap: 18px;
	padding-top: 18px;
	padding-bottom: 24px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-dialog__head {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-badge--small {
	width: 48px;
	height: 48px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-badge--small .za-ck-cookie {
	width: 24px;
	height: 24px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-dialog__intro {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .close-consent-modal {
	position: static;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--za-ck-tint);
	cursor: pointer;
	transition: background-color 0.2s;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .close-consent-modal:hover {
	background: #dcf0fa;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .close-consent-modal svg {
	width: 26px;
	height: 26px;
	padding: 5px;
	box-sizing: border-box;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .close-consent-modal svg path {
	stroke: var(--za-ck-ink);
}

/* categories */
.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cat {
	padding: 12px 16px;
	background: var(--za-ck-tint);
	border-radius: 8px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cat__row {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cat__copy {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cat__name {
	margin: 0;
	padding: 0;
	font-family: var(--za-ck-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
	color: var(--za-ck-ink);
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cat__desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--za-ck-muted);
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cat__switch {
	flex: none;
	padding-top: 1px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cat__switch .always-active {
	display: inline-block;
	max-width: 90px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.25;
	text-align: right;
	color: var(--za-ck-blue);
}

/* the plugin's switch, restyled to the design's 44x24 track */
.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .enable-single-cookie .switch {
	display: block;
	width: 44px;
	height: 24px;
	margin: 0;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .enable-single-cookie .slider {
	border-radius: 999px;
	background-color: var(--za-ck-track);
	transition: background-color 0.25s;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .enable-single-cookie .slider:before {
	width: 18px;
	height: 18px;
	left: 3px;
	bottom: 3px;
	border-radius: 50%;
	background-color: #fff;
	transition: transform 0.25s;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .enable-single-cookie input:checked + .slider {
	background-color: var(--za-ck-blue);
}

/* The plugin moves the knob with !important, so this one has to match it. */
.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .enable-single-cookie input:checked + .slider:before {
	-webkit-transform: translateX(20px) !important;
	transform: translateX(20px) !important;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .enable-single-cookie input:focus-visible + .slider {
	outline: 2px solid var(--za-ck-ink);
	outline-offset: 2px;
	box-shadow: none;
}

/* cookie list */
.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cookies {
	margin-top: 8px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--za-ck-muted);
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cookies summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--za-ck-blue);
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cookies ul {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cookies li {
	margin: 0;
	padding: 8px 10px;
	background: #fff;
	border-radius: 6px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cookies strong {
	color: var(--za-ck-ink);
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cookies__duration {
	margin-left: 6px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cookies__desc {
	display: block;
	margin-top: 2px;
}

.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-actions--dialog {
	justify-content: flex-end;
	flex-wrap: wrap;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
	[data-cws-tpl-style="custom"] .za-ck-inner {
		gap: 28px;
	}

	[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn {
		padding: 0 18px;
	}

	[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--primary {
		padding: 0 22px;
	}

	[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--link {
		padding: 0 8px;
	}
}

@media (max-width: 960px) {
	.cws-cookie-consent-notice-wrap[data-cws-tpl-style="custom"] .za-ck-inner {
		flex-wrap: wrap;
		gap: 14px 20px;
	}

	.cws-cookie-consent-notice-wrap[data-cws-tpl-style="custom"] .za-ck-actions {
		flex: 1 1 100%;
		justify-content: flex-end;
	}

	.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	[data-cws-tpl-style="custom"] .za-ck-wave {
		height: 12px;
	}

	[data-cws-tpl-style="custom"] .za-ck-inner {
		padding: 12px 16px 18px;
	}

	[data-cws-tpl-style="custom"] .za-ck-badge {
		width: 44px;
		height: 44px;
	}

	[data-cws-tpl-style="custom"] .za-ck-badge .za-ck-cookie {
		width: 22px;
		height: 22px;
	}

	[data-cws-tpl-style="custom"] .za-ck-text {
		font-size: 14px;
		line-height: 1.5;
	}

	[data-cws-tpl-style="custom"] .za-ck-text--small {
		font-size: 13px;
	}

	[data-cws-tpl-style="custom"] .za-ck-actions {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 8px;
		width: 100%;
	}

	[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn {
		width: 100%;
		height: 46px;
	}

	[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--primary {
		box-shadow: 3px 3px 0 var(--za-ck-yellow);
	}

	[data-cws-tpl-style="custom"] .za-ck-actions .za-ck-btn--link {
		height: 36px;
	}

	.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-dialog {
		max-height: 94vh;
	}

	.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-dialog__head {
		gap: 14px;
	}

	.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-cats {
		grid-template-columns: minmax(0, 1fr);
	}

	.cws-cookie-floating-wrap[data-cws-tpl-style="custom"] {
		bottom: 16px;
		width: 50px;
		height: 50px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cws-cookie-consent-notice-wrap[data-cws-tpl-style="custom"],
	.cws-cookie-floating-wrap[data-cws-tpl-style="custom"],
	.cws-cookie-consent-modal[data-cws-tpl-style="custom"] .za-ck-dialog {
		transition-duration: 0.01s;
	}
}
