@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--green: #0aa94a;
	--dark-green: #2a864f;
	--blue: #0986bb;
	--dark-blue: #0a4966;
	--grey: #af7dac;
	--dark-grey: #75787b;
	--red: #c11e1e;
	--dark-red: #501d1d;
	--bkg: #083e5f;
	--white: #ebebeb;
}

body {
	min-height: 100vh;
	display: grid;
	place-items: center;
	background-color: var(--bkg);
	font-family: "Poppins", sans-serif;
}

.section{
	width: 400px;
	height: 200px;
	position: relative;
}

/* Toast Notifications 
------------------------------------------*/
.toast-section {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 350px;
	height: 100px;
	overflow: hidden;
}

.toast {
	position: absolute;
	width: 350px;
	display: grid;
	grid-template-columns: 6vmin 1fr;
	align-items: center;
	border-radius: 5px;
	overflow: hidden;
	--padding: 0.8em;
	box-shadow: rgba(17, 17, 26, 0.1) 0px 8px 24px,
		rgba(17, 17, 26, 0.1) 0px 16px 56px, rgba(17, 17, 26, 0.1) 0px 24px 80px;
	opacity: 0;
	transform: translateY(120px);
	transition: transform 1500ms cubic-bezier(0.16, 0, 0, 1.42);
}

.toast:nth-child(1) .toast-msg {
	background-color: var(--green);
}
.toast:nth-child(1) .toast-icon {
	background-color: var(--dark-green);
}
.toast:nth-child(2) .toast-msg {
	background-color: var(--blue);
}
.toast:nth-child(2) .toast-icon {
	background-color: var(--dark-blue);
}
.toast:nth-child(3) .toast-msg {
	background-color: var(--grey);
	color: var(--bkg);
}
.toast:nth-child(3) .toast-icon {
	background-color: var(--dark-grey);
}
.toast:nth-child(4) .toast-msg {
	background-color: var(--red);
}
.toast:nth-child(4) .toast-icon {
	background-color: var(--dark-red);
}

.toast svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: var(--white);
	stroke-width: 2;
}

.toast-icon {
	height: 100%;
	display: grid;
	place-items: center;
	padding: var(--padding);
}

.toast-msg {
	color: var(--white);
	font-size: 0.9rem;
	padding: var(--padding);
}
.toast-msg span {
	display: block;
	font-size: 0.7rem;
	opacity: 0.7;
}

/* Toast Buttons 
------------------------------------------*/
.toast-btns {
	position: absolute;
	bottom: 10%;
	left: 50%;
	transform: translateX(-50%);
	width: 350px;
	display: flex;
}
.toast-btns input {
	appearance: none;
}
.toast-btns label {
	color: var(--white);
	text-align: center;
	flex: 1 100%;
	font-size: 0.85rem;
	padding: 0.3em;
	cursor: pointer;
}

.toast-btns:has(:checked) + .toast-section .toast {
	opacity: 0;
	transform: translateY(120px);
	transition: transform 1500ms cubic-bezier(0.16, 0, 0, 1.42);
}

.toast-btns:has(#btn-success:checked)
	+ .toast-section
	.toast[id="success"] {
	opacity: 1;
	transform: translateY(20px);
}
#btn-success:checked + label {
	color: var(--green);
	font-weight: bolder;
}
.toast-btns:has(#btn-info:checked) + .toast-section .toast[id="info"] {
	opacity: 1;
	transform: translateY(20px);
}
#btn-info:checked + label {
	color: var(--blue);
	font-weight: bolder;
}
.toast-btns:has(#btn-pending:checked)
	+ .toast-section
	.toast[id="pending"] {
	opacity: 1;
	transform: translateY(20px);
}
#btn-pending:checked + label {
	color: var(--dark-grey);
	font-weight: bolder;
}
.toast-btns:has(#btn-error:checked) + .toast-section .toast[id="error"] {
	opacity: 1;
	transform: translateY(20px);
}
#btn-error:checked + label {
	color: var(--red);
	font-weight: bolder;
}