/* IranWear Toast Notices — floating WooCommerce notices */

.iw-toast-host {
	position: fixed;
	z-index: 100000;
	inset-inline-start: 16px;
	inset-block-start: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: min(100% - 32px, 380px);
	pointer-events: none;
}

body.admin-bar .iw-toast-host {
	inset-block-start: 62px;
}

@media (min-width: 783px) {
	body.admin-bar .iw-toast-host {
		inset-block-start: 46px;
	}
}

.iw-toast {
	pointer-events: auto;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid transparent;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
	background: #fff;
	color: #1f2937;
	font-size: 0.92rem;
	line-height: 1.65;
	direction: rtl;
	text-align: right;
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

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

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

.iw-toast__body {
	flex: 1 1 auto;
	min-width: 0;
}

.iw-toast__body a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
}

.iw-toast__body .button,
.iw-toast__body .restore-item,
.iw-toast__body .wc-forward {
	display: inline-flex;
	align-items: center;
	margin-inline-start: 8px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid currentColor;
	background: transparent;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none !important;
	cursor: pointer;
}

.iw-toast__close {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: -4px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.7;
}

.iw-toast__close:hover,
.iw-toast__close:focus-visible {
	opacity: 1;
	background: rgba(0, 0, 0, 0.06);
	outline: none;
}

.iw-toast--success {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}

.iw-toast--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.iw-toast--info {
	background: #eef1fb;
	border-color: #c7d2fe;
	color: #3d5cb8;
}

/* Hide default notice stack; toasts mirror their content */
.woocommerce-notices-wrapper:has(.woocommerce-message, .woocommerce-error, .woocommerce-info),
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info,
ul.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
