.mail-letter {
	position: relative;
	display: block;
	height: auto;
}

.mail-letter > .card {
	animation: linear mailLetter 250ms 500ms backwards;
}

.mail-letter:after {
	position: absolute;
	display: block;
	z-index: 1;
	left: 0;
	right: 0;
	bottom: 0;
	width: auto;
	height: 75%;
	background-image: linear-gradient(to bottom, rgba(244, 244, 252, 0), rgb(244, 244, 252));
	content: "";
}

html.dark-mode .mail-letter:after {
	background-image: linear-gradient(to bottom, rgba(28, 28, 30, 0), rgb(28, 28, 30));
}

@media (prefers-color-scheme: dark) {
	html:not(.light-mode) .mail-letter:after {
		background-image: linear-gradient(to bottom, rgba(28, 28, 30, 0), rgb(28, 28, 30));
	}
}

.mail-letter .mail-notification {
	position: relative;
}

.mail-letter .mail-notification > .mr-3 {
	position: relative;
	z-index: 2;
	animation: linear mailNotificationAppIconParent 250ms 450ms backwards;
}

.mail-letter .mail-notification > .media-body {
	position: relative;
	z-index: 1;
	animation: linear mailNotificationSubjectParent 200ms 450ms backwards;
}

.mail-letter .mail-notification .app-icon {
	width: 64px;
	height: 64px;
	line-height: 64px;
	border-radius: 12px;
	text-align: center;
	background-color: deepskyblue;
	color: white;
	font-size: 28px;
}

.mail-letter .mail-notification .app-icon + .badge {
	position: absolute;
	right: -0.5rem;
	top: -0.5rem;
	animation: linear mailNotificationBadge 250ms 200ms backwards;
}

.mail-letter .mail-content {
	animation: linear mailContent 250ms 500ms backwards;
}

@keyframes mailLetter {
	0% {
		background-color: transparent;
		border-color: transparent;
	}
}

@keyframes mailContent {
	0% {
		opacity: 0;
		transform: translateY(-15px);
	}
}

@keyframes mailNotificationAppIconParent {
	0% {
		transform: translateX(250%);
	}
}

@keyframes mailNotificationSubjectParent {
	0% {
		opacity: 0;
		transform: translateX(48px);
	}
	75% {
		opacity: 0.25;
	}
}

@keyframes mailNotificationBadge {
	0% {
		transform: scale(0);
	}
	75% {
		transform: scale(1.2);
	}
}
