/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
	position: fixed;
	bottom: calc(var(--sc-nav-height) + var(--sc-space-md) + env(safe-area-inset-bottom, 0px));
	right: var(--sc-space-md);
	z-index: var(--sc-z-toast);
	display: flex;
	flex-direction: column-reverse;
	gap: var(--sc-space-sm);
	pointer-events: none;
}

@media (min-width: 1024px) {
	.toast-container {
		bottom: var(--sc-space-lg);
		right: var(--sc-space-lg);
	}
}

.toast {
	display: flex;
	align-items: flex-start;
	gap: var(--sc-space-sm);
	min-width: 16rem;
	max-width: 24rem;
	padding: var(--sc-space-md);
	background-color: var(--sc-surface);
	border: var(--sc-border-width) solid var(--sc-border);
	border-radius: var(--sc-radius-lg);
	box-shadow: var(--sc-shadow-lg);
	pointer-events: all;
	animation: toast-enter var(--sc-transition-normal) var(--sc-ease-out);
}

.toast--exiting {
	animation: toast-exit var(--sc-transition-fast) var(--sc-ease-default) forwards;
}

@keyframes toast-enter {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes toast-exit {
	to {
		opacity: 0;
		transform: translateX(16px);
	}
}

.toast__icon {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 1px;
}

.toast--success .toast__icon { color: var(--sc-success); }
.toast--error .toast__icon   { color: var(--sc-error); }
.toast--warning .toast__icon { color: var(--sc-warning); }
.toast--info .toast__icon    { color: var(--sc-accent); }

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

.toast__message {
	font-family: var(--sc-font-ui);
	font-size: var(--sc-text-sm);
	color: var(--sc-text-primary);
	line-height: 1.4;
}

.toast__dismiss {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: none;
	border-radius: var(--sc-radius-full);
	background: none;
	color: var(--sc-text-tertiary);
	cursor: pointer;
	transition: color var(--sc-transition-fast) var(--sc-ease-default);
}

.toast__dismiss:hover {
	color: var(--sc-text-primary);
}

.toast__dismiss svg {
	width: 0.875rem;
	height: 0.875rem;
}
