/* Toast Notifications */
.toast-container {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	left: auto;
	z-index: 9999;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-width: calc(100vw - 2rem);
}

@media (max-width: 640px) {
	.toast-container {
		bottom: 1rem;
		left: 1rem;
		right: 1rem;
		max-width: none;
	}
}

.toast {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	border-radius: 0.75rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
	min-height: 3.5rem;
	max-width: 28rem;
	backdrop-filter: blur(8px);
}

@media (max-width: 640px) {
	.toast {
		max-width: none;
		min-height: auto;
	}
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(100%);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes slideOut {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(100%);
	}
}

@media (max-width: 640px) {
	@keyframes slideIn {
		from {
			opacity: 0;
			transform: translateY(100%);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	@keyframes slideOut {
		from {
			opacity: 1;
			transform: translateY(0);
		}
		to {
			opacity: 0;
			transform: translateY(100%);
		}
	}
}

.toast.removing {
	animation: slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Toast Types */
.toast-success {
	background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
	border: 1px solid #a7f3d0;
	color: #065f46;
}

.toast-success .toast-icon {
	background: #10b981;
	color: white;
}

.toast-error {
	background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
	border: 1px solid #fecaca;
	color: #7f1d1d;
}

.toast-error .toast-icon {
	background: #ef4444;
	color: white;
}

.toast-warning {
	background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
	border: 1px solid #fde68a;
	color: #78350f;
}

.toast-warning .toast-icon {
	background: #f59e0b;
	color: white;
}

.toast-info {
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	border: 1px solid #bfdbfe;
	color: #1e3a8a;
}

.toast-info .toast-icon {
	background: #3b82f6;
	color: white;
}

.toast-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 0.5rem;
	flex-shrink: 0;
}

.toast-icon svg {
	width: 1.125rem;
	height: 1.125rem;
}

.toast-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.toast-title {
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.25;
}

.toast-message {
	font-size: 0.875rem;
	opacity: 0.9;
	line-height: 1.4;
}

.toast-close {
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	padding: 0.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border-radius: 0.375rem;
	transition: all 0.2s ease;
	opacity: 0.7;
}

.toast-close:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.05);
}

.toast-close svg {
	width: 1.25rem;
	height: 1.25rem;
}

/* Progress bar */
.toast-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 2px;
	background: currentColor;
	opacity: 0.4;
	animation: progress linear forwards;
}

@keyframes progress {
	from {
		width: 100%;
	}
	to {
		width: 0%;
	}
}