/* Shaked Consent. Every rule is scoped under #shc so the theme cannot leak in. */

#shc {
	--shc-accent: #1f2a44;
	--shc-on-accent: #fff;
	--shc-bg: #fff;
	--shc-fg: #16181d;
	--shc-muted: #5b6270;
	--shc-line: #e3e5ea;
	--shc-radius: 14px;
	font-family: var(--shc-font, inherit);
	font-size: 15px;
	line-height: 1.5;
	color: var(--shc-fg);
	text-align: start;
}

#shc *,
#shc *::before,
#shc *::after {
	box-sizing: border-box;
}

#shc [hidden] {
	display: none !important;
}

#shc p,
#shc h2,
#shc ul,
#shc li {
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: inherit;
	color: inherit;
	letter-spacing: normal;
	text-transform: none;
}

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

#shc .shc-banner {
	position: fixed;
	z-index: 2147483000;
	bottom: 16px;
	width: min(420px, calc(100vw - 32px));
	padding: 20px;
	background: var(--shc-bg);
	border: 1px solid var(--shc-line);
	border-radius: var(--shc-radius);
	box-shadow: 0 12px 40px rgba(15, 20, 35, 0.18);
	animation: shc-in 0.25s ease-out;
}

#shc.shc--right .shc-banner { right: 16px; }
#shc.shc--left .shc-banner { left: 16px; }

#shc .shc-title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 6px;
}

#shc .shc-text {
	font-size: 14px;
	font-weight: 400;
	color: var(--shc-muted);
	margin-bottom: 16px;
}

#shc .shc-policy {
	color: var(--shc-fg);
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

/* ---------- Buttons ---------- */

#shc .shc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

#shc button {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

#shc .shc-btn {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--shc-fg);
	background: transparent;
	border: 1.5px solid var(--shc-accent);
	border-radius: 10px;
	transition: opacity 0.15s;
}

#shc .shc-btn--fill {
	color: var(--shc-on-accent);
	background: var(--shc-accent);
}

#shc .shc-btn:hover {
	opacity: 0.85;
	color: var(--shc-fg);
	background: transparent;
}

#shc .shc-btn--fill:hover {
	color: var(--shc-on-accent);
	background: var(--shc-accent);
}

#shc .shc-textbtn {
	flex: 1 1 100%;
	min-height: 36px;
	padding: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--shc-fg);
	background: transparent;
	border: 0;
	border-radius: 8px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

#shc .shc-textbtn:hover {
	color: var(--shc-fg);
	background: transparent;
	opacity: 0.75;
}

#shc button:focus-visible,
#shc a:focus-visible {
	outline: 2px solid var(--shc-accent);
	outline-offset: 2px;
}

/* ---------- Modal ---------- */

#shc .shc-overlay {
	position: fixed;
	z-index: 2147483001;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 20, 35, 0.5);
	animation: shc-fade 0.2s ease-out;
}

#shc .shc-modal {
	position: relative;
	width: min(520px, 100%);
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	padding: 24px;
	background: var(--shc-bg);
	border-radius: var(--shc-radius);
	box-shadow: 0 24px 60px rgba(15, 20, 35, 0.3);
	outline: none;
}

#shc .shc-modal .shc-title {
	font-size: 19px;
	padding-inline-end: 40px;
}

#shc .shc-x {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	color: var(--shc-muted);
	background: transparent;
	border: 0;
	border-radius: 50%;
}

#shc .shc-x:hover {
	color: var(--shc-fg);
	background: #f1f2f5;
}

#shc .shc-cats {
	margin-bottom: 20px;
	border-top: 1px solid var(--shc-line);
}

#shc .shc-cats li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--shc-line);
}

#shc .shc-cat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

#shc .shc-cat-name {
	font-size: 15px;
	font-weight: 600;
}

#shc .shc-cat-desc {
	font-size: 13px;
	color: var(--shc-muted);
}

#shc .shc-always {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 600;
	color: var(--shc-muted);
	white-space: nowrap;
}

/* Switch */

#shc .shc-switch {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 28px;
	padding: 0;
	background: #c6cad3;
	border: 0;
	border-radius: 999px;
	transition: background 0.15s;
}

#shc .shc-switch:hover {
	background: #c6cad3;
}

#shc .shc-switch span {
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 22px;
	height: 22px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: inset-inline-start 0.15s;
}

#shc .shc-switch[aria-checked="true"],
#shc .shc-switch[aria-checked="true"]:hover {
	background: var(--shc-accent);
}

#shc .shc-switch[aria-checked="true"] span {
	inset-inline-start: 21px;
}

/* ---------- Reopen button ---------- */

#shc .shc-reopen {
	position: fixed;
	z-index: 2147482999;
	bottom: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--shc-fg);
	background: var(--shc-bg);
	border: 1px solid var(--shc-line);
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(15, 20, 35, 0.15);
}

#shc .shc-reopen:hover {
	color: var(--shc-fg);
	background: var(--shc-bg);
	box-shadow: 0 6px 18px rgba(15, 20, 35, 0.25);
}

#shc.shc--right .shc-reopen { right: 16px; }
#shc.shc--left .shc-reopen { left: 16px; }

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

@media (max-width: 480px) {
	#shc .shc-banner {
		bottom: 0;
		left: 0 !important;
		right: 0 !important;
		width: 100%;
		padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
		border-radius: var(--shc-radius) var(--shc-radius) 0 0;
		border-width: 1px 0 0;
	}

	#shc .shc-modal {
		padding: 20px 16px;
	}

	#shc .shc-modal .shc-actions .shc-btn {
		flex-basis: 100%;
	}
}

@keyframes shc-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@keyframes shc-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	#shc .shc-banner,
	#shc .shc-overlay {
		animation: none;
	}

	#shc .shc-switch,
	#shc .shc-switch span,
	#shc .shc-btn {
		transition: none;
	}
}
