/* Sterling Care privacy & cookie consent */

.sc-privacy-banner,
.sc-privacy-preferences,
.sc-privacy-gpc-notice {
	--sc-primary: #2e3192;
	--sc-primary-hover: #1f2266;
	--sc-text: #1a1a1a;
	--sc-text-muted: #4b5563;
	--sc-border: #d1d5db;
	--sc-bg: #ffffff;
	--sc-overlay: rgba(0, 0, 0, 0.5);
	--sc-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
	--sc-radius: 4px;
	font-family: "Gotham SSm A", "Gotham SSm B", Helvetica, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}

.sc-privacy-banner *,
.sc-privacy-preferences *,
.sc-privacy-gpc-notice *,
.sc-privacy-footer-links * {
	box-sizing: border-box;
}

.sc-privacy-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999998;
	background: var(--sc-bg);
	border-top: 1px solid var(--sc-border);
	box-shadow: var(--sc-shadow);
	padding: 1.25rem 1.5rem;
	padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

.sc-privacy-banner[hidden],
.sc-privacy-preferences[hidden],
.sc-privacy-gpc-notice[hidden] {
	display: none !important;
}

.sc-privacy-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.sc-privacy-banner__title {
	margin: 0 0 0.5rem;
	font-size: 18px;
	font-weight: 500;
	color: var(--sc-text);
	font-family: "Gotham SSm A", "Gotham SSm B", Helvetica, sans-serif;
	text-transform: none;
}

.sc-privacy-banner__text,
.sc-privacy-banner__notice {
	margin: 0 0 0.75rem;
	color: var(--sc-text-muted);
	font-size: 14px;
	font-weight: 300;
}

.sc-privacy-banner__notice {
	font-size: 12px;
	font-style: italic;
}

.sc-privacy-banner__text a {
	color: var(--sc-primary);
	text-decoration: underline;
	font-weight: bold;
}

.sc-privacy-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin-bottom: 0.75rem;
}

.sc-privacy-banner__legal {
	margin: 0;
	font-size: 12px;
}

.sc-privacy-text-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--sc-primary);
	text-decoration: underline;
	cursor: pointer;
	font-size: inherit;
	font-family: inherit;
	font-weight: bold;
}

.sc-privacy-text-link:hover {
	color: var(--sc-primary-hover);
}

.sc-privacy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.625rem 1.25rem;
	border-radius: var(--sc-radius);
	font-size: 14px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
	white-space: nowrap;
}

.sc-privacy-btn--primary {
	background: var(--sc-primary);
	color: #fff;
	border-color: var(--sc-primary);
}

.sc-privacy-btn--primary:hover {
	background: var(--sc-primary-hover);
	border-color: var(--sc-primary-hover);
}

.sc-privacy-btn--secondary {
	background: #fff;
	color: var(--sc-text);
	border-color: var(--sc-border);
}

.sc-privacy-btn--secondary:hover {
	background: #f9fafb;
	border-color: #9ca3af;
}

.sc-privacy-preferences {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.sc-privacy-preferences:not([hidden]) {
	display: flex !important;
}

.sc-privacy-preferences__overlay {
	position: absolute;
	inset: 0;
	background: var(--sc-overlay);
	z-index: 0;
}

.sc-privacy-preferences__panel {
	position: relative;
	z-index: 1;
	background: var(--sc-bg);
	border-radius: var(--sc-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	max-height: 90dvh;
	min-height: 200px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.sc-privacy-preferences__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--sc-border);
}

.sc-privacy-preferences__title {
	margin: 0;
	font-size: 22px;
	font-weight: 500;
	color: var(--sc-text);
	text-transform: none;
}

.sc-privacy-preferences__close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--sc-text-muted);
	padding: 0.25rem;
}

.sc-privacy-preferences__body {
	padding: 1.25rem 1.5rem;
	overflow-y: auto;
	flex: 1 1 auto;
	min-height: 0;
}

.sc-privacy-preferences__intro {
	margin: 0 0 1.25rem;
	color: var(--sc-text-muted);
	font-size: 14px;
	font-weight: 300;
}

.sc-privacy-category {
	padding: 1rem 0;
	border-bottom: 1px solid var(--sc-border);
}

.sc-privacy-category:last-child {
	border-bottom: none;
}

.sc-privacy-category__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.375rem;
}

.sc-privacy-category__title {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	color: var(--sc-text);
	text-transform: none;
}

.sc-privacy-category__badge {
	font-size: 11px;
	font-weight: 500;
	color: var(--sc-text-muted);
	background: #f3f4f6;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
}

.sc-privacy-category__desc {
	margin: 0;
	font-size: 13px;
	color: var(--sc-text-muted);
	font-weight: 300;
}

.sc-privacy-preferences__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	justify-content: flex-end;
	padding: 1rem 1.5rem;
	padding-bottom: max(1rem, env(safe-area-inset-bottom));
	border-top: 1px solid var(--sc-border);
	background: #f9fafb;
	flex-shrink: 0;
}

.sc-privacy-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.sc-privacy-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.sc-privacy-toggle__slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #d1d5db;
	border-radius: 24px;
	transition: background-color 0.2s;
}

.sc-privacy-toggle__slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
}

.sc-privacy-toggle input:checked + .sc-privacy-toggle__slider {
	background: var(--sc-primary);
}

.sc-privacy-toggle input:checked + .sc-privacy-toggle__slider::before {
	transform: translateX(20px);
}

.sc-privacy-toggle input:focus-visible + .sc-privacy-toggle__slider {
	outline: 2px solid var(--sc-primary);
	outline-offset: 2px;
}

.sc-privacy-gpc-notice {
	position: fixed;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9999997;
	background: var(--sc-text);
	color: #fff;
	padding: 0.75rem 2.5rem 0.75rem 1.25rem;
	padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
	border-radius: var(--sc-radius);
	box-shadow: var(--sc-shadow);
	max-width: calc(100% - 2rem);
}

.sc-privacy-gpc-notice p {
	margin: 0;
	font-size: 13px;
}

.sc-privacy-gpc-notice__close {
	position: absolute;
	top: 50%;
	right: 0.5rem;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #fff;
	font-size: 1.25rem;
	cursor: pointer;
	padding: 0.25rem;
	line-height: 1;
}

.sc-privacy-footer-links {
	position: relative;
	z-index: 9999996;
	text-align: center;
	padding: 0.5rem 1rem 5rem;
	font-size: 12px;
}

/* Hide common chat widget iframes while cookie UI is open */
body.sc-privacy-ui-active iframe[src*="blazeo"],
body.sc-privacy-ui-active iframe[src*="apexchat"],
body.sc-privacy-ui-active #apexchat,
body.sc-privacy-ui-active #apexchat_widget,
body.sc-privacy-ui-active .apexchat_widget,
body.sc-privacy-ui-active #BlazeoWidget,
body.sc-privacy-ui-active .blazeo-widget {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

@media (max-width: 640px) {
	.sc-privacy-banner {
		padding: 1rem;
		padding-bottom: max(1rem, env(safe-area-inset-bottom));
	}

	.sc-privacy-banner__actions,
	.sc-privacy-preferences__footer {
		flex-direction: column;
	}

	.sc-privacy-btn {
		width: 100%;
	}

	.sc-privacy-preferences {
		padding: 0.75rem;
		align-items: center;
	}

	.sc-privacy-preferences__panel {
		max-width: none;
		width: 100%;
		max-height: 85vh;
		max-height: 85dvh;
		min-height: 50vh;
		border-radius: 8px;
	}

	.sc-privacy-preferences__body {
		-webkit-overflow-scrolling: touch;
	}

	.sc-privacy-footer-links {
		padding-bottom: 6rem;
	}

	.sc-privacy-footer-links.sc-privacy-footer-links--body {
		position: fixed;
		left: 0;
		right: 0;
		bottom: max(5.5rem, calc(5.5rem + env(safe-area-inset-bottom)));
		z-index: 9999996;
		margin: 0;
		padding: 0.75rem 1rem;
		background: rgba(255, 255, 255, 0.97);
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
	}

	body.sc-privacy-ui-active .sc-privacy-footer-links.sc-privacy-footer-links--body {
		display: none;
	}
}

.sc-privacy-footer-link {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font-size: inherit;
	font-family: inherit;
	opacity: 0.8;
}

.sc-privacy-footer-link:hover {
	opacity: 1;
}

.sc-privacy-footer-sep {
	margin: 0 0.5rem;
	opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
	.sc-privacy-btn,
	.sc-privacy-toggle__slider,
	.sc-privacy-toggle__slider::before {
		transition: none;
	}
}
