/* Ukrycie następuje już podczas pierwszego renderowania. Element odzyskuje
 * widoczność dopiero po przeniesieniu do kontenera toastów przez JavaScript. */
.woocommerce-message:not([data-jswn-ready="true"]),
.woocommerce-error:not([data-jswn-ready="true"]),
.woocommerce-info:not([data-jswn-ready="true"]),
.woocommerce-notice:not([data-jswn-ready="true"]) {
	display: none !important;
}

.jswn-container {
	position: fixed;
	z-index: 999999;
	right: 0px;
	left: 0px;
	margin: 0 auto;
	bottom: 24px;
	display: flex;
	flex-direction: column-reverse;
	gap: 10px;
	width: min(620px, calc(100vw - 48px));
	pointer-events: none;
}

.jswn-toast {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 42px;
	min-height: 74px;
	overflow: hidden;
	border: 1px solid #34322f;
	background: #282725;
	color: #fff;
	box-shadow: 0 18px 50px rgba(24, 22, 19, .2);
	opacity: 0;
	pointer-events: auto;
	transform: translate3d(0, calc(100% + 28px), 0);
	transition: opacity .35s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
}

.jswn-toast.is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

.jswn-toast.is-leaving {
	opacity: 0;
	pointer-events: none;
	transform: translate3d(0, 24px, 0);
	transition-duration: .3s;
}

.jswn-content {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 15px 6px 15px 18px;
}

.jswn-icon {
	display: grid;
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, .36);
	border-radius: 50%;
}

.jswn-icon svg,
.jswn-close svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.6;
}

.jswn-toast .woocommerce-message,
.jswn-toast .woocommerce-error,
.jswn-toast .woocommerce-info,
.jswn-toast .woocommerce-notice {
	display: flex !important;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-width: 0;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: inherit !important;
	box-shadow: none !important;
	font-size: 13px;
	line-height: 1.5;
	list-style: none !important;
}

.jswn-toast .woocommerce-message::before,
.jswn-toast .woocommerce-error::before,
.jswn-toast .woocommerce-info::before,
.jswn-toast .woocommerce-notice::before,
.jswn-toast .woocommerce-message::after,
.jswn-toast .woocommerce-error::after,
.jswn-toast .woocommerce-info::after,
.jswn-toast .woocommerce-notice::after {
	display: none !important;
	content: none !important;
}

.jswn-toast .woocommerce-error {
	align-items: flex-start;
	flex-direction: column;
	justify-content: center;
}

.jswn-toast .woocommerce-error li {
	margin: 0;
	padding: 0;
}

.jswn-toast .button,
.jswn-toast a.button {
	order: 2;
	flex: 0 0 auto;
	min-height: 38px;
	margin: 0 !important;
	padding: 0 15px !important;
	border: 1px solid rgba(255, 255, 255, .45) !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #fff !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 36px !important;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: background-color .2s ease, color .2s ease;
}

.jswn-toast .button:hover,
.jswn-toast a.button:hover {
	background: #fff !important;
	color: #282725 !important;
}

.jswn-close {
	display: grid;
	width: 42px;
	height: 100%;
	min-height: 42px;
	padding: 0;
	place-items: center;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, .72);
	cursor: pointer;
}

.jswn-close:hover {
	color: #fff;
}

.jswn-close:focus-visible,
.jswn-toast .button:focus-visible {
	outline: 1px solid #fff;
	outline-offset: -4px;
}

.jswn-progress {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 2px;
	background: rgba(255, 255, 255, .78);
	transform-origin: left center;
	animation: jswn-progress var(--jswn-duration) linear forwards;
}

.jswn-toast.is-paused .jswn-progress {
	animation-play-state: paused;
}

.jswn-toast--error {
	border-color: #9e493f;
	background: #7e352e;
}

.jswn-toast--info {
	border-color: #aaa39a;
	background: #f4f0e9;
	color: #282725;
}

.jswn-toast--info .jswn-icon {
	border-color: rgba(40, 39, 37, .3);
}

.jswn-toast--info .jswn-close {
	color: rgba(40, 39, 37, .7);
}

.jswn-toast--info .button,
.jswn-toast--info a.button {
	border-color: #282725 !important;
	color: #282725 !important;
}

.jswn-toast--info .button:hover,
.jswn-toast--info a.button:hover {
	background: #282725 !important;
	color: #fff !important;
}

.jswn-toast--info .jswn-progress {
	background: #282725;
}

@keyframes jswn-progress {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

@media (max-width: 640px) {
	.jswn-container {
		right: 12px;
		bottom: 12px;
		width: calc(100vw - 24px);
	}

	.jswn-content {
		align-items: flex-start;
		padding-left: 14px;
	}

	.jswn-toast .woocommerce-message,
	.jswn-toast .woocommerce-error,
	.jswn-toast .woocommerce-info,
	.jswn-toast .woocommerce-notice {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jswn-toast {
		transform: none;
		transition: opacity .15s linear;
	}

	.jswn-progress {
		display: none;
	}
}
