/* =========================================================
   trockeneis24 – WooCommerce-Hinweise (Erfolg, Fehler, Info)
   Klassisch (.woocommerce-message/-error/-info) und Block-Banner
   (.wc-block-components-notice-banner), wie WooCommerce 10 sie auch
   im klassischen Warenkorb/Checkout ausgibt. Geladen auf allen
   WooCommerce-Seiten (Produkt, Shop, Warenkorb, Kasse, Konto).
   Farben: Erfolg grün (wie Prototyp .cform__done), Fehler Warnton
   (Prototyp .buy__error / .field__input.is-invalid), Info Marke.
   ========================================================= */

body {
	--te-ok: oklch(0.6 0.13 155);
	--te-ok-ink: oklch(0.38 0.1 155);
	--te-ok-soft: oklch(0.62 0.13 155 / 0.10);
	--te-ok-line: oklch(0.62 0.13 155 / 0.35);
	--te-err-ink: oklch(0.42 0.09 58);
}

.woocommerce-notices-wrapper:empty { display: none; }

:is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner) {
	--te-n-bg: var(--brand-soft);
	--te-n-line: var(--brand-line);
	--te-n-ico: var(--brand);
	--te-n-ink: var(--ink-2);
	position: relative;
	display: block;
	margin: 0 0 1.25rem;
	padding: 0.95rem 1.1rem 0.95rem 3.55rem;
	list-style: none;
	font-size: var(--text-sm);
	line-height: 1.55;
	color: var(--te-n-ink);
	background: var(--te-n-bg);
	border: 1px solid var(--te-n-line);
	border-radius: var(--r-md);
	box-shadow: none;
	outline: none;
	text-align: left;
}
/* WooCommerce-Standard (Rahmen oben, Font-Icon) aus */
:is(.woocommerce-message, .woocommerce-error, .woocommerce-info)::after { content: none !important; display: none; }
.woocommerce :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) { border-top-width: 1px; }

/* Icon-Kachel links: Kreis mit Symbol (Maske, kein Icon-Font) */
:is(.woocommerce-message, .woocommerce-error, .woocommerce-info)::before {
	content: "" !important;
	position: absolute !important;
	left: 1.05rem !important; top: 0.85rem !important;
	display: block;
	width: 30px; height: 30px;
	margin: 0;
	border-radius: 50%;
	background: var(--te-n-ico) var(--te-n-mask, none) center / 16px no-repeat;
	font-family: inherit !important;
	box-shadow: 0 0 0 4px color-mix(in oklch, var(--te-n-ico) 14%, transparent);
}
.woocommerce-info::before {
	--te-n-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 11v6'/%3E%3Cpath d='M12 7.2v.1'/%3E%3C/svg%3E");
}
.woocommerce-message::before {
	--te-n-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.woocommerce-error::before {
	--te-n-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 7v6'/%3E%3Cpath d='M12 16.8v.1'/%3E%3C/svg%3E");
}

.woocommerce-message { --te-n-bg: var(--te-ok-soft); --te-n-line: var(--te-ok-line); --te-n-ico: var(--te-ok); }
.woocommerce-error { --te-n-bg: var(--caution-soft); --te-n-line: var(--caution-line); --te-n-ico: var(--caution-deep); --te-n-ink: var(--te-err-ink); }
.woocommerce-error li { margin: 0; padding: 0; }
.woocommerce-error li + li { margin-top: 0.35rem; }

/* Block-Banner (WooCommerce 8.5+ auch in klassischen Vorlagen) */
.wc-block-components-notice-banner.is-success { --te-n-bg: var(--te-ok-soft); --te-n-line: var(--te-ok-line); --te-n-ico: var(--te-ok); }
.wc-block-components-notice-banner.is-error { --te-n-bg: var(--caution-soft); --te-n-line: var(--caution-line); --te-n-ico: var(--caution-deep); --te-n-ink: var(--te-err-ink); }
.wc-block-components-notice-banner.is-info,
.wc-block-components-notice-banner.is-default { --te-n-bg: var(--brand-soft); --te-n-line: var(--brand-line); --te-n-ico: var(--brand); }
.wc-block-components-notice-banner.wc-block-components-notice-banner { display: flex; align-items: flex-start; gap: 0.9rem; margin: 0 0 1.25rem; padding: 0.95rem 1.1rem; border-width: 1px; border-color: var(--te-n-line); background: var(--te-n-bg); color: var(--te-n-ink); font-size: var(--text-sm); }
.wc-block-components-notice-banner > svg {
	box-sizing: content-box;
	width: 18px; height: 18px; padding: 6px;
	border-radius: 50%;
	background: var(--te-n-ico);
	fill: #fff;
	box-shadow: 0 0 0 4px color-mix(in oklch, var(--te-n-ico) 14%, transparent);
}
.wc-block-components-notice-banner__content { align-self: center; color: inherit; }
.wc-block-components-notice-banner__content ul { margin: 0; padding: 0; list-style: none; }
.wc-block-components-notice-banner__content li + li { margin-top: 0.35rem; }

/* Fett und Links in Hinweisen */
:is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner) strong { color: inherit; font-weight: 800; }
:is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner) a:not(.button) {
	color: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}

/* Knopf im Hinweis (z. B. „Warenkorb anzeigen“, „Zum Warenkorb …“ bei CPS-Abweichung): rechts bzw. darunter, ruhige Variante */
:is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner) .button {
	float: none !important;
	display: inline-flex; align-items: center; justify-content: center;
	margin: 0.6rem 0.6rem 0 0 !important;
	padding: 0.6em 1.1em !important;
	font-size: var(--text-sm); font-weight: 700; line-height: 1.2;
	color: var(--ink) !important;
	background: var(--surface) !important; background-image: none !important;
	border: 1px solid var(--line-2) !important;
	border-radius: var(--r-pill) !important;
	box-shadow: var(--shadow-sm);
	text-decoration: none;
}
@media (hover: hover) {
	:is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner) .button:hover { border-color: var(--brand-line) !important; color: var(--brand-strong) !important; }
}
:is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner) .button:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; }

/* Mobil: Knopf im Hinweis in eigener Zeile statt mitten im umbrechenden Satz (Konto › Bestellungen leer) */
@media (max-width: 560px) {
	:is(.woocommerce-message, .woocommerce-error, .woocommerce-info, .wc-block-components-notice-banner) .button.button { display: flex !important; width: fit-content; min-height: 44px; margin: 0.75rem 0 0 !important; }
}
