/* ==========================================================
   LEARNVERIFIED — TOAST NOTIFICATIONS
========================================================== */

.lv-toast-region {
	position: fixed;
	z-index: 999999;
	top: 88px;
	right: 24px;

	display: flex;
	flex-direction: column;
	gap: 12px;

	width: min(380px, calc(100vw - 32px));

	pointer-events: none;
}

.lv-toast {
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr) 28px;
	align-items: start;
	gap: 12px;

	padding: 15px 14px;

	background: #fff;
	border: 1px solid var(--lv-border);
	border-radius: var(--lv-radius-md);

	box-shadow:
		0 12px 36px rgba(27, 42, 74, .16);

	font-family: var(--lv-font-body);

	pointer-events: auto;

	animation:
		lv-toast-in 180ms ease-out both;
}

.lv-toast.is-leaving {
	animation:
		lv-toast-out 180ms ease-in both;
}

.lv-toast__icon {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 30px;
	height: 30px;

	border-radius: 50%;
}

.lv-toast__icon > .lv-icon {
	--lv-icon-size: 17px;
}

.lv-toast__message {
	align-self: center;

	padding-top: 4px;

	color: var(--lv-text);
	font-size: var(--lv-text-sm);
	font-weight: 500;
	line-height: 1.45;
}

.lv-toast__close {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 28px;
	height: 28px;
	padding: 0;

	color: var(--lv-text-muted);
	background: transparent;
	border: 0;
	border-radius: var(--lv-radius-sm);

	cursor: pointer;
}

.lv-toast__close > .lv-icon {
	--lv-icon-size: 18px;
}

.lv-toast__close:hover {
	color: var(--lv-navy);
}

.lv-toast__close:focus-visible {
	outline: 3px solid rgba(201, 138, 44, .28);
	outline-offset: 2px;
}


/* ----------------------------------------------------------
   SUCCESS
---------------------------------------------------------- */

.lv-toast--success {
	border-left: 4px solid #16a34a;
}

.lv-toast--success
.lv-toast__icon {
	color: #166534;
	background: #dcfce7;
}


/* ----------------------------------------------------------
   INFORMATION
---------------------------------------------------------- */

.lv-toast--info {
	border-left: 4px solid var(--lv-gold);
}

.lv-toast--info
.lv-toast__icon {
	color: var(--lv-navy);
	background: rgba(201, 138, 44, .14);
}


/* ----------------------------------------------------------
   WARNING
---------------------------------------------------------- */

.lv-toast--warning {
	border-left: 4px solid #d97706;
}

.lv-toast--warning
.lv-toast__icon {
	color: #92400e;
	background: #fef3c7;
}


/* ----------------------------------------------------------
   ERROR
---------------------------------------------------------- */

.lv-toast--error {
	border-left: 4px solid #dc2626;
}

.lv-toast--error
.lv-toast__icon {
	color: #991b1b;
	background: #fee2e2;
}


/* ==========================================================
   MOTION
========================================================== */

@keyframes lv-toast-in {

	from {
		opacity: 0;
		transform: translateY(-8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes lv-toast-out {

	from {
		opacity: 1;
		transform: translateY(0);
	}

	to {
		opacity: 0;
		transform: translateY(-6px);
	}
}

@media (prefers-reduced-motion: reduce) {

	.lv-toast,
	.lv-toast.is-leaving {
		animation: none;
	}
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 767px) {

	.lv-toast-region {
		top: 72px;
		right: 16px;
		left: 16px;

		width: auto;
	}
}
