/* WooCommerce Popup Notices Styles */

/* Overlay */
.woocommerce-notices-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.woocommerce-notices-overlay.show {
	opacity: 1;
	pointer-events: auto;
}

/* Popup Container */
.woocommerce-notices-popup {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	padding: 24px;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.woocommerce-notices-overlay.show .woocommerce-notices-popup {
	transform: scale(1);
}

/* Close Button */
.woocommerce-notices-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
	z-index: 10;
}

.woocommerce-notices-close:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

.woocommerce-notices-close svg {
	width: 20px;
	height: 20px;
	stroke: #333;
	stroke-width: 2;
}

/* Content Container */
.woocommerce-notices-content {
	padding-right: 16px; /* Space for close button */
}

/* WooCommerce Notice Styles (Inside Popup) */
.woocommerce-notices-content .woocommerce-message,
.woocommerce-notices-content .woocommerce-error,
.woocommerce-notices-content .woocommerce-info,
.woocommerce-notices-content .woocommerce-notice {
	padding: 16px 20px;
	margin-bottom: 12px;
	border-radius: 8px;
	border-left: 4px solid;
	font-size: 14px;
	line-height: 1.6;
	display: flex;
	align-items: flex-start;
}

.woocommerce-notices-content .woocommerce-message:last-child,
.woocommerce-notices-content .woocommerce-error:last-child,
.woocommerce-notices-content .woocommerce-info:last-child,
.woocommerce-notices-content .woocommerce-notice:last-child {
	margin-bottom: 0;
}

/* Success Messages */
.woocommerce-notices-content .woocommerce-message {
	background-color: #d4edda;
	border-color: #28a745;
	color: #155724;
}

/* Error Messages */
.woocommerce-notices-content .woocommerce-error {
	background-color: #f8d7da;
	border-color: #dc3545;
	color: #721c24;
}

/* Info Messages */
.woocommerce-notices-content .woocommerce-info,
.woocommerce-notices-content .woocommerce-notice {
	background-color: #d1ecf1;
	border-color: #17a2b8;
	color: #0c5460;
}

/* Remove default WooCommerce ::before icons */
.woocommerce-notices-content .woocommerce-message::before,
.woocommerce-notices-content .woocommerce-error::before,
.woocommerce-notices-content .woocommerce-info::before,
.woocommerce-notices-content .woocommerce-notice::before {
	display: none;
}

/* Links inside notices */
.woocommerce-notices-content .woocommerce-message a,
.woocommerce-notices-content .woocommerce-error a,
.woocommerce-notices-content .woocommerce-info a,
.woocommerce-notices-content .woocommerce-notice a {
	color: inherit;
	text-decoration: underline;
	font-weight: 600;
}

/* Lists inside notices */
.woocommerce-notices-content ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-notices-content ul li {
	margin-bottom: 4px;
}

.woocommerce-notices-content ul li:last-child {
	margin-bottom: 0;
}

/* Responsive */
@media (max-width: 640px) {
	.woocommerce-notices-popup {
		width: 95%;
		padding: 20px;
		max-height: 90vh;
	}

	.woocommerce-notices-close {
		top: 12px;
		right: 12px;
	}
}

/* Toast Notifications */
.rw-notification {
	position: fixed;
	top: 20px;
	right: 20px;
	min-width: 320px;
	max-width: 500px;
	background: #fff;
	border-radius: 2px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 16px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	z-index: 999999;
	animation: slideInRight 0.3s ease-out;
	border-left: 4px solid;
}

@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideOutRight {
	from {
		transform: translateX(0);
		opacity: 1;
	}
	to {
		transform: translateX(100%);
		opacity: 0;
	}
}

.rw-notification.hiding {
	animation: slideOutRight 0.3s ease-out forwards;
}

/* Notification Types */
.rw-notification--success {
	border-left-color: #18a84d;
}

.rw-notification--error {
	border-left-color: #e01d1d;
}

.rw-notification--info {
	border-left-color: #0064c8;
}

/* Notification Content */
.rw-notification__content {
	flex: 1;
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.rw-notification__icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rw-notification--success .rw-notification__icon {
	color: #18a84d;
}

.rw-notification--error .rw-notification__icon {
	color: #e01d1d;
}

.rw-notification--info .rw-notification__icon {
	color: #0064c8;
}

.rw-notification__message {
	flex: 1;
	font-size: 14px;
	line-height: 1.5;
	color: #111739;
	word-break: break-word;
}

/* Close Button */
.rw-notification__close {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 2px;
	color: #656b89;
	transition: all 0.2s ease;
}

.rw-notification__close:hover {
	background-color: #f3f6f9;
	color: #111739;
}

/* Stacking Multiple Notifications */
.rw-notification:nth-child(2) {
	top: calc(20px + 80px);
}

.rw-notification:nth-child(3) {
	top: calc(20px + 160px);
}

.rw-notification:nth-child(4) {
	top: calc(20px + 240px);
}

/* Mobile Responsive */
@media (max-width: 640px) {
	.rw-notification {
		left: 16px;
		right: 16px;
		min-width: auto;
		max-width: none;
	}
	
	.rw-notification:nth-child(2) {
		top: calc(16px + 76px);
	}
	
	.rw-notification:nth-child(3) {
		top: calc(16px + 152px);
	}
	
	.rw-notification:nth-child(4) {
		top: calc(16px + 228px);
	}
}
