/**
 * Havena Pro — Favorite Toast presentation (strict match to
 * HTML - Markup/reference-toaster.png).
 *
 * SAVE (`--favorite`) and REMOVE (`--unfavorite`) share identical geometry.
 * Only status copy, status accent, title copy, and CTA label/variant differ.
 *
 * Owns visual CSS for Core `window.HvnlyToast` markup only.
 * Free-only installs never load this file (Theme enqueue + Core CSS dequeue).
 *
 * @package HavenaPro
 */

/* =========================================================================
 * Region
 * ========================================================================= */

.hvnly-toast-region {
	--havena-pro-toast-surface: var(--havena-pro-color-background, #ffffff);
	--havena-pro-toast-surface-solid: var(--havena-pro-color-background, #ffffff);
	--havena-pro-toast-border: var(--havena-pro-color-border, #e2e8f0);
	--havena-pro-toast-title: var(--havena-pro-color-text, #0b1220);
	--havena-pro-toast-body: var(--havena-pro-color-muted, #6b7280);
	--havena-pro-toast-accent: var(--havena-pro-color-primary, #2e6bff);
	--havena-pro-toast-success: var(--havena-pro-color-success, #16a34a);
	--havena-pro-toast-danger: var(--havena-pro-color-error, #dc2626);
	--havena-pro-toast-warning: var(--havena-pro-color-warning, #d97706);
	--havena-pro-toast-info: var(--havena-pro-color-primary, #2e6bff);
	--havena-pro-toast-favorite: #ff2d6f;
	--havena-pro-toast-media-bg: var(--havena-pro-color-surface-muted, #f1f5f9);
	--havena-pro-toast-progress-track: color-mix(in srgb, var(--havena-pro-color-muted, #94a3b8) 28%, transparent);
	--havena-pro-toast-font: var(--havena-pro-font-family-body, inherit);
	--havena-pro-toast-radius: 20px;
	--havena-pro-toast-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--havena-pro-toast-shadow:
		0 4px 6px -2px rgba(15, 23, 42, 0.05),
		0 12px 28px -10px rgba(15, 23, 42, 0.2),
		var(--havena-pro-shadow-lg, 0 18px 40px -20px rgba(15, 23, 42, 0.16));
	--havena-pro-toast-timeout: 7s;
	/* Timer ≈ 90% width → ~5% inset each side (~36px @ 720). */
	--havena-pro-toast-timer-inset: 5%;

	position: fixed;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	inset-block-end: max(36px, calc(24px + env(safe-area-inset-bottom, 0px)));
	inset-inline-start: 50%;
	transform: translateX(-50%);
	width: min(720px, calc(100vw - 48px));
	pointer-events: none;
}

body.admin-bar .hvnly-toast-region {
	inset-block-end: max(48px, calc(36px + env(safe-area-inset-bottom, 0px)));
}

/* Side sparkles — SAVE and REMOVE (identical chrome). */
.hvnly-toast-region:has(.hvnly-toast--favorite)::before,
.hvnly-toast-region:has(.hvnly-toast--favorite)::after,
.hvnly-toast-region:has(.hvnly-toast--unfavorite)::before,
.hvnly-toast-region:has(.hvnly-toast--unfavorite)::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 16px;
	height: 16px;
	pointer-events: none;
	opacity: 0;
	background:
		linear-gradient(115deg, transparent 42%, rgba(167, 139, 250, 0.9) 42%, rgba(167, 139, 250, 0.9) 48%, transparent 48%),
		linear-gradient(115deg, transparent 58%, rgba(196, 181, 253, 0.7) 58%, rgba(196, 181, 253, 0.7) 64%, transparent 64%),
		linear-gradient(115deg, transparent 74%, rgba(221, 214, 254, 0.5) 74%, rgba(221, 214, 254, 0.5) 80%, transparent 80%);
	transition: opacity 420ms var(--havena-pro-toast-ease) 80ms;
}

.hvnly-toast-region:has(.hvnly-toast--favorite[data-hvnly-visible='true'])::before,
.hvnly-toast-region:has(.hvnly-toast--favorite[data-hvnly-visible='true'])::after,
.hvnly-toast-region:has(.hvnly-toast--unfavorite[data-hvnly-visible='true'])::before,
.hvnly-toast-region:has(.hvnly-toast--unfavorite[data-hvnly-visible='true'])::after {
	opacity: 0.85;
}

.hvnly-toast-region:has(.hvnly-toast--favorite)::before,
.hvnly-toast-region:has(.hvnly-toast--unfavorite)::before {
	left: -8px;
	transform: translate(-100%, -50%);
}

.hvnly-toast-region:has(.hvnly-toast--favorite)::after,
.hvnly-toast-region:has(.hvnly-toast--unfavorite)::after {
	right: -8px;
	transform: translate(100%, -50%) scaleX(-1);
}

/* =========================================================================
 * Card — rounded rectangle (NOT a pill)
 * ========================================================================= */

.hvnly-toast {
	pointer-events: auto;
	position: relative;
	isolation: isolate;
	overflow: visible;
	width: 100%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px 14px 14px;
	border: 1px solid var(--havena-pro-toast-border);
	border-radius: var(--havena-pro-toast-radius);
	background: var(--havena-pro-toast-surface);
	box-shadow: var(--havena-pro-toast-shadow);
	font-family: var(--havena-pro-toast-font);
	opacity: 0;
	transform: translate3d(0, 28px, 0);
	filter: blur(8px);
	will-change: transform, opacity, filter;
	transition:
		opacity 520ms var(--havena-pro-toast-ease),
		transform 520ms var(--havena-pro-toast-ease),
		filter 520ms var(--havena-pro-toast-ease);
}

.hvnly-toast[data-hvnly-visible='true'] {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	filter: blur(0);
}

.hvnly-toast[data-hvnly-leaving='true'] {
	opacity: 0;
	transform: translate3d(0, 12px, 0);
	filter: blur(4px);
	transition-duration: 280ms;
}

/*
 * Timeout rail — SAVE + REMOVE identical.
 * Inset ~5% L/R (~90% width). Never full-bleed into corners.
 * Pause when Core sets data-hvnly-paused (hover/focus).
 */
.hvnly-toast--favorite::before,
.hvnly-toast--unfavorite::before {
	content: '';
	position: absolute;
	left: var(--havena-pro-toast-timer-inset);
	right: var(--havena-pro-toast-timer-inset);
	bottom: 0;
	height: 2px;
	border-radius: var(--havena-pro-radius-pill, 999px);
	background: linear-gradient(
		90deg,
		var(--havena-pro-toast-favorite) 0%,
		#a78bfa 48%,
		var(--havena-pro-color-primary, #2e6bff) 100%
	);
	transform-origin: left center;
	transform: scaleX(1);
	pointer-events: none;
	z-index: 2;
}

.hvnly-toast--favorite[data-hvnly-visible='true']::before,
.hvnly-toast--unfavorite[data-hvnly-visible='true']::before {
	animation: havena-pro-toast-timeout var(--havena-pro-toast-timeout) linear forwards;
}

.hvnly-toast--favorite[data-hvnly-paused='true']::before,
.hvnly-toast--unfavorite[data-hvnly-paused='true']::before {
	animation-play-state: paused;
}

.hvnly-toast--favorite[data-hvnly-leaving='true']::before,
.hvnly-toast--unfavorite[data-hvnly-leaving='true']::before {
	animation: none;
	opacity: 0;
	transition: opacity 160ms ease;
}

@keyframes havena-pro-toast-timeout {
	from {
		transform: scaleX(1);
	}
	to {
		transform: scaleX(0);
	}
}

/* =========================================================================
 * Icon (non-media)
 * ========================================================================= */

.hvnly-toast__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: var(--havena-pro-radius-pill, 999px);
	font-size: 13px;
	font-weight: var(--havena-pro-type-weight-label, 600);
	line-height: 1;
}

.hvnly-toast--success .hvnly-toast__icon {
	background: color-mix(in srgb, var(--havena-pro-toast-success) 14%, transparent);
	color: var(--havena-pro-toast-success);
}

.hvnly-toast--error .hvnly-toast__icon {
	background: color-mix(in srgb, var(--havena-pro-toast-danger) 14%, transparent);
	color: var(--havena-pro-toast-danger);
}

.hvnly-toast--warning .hvnly-toast__icon {
	background: color-mix(in srgb, var(--havena-pro-toast-warning) 16%, transparent);
	color: var(--havena-pro-toast-warning);
}

.hvnly-toast--info .hvnly-toast__icon,
.hvnly-toast--loading .hvnly-toast__icon {
	background: color-mix(in srgb, var(--havena-pro-toast-info) 14%, transparent);
	color: var(--havena-pro-toast-info);
}

.hvnly-toast--favorite .hvnly-toast__icon,
.hvnly-toast--unfavorite .hvnly-toast__icon {
	background: color-mix(in srgb, var(--havena-pro-toast-favorite) 12%, transparent);
	font-size: 14px;
}

/* =========================================================================
 * Thumbnail + status badge (same geometry SAVE/REMOVE)
 * ========================================================================= */

.hvnly-toast__media {
	position: relative;
	flex: 0 0 auto;
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 8px;
	overflow: visible;
	background: var(--havena-pro-toast-media-bg);
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.hvnly-toast__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
}

.hvnly-toast--favorite .hvnly-toast__media::after,
.hvnly-toast--unfavorite .hvnly-toast__media::after {
	content: '';
	position: absolute;
	top: -4px;
	right: -4px;
	z-index: 3;
	display: block;
	width: 20px;
	height: 20px;
	border-radius: var(--havena-pro-radius-pill, 999px);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 10px 10px;
	box-shadow: 0 0 0 2px #fff;
}

.hvnly-toast--favorite .hvnly-toast__media::after {
	background-color: var(--havena-pro-toast-favorite);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
}

.hvnly-toast--unfavorite .hvnly-toast__media::after {
	background-color: #94a3b8;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
}

.hvnly-toast--media {
	align-items: center;
	padding: 14px 16px 14px 14px;
	gap: 14px;
}

.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__body,
.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto auto;
	column-gap: 16px;
	row-gap: 0;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
}

.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__body::before,
.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__body::before {
	grid-column: 1;
	grid-row: 1;
	display: block;
	margin: 0 0 2px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__body::before {
	content: 'SAVED TO FAVORITES';
	color: var(--havena-pro-toast-favorite);
}

.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__body::before {
	content: 'REMOVED FROM FAVORITES';
	color: #64748b;
}

.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__title,
.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__title {
	grid-column: 1;
	grid-row: 2;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--havena-pro-toast-title);
}

.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__message,
.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__message {
	grid-column: 1;
	grid-row: 3;
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--havena-pro-toast-body);
}

.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__actions,
.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__actions {
	grid-column: 2;
	grid-row: 1 / -1;
	align-self: center;
	margin-top: 0;
	flex-wrap: nowrap;
	gap: 10px;
}

/* =========================================================================
 * Typography (generic)
 * ========================================================================= */

.hvnly-toast__body {
	flex: 1 1 auto;
	min-width: 0;
}

.hvnly-toast__title {
	margin: 0;
	font-size: 15px;
	font-weight: var(--havena-pro-type-weight-button, 700);
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--havena-pro-toast-title);
}

.hvnly-toast__message {
	margin: 3px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--havena-pro-toast-body);
}

.hvnly-toast__progress {
	margin-top: 8px;
	height: 2px;
	border-radius: var(--havena-pro-radius-pill, 999px);
	background: var(--havena-pro-toast-progress-track);
	overflow: hidden;
}

.hvnly-toast__progress > span {
	display: block;
	height: 100%;
	background: var(--havena-pro-toast-accent);
	transition: width 200ms ease;
}

/* =========================================================================
 * CTA — identical chrome for SAVE (Sign in) and REMOVE (Undo)
 * ========================================================================= */

.hvnly-toast__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.hvnly-toast__action {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35em;
	box-sizing: border-box;
	min-width: 94px;
	min-height: 38px;
	padding: 0 1.15rem;
	border: 0;
	border-radius: var(--havena-pro-radius-pill, 999px);
	background: var(--havena-pro-button-primary-bg, var(--havena-pro-color-primary, #2e6bff));
	color: var(--havena-pro-button-primary-text, #fff);
	font-family: inherit;
	font-size: 13px;
	font-weight: var(--havena-pro-type-weight-button, 700);
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
	transition:
		background 160ms ease,
		box-shadow 160ms ease,
		filter 160ms ease;
}

/* Favorite/Unfavorite CTAs share the same blue pill treatment. */
.hvnly-toast--favorite .hvnly-toast__action,
.hvnly-toast--unfavorite .hvnly-toast__action,
.hvnly-toast--favorite .hvnly-btn.hvnly-toast__action,
.hvnly-toast--unfavorite .hvnly-btn.hvnly-toast__action {
	min-width: 94px;
	min-height: 38px;
	border: 0;
	border-radius: var(--havena-pro-radius-pill, 999px);
	background: var(--havena-pro-button-primary-bg, var(--havena-pro-color-primary, #2e6bff));
	color: var(--havena-pro-button-primary-text, #fff);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.hvnly-toast--favorite .hvnly-toast__action--primary::after {
	content: '→';
	font-size: 0.95em;
	line-height: 1;
	font-weight: 500;
}

.hvnly-toast__action:hover {
	filter: brightness(1.05);
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.hvnly-toast__action:active {
	filter: brightness(0.96);
	box-shadow: none;
}

/* Non-favorite secondary/ghost keep quieter styles. */
.hvnly-toast:not(.hvnly-toast--favorite):not(.hvnly-toast--unfavorite) .hvnly-toast__action--secondary,
.hvnly-toast:not(.hvnly-toast--favorite):not(.hvnly-toast--unfavorite) .hvnly-toast__action--ghost,
.hvnly-toast:not(.hvnly-toast--favorite):not(.hvnly-toast--unfavorite) .hvnly-toast__action--outline {
	background: var(--havena-pro-card-background, #fff);
	border: 1px solid var(--havena-pro-toast-border);
	color: var(--havena-pro-toast-title);
	box-shadow: none;
	filter: none;
}

.hvnly-toast__action--success {
	background: var(--havena-pro-toast-success);
	color: #fff;
}

.hvnly-toast__action--danger,
.hvnly-toast__action--alert {
	background: var(--havena-pro-toast-danger);
	color: #fff;
}

.hvnly-toast__action--warning {
	background: var(--havena-pro-toast-warning);
	color: #fff;
}

.hvnly-toast__action:focus-visible,
.hvnly-toast__dismiss:focus-visible {
	outline: 2px solid var(--havena-pro-focus-color, var(--havena-pro-color-primary, #2e6bff));
	outline-offset: 2px;
}

.hvnly-toast__action:disabled,
.hvnly-toast__dismiss:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
	filter: none;
}

.hvnly-toast .hvnly-btn.hvnly-toast__action {
	min-width: 94px;
	min-height: 38px;
	padding: 0 1.15rem;
	border-radius: var(--havena-pro-radius-pill, 999px);
	font-size: 13px;
	line-height: 1.2;
	border: 0;
	background: var(--havena-pro-button-primary-bg, var(--havena-pro-color-primary, #2e6bff));
	color: var(--havena-pro-button-primary-text, #fff);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* =========================================================================
 * Dismiss — 40×40, flex-centered × (identical SAVE/REMOVE)
 * Core renders a text “×” node; Plus Jakarta Sans ink is optically off-center.
 * Hide the text metrics and paint a geometric × via ::before so the mark’s
 * bounding box is flex-centered in the circle (no translate nudges).
 * ========================================================================= */

button.hvnly-ui-control.hvnly-toast__dismiss,
.hvnly-toast__dismiss {
	--hvnly-ui-bg: #f1f5f9;
	--hvnly-ui-fg: #475569;
	--hvnly-ui-border: #e2e8f0;
	--hvnly-ui-bg-hover: #e2e8f0;
	--hvnly-ui-fg-hover: #0f172a;
	--hvnly-ui-border-hover: #cbd5e1;
	--hvnly-ui-border-width: 1px;
	--hvnly-ui-shadow: none;

	appearance: none;
	position: static;
	flex: 0 0 auto;
	align-self: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 40px;
	min-height: 40px;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: var(--havena-pro-radius-pill, 999px);
	background: #f1f5f9;
	color: #475569;
	/* Collapse Core text-node metrics; aria-label remains on the button. */
	font-size: 0;
	font-weight: 400;
	line-height: 0;
	letter-spacing: 0;
	text-align: center;
	text-indent: 0;
	vertical-align: middle;
	cursor: pointer;
	box-shadow: none;
	transform: none;
	transition:
		background 150ms ease,
		color 150ms ease,
		border-color 150ms ease;
}

/* Geometric × — square mark, flex-centered inside the 40×40 hit area. */
button.hvnly-ui-control.hvnly-toast__dismiss::before,
.hvnly-toast__dismiss::before {
	content: '';
	display: block;
	width: 12px;
	height: 12px;
	margin: 0;
	padding: 0;
	border: 0;
	flex: 0 0 auto;
	background:
		linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
		linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
	transform: rotate(45deg);
	pointer-events: none;
}

.hvnly-toast__dismiss:hover {
	background: #e2e8f0;
	border-color: #cbd5e1;
	color: #0f172a;
}

.hvnly-toast__dismiss:active {
	background: #cbd5e1;
	color: #0f172a;
}

.hvnly-toast:not(.hvnly-toast--favorite):not(.hvnly-toast--unfavorite) {
	padding-inline-end: 52px;
}

.hvnly-toast:not(.hvnly-toast--favorite):not(.hvnly-toast--unfavorite) .hvnly-toast__dismiss {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	font-size: 18px;
}

/* =========================================================================
 * Dark mode
 * ========================================================================= */

@media (prefers-color-scheme: dark) {
	.hvnly-toast-region {
		--havena-pro-toast-surface: var(--havena-pro-color-dark-800, #1e293b);
		--havena-pro-toast-surface-solid: var(--havena-pro-color-dark-800, #1e293b);
		--havena-pro-toast-border: var(--havena-pro-color-border-on-dark, #334155);
		--havena-pro-toast-title: var(--havena-pro-color-dark-text, #f8fafc);
		--havena-pro-toast-body: var(--havena-pro-color-muted-light, #94a3b8);
		--havena-pro-toast-shadow:
			0 12px 28px -10px rgba(0, 0, 0, 0.5),
			var(--havena-pro-shadow-lg, 0 18px 40px -20px rgba(0, 0, 0, 0.45));
		--havena-pro-toast-media-bg: var(--havena-pro-color-dark-700, #334155);
	}

	.hvnly-toast__dismiss {
		background: rgba(255, 255, 255, 0.08);
		border-color: rgba(255, 255, 255, 0.12);
		color: var(--havena-pro-toast-body);
	}
}

html.havena-pro-dark .hvnly-toast-region,
:root[data-theme='dark'] .hvnly-toast-region,
body[data-theme='dark'] .hvnly-toast-region,
body.hvnly-theme-dark .hvnly-toast-region {
	--havena-pro-toast-surface: var(--havena-pro-color-dark-800, #1e293b);
	--havena-pro-toast-surface-solid: var(--havena-pro-color-dark-800, #1e293b);
	--havena-pro-toast-border: var(--havena-pro-color-border-on-dark, #334155);
	--havena-pro-toast-title: var(--havena-pro-color-dark-text, #f8fafc);
	--havena-pro-toast-body: var(--havena-pro-color-muted-light, #94a3b8);
	--havena-pro-toast-shadow:
		0 12px 28px -10px rgba(0, 0, 0, 0.5),
		var(--havena-pro-shadow-lg, 0 18px 40px -20px rgba(0, 0, 0, 0.45));
	--havena-pro-toast-media-bg: var(--havena-pro-color-dark-700, #334155);
}

:root[data-theme='light'] .hvnly-toast-region,
body[data-theme='light'] .hvnly-toast-region,
body.hvnly-theme-light .hvnly-toast-region {
	--havena-pro-toast-surface: var(--havena-pro-color-background, #ffffff);
	--havena-pro-toast-surface-solid: var(--havena-pro-color-background, #ffffff);
	--havena-pro-toast-border: var(--havena-pro-color-border, #e2e8f0);
	--havena-pro-toast-title: var(--havena-pro-color-text, #0b1220);
	--havena-pro-toast-body: var(--havena-pro-color-muted, #6b7280);
	--havena-pro-toast-shadow:
		0 4px 6px -2px rgba(15, 23, 42, 0.05),
		0 12px 28px -10px rgba(15, 23, 42, 0.2),
		var(--havena-pro-shadow-lg, 0 18px 40px -20px rgba(15, 23, 42, 0.16));
	--havena-pro-toast-media-bg: var(--havena-pro-color-surface-muted, #f1f5f9);
}

/* =========================================================================
 * Responsive
 * ========================================================================= */

@media (max-width: 760px) {
	.hvnly-toast-region {
		inset-inline: 12px;
		inset-block-end: max(14px, env(safe-area-inset-bottom, 0px));
		transform: none;
		width: calc(100vw - 24px);
		max-width: none;
	}

	.hvnly-toast-region:has(.hvnly-toast--favorite)::before,
	.hvnly-toast-region:has(.hvnly-toast--favorite)::after,
	.hvnly-toast-region:has(.hvnly-toast--unfavorite)::before,
	.hvnly-toast-region:has(.hvnly-toast--unfavorite)::after {
		display: none;
	}

	.hvnly-toast,
	.hvnly-toast--media {
		border-radius: 18px;
		padding: 12px;
		gap: 12px;
	}

	.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__body,
	.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__body {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto auto auto;
	}

	.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__actions,
	.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__actions {
		grid-column: 1;
		grid-row: 4;
		margin-top: 10px;
		width: 100%;
	}

	.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__action,
	.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__action {
		flex: 1 1 auto;
		width: 100%;
		min-height: 40px;
	}

	.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__message,
	.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__message {
		white-space: normal;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.hvnly-toast__media {
		width: 48px;
		height: 48px;
		border-radius: 8px;
	}

	.hvnly-toast--favorite .hvnly-toast__media::after,
	.hvnly-toast--unfavorite .hvnly-toast__media::after {
		width: 18px;
		height: 18px;
		background-size: 9px 9px;
	}

	.hvnly-toast--favorite .hvnly-toast__dismiss,
	.hvnly-toast--unfavorite .hvnly-toast__dismiss {
		position: absolute;
		inset-block-start: 10px;
		inset-inline-end: 10px;
	}

	.hvnly-toast--favorite.hvnly-toast--media,
	.hvnly-toast--unfavorite.hvnly-toast--media {
		padding-inline-end: 52px;
	}
}

@media (max-width: 600px) {
	.hvnly-toast {
		transform: translate3d(0, 22px, 0);
		filter: blur(6px);
	}

	.hvnly-toast[data-hvnly-visible='true'] {
		transform: translate3d(0, 0, 0);
		filter: blur(0);
	}

	.hvnly-toast[data-hvnly-leaving='true'] {
		transform: translate3d(0, 12px, 0);
		filter: blur(4px);
	}

	.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__title,
	.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__title {
		font-size: 15px;
	}
}

@media (max-width: 360px) {
	.hvnly-toast-region {
		inset-inline: 10px;
		width: calc(100vw - 20px);
	}

	.hvnly-toast__media {
		width: 44px;
		height: 44px;
		border-radius: 8px;
	}

	.hvnly-toast--favorite.hvnly-toast--media .hvnly-toast__body::before,
	.hvnly-toast--unfavorite.hvnly-toast--media .hvnly-toast__body::before {
		font-size: 9px;
		letter-spacing: 0.06em;
	}
}

@media (max-width: 782px) {
	body.admin-bar .hvnly-toast-region {
		inset-block-end: max(58px, calc(46px + env(safe-area-inset-bottom, 0px)));
	}
}

/* =========================================================================
 * Reduced motion
 * ========================================================================= */

@media (prefers-reduced-motion: reduce) {
	.hvnly-toast {
		transition: opacity 120ms linear;
		transform: none !important;
		filter: none !important;
		will-change: auto;
	}

	.hvnly-toast[data-hvnly-visible='true'],
	.hvnly-toast[data-hvnly-leaving='true'] {
		transform: none !important;
		filter: none !important;
	}

	.hvnly-toast--favorite::before,
	.hvnly-toast--unfavorite::before {
		animation: none !important;
		transform: scaleX(1);
	}

	.hvnly-toast-region:has(.hvnly-toast--favorite)::before,
	.hvnly-toast-region:has(.hvnly-toast--favorite)::after,
	.hvnly-toast-region:has(.hvnly-toast--unfavorite)::before,
	.hvnly-toast-region:has(.hvnly-toast--unfavorite)::after {
		display: none;
	}

	.hvnly-toast__action,
	.hvnly-toast__dismiss {
		transition: none;
	}

	.hvnly-toast__progress > span {
		transition: none;
	}
}
