/* ==========================================
   WooCommerce Notices als Popup
   Blau (Primary) + Creme (Background)
   Animation • OK-Button • Auto-Close
   Multiple Notices • Mobile Optimized
   Theme-Safe (Reset) • Dark-Mode-Safe
   ========================================== */

:root {
	--wc-popup-blue: #1B4F72;
	--wc-popup-cream: #F8F4EC;
	--wc-popup-text: #333333;
	--wc-popup-radius: 10px;
	--wc-popup-btn-text: #F8F4EC;
	--wc-popup-btn-bg: #1B4F72;
	--wc-popup-btn-bg-hover: #163c57;
}

/* Grundstruktur ---------------------------------------------------------- */

.rf-wc-notice-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.rf-wc-notice-modal.is-visible {
	display: flex;
}

.rf-wc-notice-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

/* Animation -------------------------------------------------------------- */

@keyframes rf-wc-modal-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Dialog Box ------------------------------------------------------------- */

.rf-wc-notice-modal__dialog {
	position: relative;
	z-index: 1;
	max-width: 520px;
	width: 92%;
	background: var(--wc-popup-cream);
	border-radius: var(--wc-popup-radius);
	padding: 1.75rem 2rem 1.5rem;
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
	border: 4px solid var(--wc-popup-blue);
	animation: rf-wc-modal-in 0.25s ease-out;
}

/* Inhalt --------------------------------------------------------------- */

.rf-wc-notice-content {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* ----------------- THEME-/WOOCOMMERCE-RESET --------------------------- */
/* Reset ALL Notices only inside the modal — removes ALL theme/Woo styling */

.rf-wc-notice-modal .woocommerce-message,
.rf-wc-notice-modal .woocommerce-error,
.rf-wc-notice-modal .woocommerce-info {
	all: unset !important;
}

/* ----------------- NEUES CLEANES NOTICE-STYLING ------------------------ */

.rf-wc-notice-modal .woocommerce-message,
.rf-wc-notice-modal .woocommerce-error,
.rf-wc-notice-modal .woocommerce-info {
	display: block;
	box-sizing: border-box;
	width: 100%;

	margin: 0;
	padding: 1rem 1.25rem;

	font-size: 1rem;
	line-height: 1.5;
	color: var(--wc-popup-text);

	background: #ffffff;
	border-radius: var(--wc-popup-radius);
	border: none !important;
	border-left: 5px solid var(--wc-popup-blue);
	box-shadow: none !important;
}

/* Remove Woo default icons inside modal */
.rf-wc-notice-modal .woocommerce-message::before,
.rf-wc-notice-modal .woocommerce-error::before,
.rf-wc-notice-modal .woocommerce-info::before {
	content: none !important;
	display: none !important;
}

/* Typ-Spezifisch -------------------------------------------------------- */

.rf-wc-notice-modal .woocommerce-message {
	border-left-color: var(--wc-popup-blue);
	background: #ffffff;
}

.rf-wc-notice-modal .woocommerce-error {
	border-left-color: #a94442;
	background: #fff5f5;
}

.rf-wc-notice-modal .woocommerce-info {
	border-left-color: var(--wc-popup-blue);
	background: #ffffff;
}

/* Listen in Meldungen --------------------------------------------------- */

.rf-wc-notice-modal .woocommerce-error ul,
.rf-wc-notice-modal .woocommerce-message ul,
.rf-wc-notice-modal .woocommerce-info ul {
	margin: 0.25rem 0 0;
	padding-left: 1.2em;
}

.rf-wc-notice-modal .woocommerce-error li,
.rf-wc-notice-modal .woocommerce-message li,
.rf-wc-notice-modal .woocommerce-info li {
	list-style: disc;
}

.rf-wc-notice-modal .woocommerce-error li + li,
.rf-wc-notice-modal .woocommerce-message li + li,
.rf-wc-notice-modal .woocommerce-info li + li {
	margin-top: 0.2rem;
}

/* OK Button ------------------------------------------------------------- */

.rf-wc-notice-actions {
	margin-top: 1.2rem;
	display: flex;
	justify-content: flex-end;
}

.rf-wc-notice-ok {
	border: none;
	border-radius: 999px;
	padding: 0.5rem 1.4rem;
	font-size: 0.95rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
	background: var(--wc-popup-btn-bg);
	color: var(--wc-popup-btn-text);
	transition: 0.2s ease;
	white-space: nowrap;
}

.rf-wc-notice-ok:hover,
.rf-wc-notice-ok:focus {
	background: var(--wc-popup-btn-bg-hover);
	outline: none;
}

.rf-wc-notice-ok:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

/* Mobile --------------------------------------------------------------- */

@media (max-width: 600px) {

	.rf-wc-notice-modal__dialog {
		max-width: 100%;
		width: 94%;
		padding: 1.4rem 1.25rem 1.2rem;
		border-width: 3px;
	}

	.rf-wc-notice-modal .woocommerce-message,
	.rf-wc-notice-modal .woocommerce-error,
	.rf-wc-notice-modal .woocommerce-info {
		font-size: 0.95rem;
		padding: 0.85rem 1rem;
	}

	.rf-wc-notice-actions {
		margin-top: 1rem;
		justify-content: center;
	}

	.rf-wc-notice-ok {
		width: 100%;
		text-align: center;
		padding: 0.6rem 1.2rem;
	}
}

/* Dark Mode ------------------------------------------------------------ */

@media (prefers-color-scheme: dark) {
	.rf-wc-notice-modal__dialog {
		box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
	}

	.rf-wc-notice-modal .woocommerce-error {
		background: #3c1d1d;
		color: #f7eaea;
	}

	.rf-wc-notice-modal .woocommerce-message,
	.rf-wc-wc-notice-modal .woocommerce-info {
		background: #fdfdfd;
		color: #222222;
	}
}