/*
 * cognipeer Cookie Consent
 * Scoped styles only. Uses existing cognipeer brand variables where available.
 */

.cp-cookie-banner,
.cp-cookie-modal {
	--cp-navy: var(--cognipeer-navy, #201c50);
	--cp-teal: var(--cognipeer-teal, #08b5a5);
	--cp-text: var(--cognipeer-text, #29283b);
	--cp-muted: var(--cognipeer-muted, #666579);
	--cp-line: var(--cognipeer-border, #e8e8ef);

	font-family: inherit;
	color: var(--cp-text);
}

.cp-cookie-banner[hidden],
.cp-cookie-modal[hidden],
.cp-cookie-backdrop[hidden] {
	display: none !important;
}

.cp-cookie-banner {
	position: fixed;
	z-index: 99990;
	right: 24px;
	bottom: 24px;
	width: min(650px, calc(100vw - 48px));
	padding: 26px;
	background: #fff;
	border: 1px solid var(--cp-line);
	border-radius: 24px;
	box-shadow: 0 18px 60px rgba(32, 28, 80, .14);
}

.cp-cookie-banner h2,
.cp-cookie-modal h2 {
	margin: 0 0 10px;
	color: var(--cp-navy);
	font-size: 22px;
	line-height: 1.2;
	letter-spacing: -.02em;
}

.cp-cookie-banner p,
.cp-cookie-modal__intro,
.cp-cookie-option p {
	margin: 0;
	color: var(--cp-muted);
	font-size: 14px;
	line-height: 1.65;
}

.cp-cookie-banner__secondary-copy {
	margin-top: 10px !important;
}

.cp-cookie-banner a {
	color: var(--cp-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cp-cookie-eyebrow {
	margin: 0 0 8px !important;
	color: var(--cp-teal) !important;
	font-size: 11px !important;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.cp-cookie-actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 22px;
}

.cp-cookie-btn {
	min-height: 44px;
	padding: 10px 15px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: 12.5px;
	font-weight: 650;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.cp-cookie-btn:hover {
	transform: translateY(-1px);
}

.cp-cookie-btn--primary {
	background: var(--cp-navy);
	color: #fff;
}

.cp-cookie-btn--primary:hover {
	background: var(--cp-teal);
}

.cp-cookie-btn--secondary {
	background: #fff;
	border-color: #d1d1dc;
	color: var(--cp-navy);
	box-shadow: 0 4px 14px rgba(32, 28, 80, .035);
}

.cp-cookie-btn--secondary:hover {
	border-color: var(--cp-teal);
	background: #f7fcfb;
}

.cp-cookie-btn:focus-visible,
.cp-cookie-close:focus-visible,
.cp-switch input:focus-visible + span {
	outline: 3px solid rgba(8, 181, 165, .28);
	outline-offset: 2px;
}

.cp-cookie-backdrop {
	position: fixed;
	z-index: 99991;
	inset: 0;
	background: rgba(22, 20, 48, .42);
	backdrop-filter: blur(3px);
}

.cp-cookie-modal {
	position: fixed;
	z-index: 99992;
	top: 50%;
	left: 50%;
	width: min(620px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 28px;
	transform: translate(-50%, -50%);
	background: #fff;
	border: 1px solid var(--cp-line);
	border-radius: 28px;
	box-shadow: 0 24px 80px rgba(32, 28, 80, .2);
}

.cp-cookie-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.cp-cookie-modal__intro {
	margin-bottom: 22px;
}

.cp-cookie-close {
	width: 38px;
	height: 38px;
	flex: 0 0 auto;
	border: 1px solid var(--cp-line);
	border-radius: 50%;
	background: #fff;
	color: var(--cp-navy);
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.cp-cookie-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px 0;
	border-top: 1px solid var(--cp-line);
}

.cp-cookie-option strong {
	display: block;
	margin-bottom: 4px;
	color: var(--cp-navy);
	font-size: 14px;
}

.cp-cookie-status {
	flex: 0 0 auto;
	color: var(--cp-teal);
	font-size: 12px;
	font-weight: 700;
}

.cp-switch {
	position: relative;
	width: 48px;
	height: 28px;
	flex: 0 0 auto;
}

.cp-switch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.cp-switch span {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	background: #d9d9e3;
	cursor: pointer;
	transition: background .18s ease;
}

.cp-switch span::after {
	content: "";
	position: absolute;
	top: 4px;
	left: 4px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgba(32, 28, 80, .18);
	transition: transform .18s ease;
}

.cp-switch input:checked + span {
	background: var(--cp-teal);
}

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

.cp-cookie-modal__footer {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	padding-top: 20px;
	border-top: 1px solid var(--cp-line);
}

.cp-cookie-modal-open {
	overflow: hidden;
}

@media (max-width: 720px) {
	.cp-cookie-banner {
		right: 12px;
		bottom: 12px;
		width: calc(100vw - 24px);
		padding: 20px;
		border-radius: 20px;
	}

	.cp-cookie-actions {
		grid-template-columns: 1fr;
	}

	.cp-cookie-btn {
		width: 100%;
	}

	.cp-cookie-modal {
		width: calc(100vw - 24px);
		padding: 22px;
		border-radius: 22px;
	}

	.cp-cookie-modal__footer {
		display: grid;
		grid-template-columns: 1fr;
	}

	.cp-cookie-option {
		align-items: flex-start;
	}
}
