@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
	--dark: #34495e;
	--light: #fff;
	--success: #c3ebd9;
	--error: #ef9595e5;
	--warning: #f4e4a7;
	--info: #b6dbf4;
}

.notifications {
    display: flex;
	justify-content: flex-end;
	top: 30px;
	right: 0;
	position: fixed;
	width: 100%;
}

.notifications :where(.toast, .column) {
	display: flex;
	align-items: center;
}

/* for success */
.notifications .toast.success{
	width: fit-content;
	position: relative;
	height: fit-content;
	overflow: hidden;
	list-style: none;
	border-radius: 10px;
	padding: 16px 17px;
	margin-bottom: 10px;
	background: var(--success);
	justify-content: center;
	animation: show_toast 0.3s ease forwards;
}

.notifications .toast.success i{
	color: #0abf30;
}

/* for failed */
.notifications .toast.error{
	width: fit-content;
	position: relative;
	height: fit-content;
	overflow: hidden;
	list-style: none;
	border-radius: 10px;
	padding: 16px 17px;
	margin-bottom: 10px;
	background: var(--error);
	justify-content: center;
	animation: show_toast 0.3s ease forwards;
}

.notifications .toast.error i{
	color: #f24d4c;
}

/* for info */
.notifications .toast.info{
	width: fit-content;
	position: relative;
	height: fit-content;
	overflow: hidden;
	list-style: none;
	border-radius: 10px;
	padding: 16px 17px;
	margin-bottom: 10px;
	background: var(--info);
	justify-content: center;
	animation: show_toast 0.3s ease forwards;
}

.notifications .toast.info i{
	color: #3498db;
}

/* for warning */
.notifications .toast.warning{
	width: fit-content;
	position: relative;
	height: fit-content;
	overflow: hidden;
	list-style: none;
	border-radius: 10px;
	padding: 16px 17px;
	margin-bottom: 10px;
	background: var(--warning);
	justify-content: center;
	animation: show_toast 0.3s ease forwards;
}

.notifications .toast.warning i{
	color: #e9bd0c;
}

@keyframes show_toast {
	0% {
		transform: translateX(100%);
	}
	40% {
		transform: translateX(-5%);
	}
	80% {
		transform: translateX(0%);
	}
	100% {
		transform: translateX(-10%);
	}
}

.notifications .toast.hide {
	animation: hide_toast 0.3s ease forwards;
}

@keyframes hide_toast {
	0% {
		transform: translateX(-10%);
	}
	40% {
		transform: translateX(0%);
	}
	80% {
		transform: translateX(-5%);
	}
	100% {
		transform: translateX(calc(100% + 20px));
	}
}

.toast::before {
	position: absolute;
	content: '';
	height: 3px;
	width: 100%;
	bottom: 0;
	left: 0;
	animation: progress 5s linear forwards;
}

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




.toast .column span {
	font-size: 1.07rem;
	margin-left: 12px;
	font-family: sans-serif;
	color: #3B3131;
}

.toast i:last-child {
	color: #aeb0d7;
	cursor: pointer;
}

.toast i:last-child:hover {
	color: var(--dark);
}


@media screen and (max-width: 530px) {
	.notifications {
		width: 80%;
	}
	
	.notifications .toast {
		width: 100%;
		font-size: 1rem;
		margin-left: 20px;
	}
}