/**
 * CCPA "Do Not Sell or Share" opt-out confirmation toast.
 *
 * Standalone, framework-free stylesheet. Kept in assets/ (not assets/css/) so
 * the gulp `clean` task, which wipes assets/css/*.css, never deletes it.
 *
 * Design goals: fixed bottom-right, responsive, high z-index, smooth fade/slide,
 * adapts to light/dark via prefers-color-scheme, and respects reduced-motion.
 */

.optout-toast {
	/* Positioning */
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 2147483000; /* above cookie banners / sticky headers */

	/* Sizing */
	width: 360px;
	max-width: calc(100vw - 40px);

	/* Inert until activated: removed from a11y tree + not focusable/clickable */
	visibility: hidden;
	opacity: 0;
	transform: translateY(16px);
	pointer-events: none;

	transition:
		opacity 0.32s ease,
		transform 0.32s ease,
		visibility 0s linear 0.32s;

	/* Theme tokens (light defaults) */
	--optout-bg: #ffffff;
	--optout-fg: #1f2733;
	--optout-muted: #556070;
	--optout-border: rgba(15, 23, 42, 0.1);
	--optout-accent: #1a7f4b;
	--optout-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);

	font-family: inherit;
}

.optout-toast.is-visible {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	transition:
		opacity 0.32s ease,
		transform 0.32s ease,
		visibility 0s linear 0s;
}

.optout-toast__inner {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 16px 16px 18px;
	background: var(--optout-bg);
	color: var(--optout-fg);
	border: 1px solid var(--optout-border);
	border-left: 4px solid var(--optout-accent);
	border-radius: 10px;
	box-shadow: var(--optout-shadow);
	outline: none;
}

.optout-toast__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin-top: 1px;
	border-radius: 50%;
	color: #ffffff;
	background: var(--optout-accent);
}

.optout-toast__content {
	flex: 1 1 auto;
	min-width: 0;
}

.optout-toast__title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--optout-fg);
}

.optout-toast__desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--optout-muted);
}

.optout-toast__close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: -4px -4px 0 0;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	color: var(--optout-muted);
	background: transparent;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.optout-toast__close:hover {
	color: var(--optout-fg);
	background: rgba(15, 23, 42, 0.06);
}

/* Visible keyboard focus for accessibility. */
.optout-toast__close:focus-visible {
	outline: 2px solid var(--optout-accent);
	outline-offset: 2px;
}

/* Full-width, bottom-anchored layout on small screens. */
@media (max-width: 480px) {
	.optout-toast {
		right: 12px;
		left: 12px;
		bottom: 12px;
		width: auto;
		max-width: none;
	}
}

/* Dark mode. */
@media (prefers-color-scheme: dark) {
	.optout-toast {
		--optout-bg: #1c2430;
		--optout-fg: #f1f5f9;
		--optout-muted: #aab4c2;
		--optout-border: rgba(255, 255, 255, 0.12);
		--optout-accent: #34d17f;
		--optout-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
	}

	.optout-toast__icon {
		color: #0b1220;
	}

	.optout-toast__close:hover {
		background: rgba(255, 255, 255, 0.1);
	}
}

/* Honor reduced-motion preferences: no slide/fade transition. */
@media (prefers-reduced-motion: reduce) {
	.optout-toast,
	.optout-toast.is-visible {
		transition: none;
		transform: none;
	}
}
