.abis-toast-region {
	position: fixed;
	z-index: 999999;
	right: 18px;
	bottom: 22px;
	display: grid;
	width: min(380px, calc(100vw - 32px));
	gap: 10px;
	pointer-events: none;
}

.abis-toast {
	position: relative;
	display: grid;
	min-height: 58px;
	padding: 12px 14px 12px 42px;
	grid-template-columns: 28px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	border: 1px solid #dce7f4;
	border-radius: 13px;
	background: rgba(255, 255, 255, .98);
	box-shadow: 0 16px 42px rgba(21, 56, 95, .16);
	color: #183c68;
	font-family: var(--abis-font-family, "IranYekan", Tahoma, sans-serif);
	font-size: 13px;
	font-weight: 650;
	line-height: 1.8;
	pointer-events: auto;
	transform: translateY(14px) scale(.98);
	opacity: 0;
	transition: opacity .22s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
}

.abis-toast.is-visible {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.abis-toast.is-leaving {
	transform: translateY(8px) scale(.985);
	opacity: 0;
}

.abis-toast__icon {
	display: grid;
	width: 28px;
	height: 28px;
	place-items: center;
	border-radius: 50%;
	background: #eaf3ff;
	color: #0869ed;
	font-size: 16px;
	font-weight: 900;
}

.abis-toast--success .abis-toast__icon {
	background: #e7f8ee;
	color: #11864d;
}

.abis-toast--error .abis-toast__icon {
	background: #fff0f1;
	color: #d92f43;
}

.abis-toast--warning .abis-toast__icon {
	background: #fff7df;
	color: #b77a00;
}

.abis-toast__close {
	position: absolute;
	top: 9px;
	left: 9px;
	display: grid;
	width: 26px;
	height: 26px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #7d8da2;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.abis-toast__close:hover {
	background: #f1f5fa;
	color: #183c68;
}

@media (max-width: 767px) {
	.abis-toast-region {
		right: 12px;
		bottom: 76px;
		width: calc(100vw - 24px);
	}
	.abis-toast {
		min-height: 54px;
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.abis-toast { transition: opacity .01ms linear; }
}

/* WooCommerce's full-width notice banners are replaced by ABIS toasts. Hiding
 * them in CSS also prevents a flash before the deferred notification script
 * reads and removes their text. */
body .woocommerce-notices-wrapper,
body .woocommerce-message[role="alert"],
body .woocommerce-error[role="alert"],
body .woocommerce-info[role="alert"] {
	display: none !important;
}

.is-abis-cart-loading {
	position: relative;
	pointer-events: none !important;
	opacity: .72;
}

.is-abis-cart-loading::after {
	content: "";
	display: inline-block;
	width: 15px;
	height: 15px;
	margin-right: 7px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	vertical-align: middle;
	animation: abis-cart-button-spin .65s linear infinite;
}

@keyframes abis-cart-button-spin { to { transform: rotate(360deg); } }
