/* Hlášky WooCommerce (ÚKOL 038).
 * Úspěch zeleně — červená hláška „přidáno do košíku“ by na červeném webu splynula s prodejním sdělením.
 * Zelená a šedomodrá v paletě Avady nejsou, proto vlastní proměnné tady; červená je firemní (color4).
 * Ikony kreslí CSS (kolečko + znak), žádná knihovna ikon; ikonu WooCommerce (svg) i Avady (<i>) skrýváme. */
:root {
	--alpas-ok: #2E7D32;
	--alpas-ok-bg: #EEF7EF;
	--alpas-info: #4A6A8A;
	--alpas-info-bg: #F0F4F8;
}

.wc-block-components-notice-banner,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.fusion-woo-notices-tb .wc-block-components-notice-banner,
.fusion-woo-notices-tb .woocommerce-message,
.fusion-woo-notices-tb .woocommerce-error,
.fusion-woo-notices-tb .woocommerce-info {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	gap: 12px;
	margin: 0 0 16px !important;
	padding: 14px 18px 14px 54px !important;
	border: 0 !important;
	border-left: 4px solid var(--alpas-info) !important;
	border-radius: 8px !important;
	background: var(--alpas-info-bg) !important;
	color: var(--awb-color8) !important;
	font-size: 15px !important;
	line-height: 1.5 !important;
	list-style: none !important;
	text-align: left !important;
	box-shadow: none !important;
}
.wc-block-components-notice-banner.is-success,
.woocommerce-message,
.fusion-woo-notices-tb .woocommerce-message {
	border-left-color: var(--alpas-ok) !important;
	background: var(--alpas-ok-bg) !important;
}
.wc-block-components-notice-banner.is-error,
.woocommerce-error,
.fusion-woo-notices-tb .woocommerce-error {
	border-left-color: var(--awb-color4) !important;
	background: var(--awb-custom_color_7) !important;
}

/* Odsazení uvnitř nejméně 14 px i tam, kde prvek Avady Woo Notices nastavuje vlastní (košík, pokladna 12 px) */
body .fusion-woo-notices-tb .woocommerce-notices-wrapper .wc-block-components-notice-banner,
body .woocommerce-notices-wrapper .wc-block-components-notice-banner,
body .wc-block-components-notice-banner,
#payment .payment_methods .wc-block-components-notice-banner,
#payment .wc-block-components-notice-banner {
	padding: 14px 18px 14px 54px !important;
}

/* Ikona: kolečko 24 px v barvě pruhu se znakem ✓ / ! / i */
.wc-block-components-notice-banner::before,
.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
	content: "i" !important;
	display: block !important; /* Avada ikonu z ::before skrývá, když prvek Woo Notices kreslí vlastní <i> */
	position: absolute !important;
	left: 18px !important;
	top: 50% !important;
	transform: translateY(-50%);
	width: 24px !important;
	height: 24px !important;
	border-radius: 50%;
	background: var(--alpas-info);
	color: #fff !important;
	font: 700 15px/24px Georgia, "Times New Roman", serif !important;
	text-align: center;
	margin: 0 !important;
}
.wc-block-components-notice-banner.is-success::before,
.woocommerce-message::before {
	content: "✓" !important;
	background: var(--alpas-ok);
	font: 700 14px/24px Arial, sans-serif !important;
}
.wc-block-components-notice-banner.is-error::before,
.woocommerce-error::before {
	content: "!" !important;
	background: var(--awb-color4);
	font: 700 15px/24px Arial, sans-serif !important;
}
.wc-block-components-notice-banner > svg,
.wc-block-components-notice-banner .fusion-woo-notices-tb-icon,
.fusion-woo-notices-tb .fusion-woo-notices-tb-icon,
.woocommerce-message > .fusion-woo-notices-tb-icon {
	display: none !important;
}

/* Obsah: text v inkoustové barvě, tlačítko „Zobrazit košík“ vpravo (na mobilu pod textem) */
/* Flex jen u zprávy s tlačítkem (text ve span.wc-notices-text) — u běžné věty s odkazem uprostřed
   by flex vytrhl odkaz z věty („zvolte na . Razítko…“). */
.wc-block-components-notice-banner__content {
	display: block !important;
	flex: 1 1 auto;
	color: var(--awb-color8) !important;
	font-size: inherit !important;
}
.wc-block-components-notice-banner__content:has(> .wc-forward) {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	flex: 1 1 auto;
	color: var(--awb-color8) !important;
	font-size: inherit !important;
}
.wc-block-components-notice-banner__content .wc-notices-text,
.wc-block-components-notice-banner__content > * {
	color: var(--awb-color8) !important;
}
.wc-block-components-notice-banner__content .wc-notices-text {
	flex: 1 1 260px;
}
.wc-block-components-notice-banner strong,
.woocommerce-message strong {
	font-weight: 700;
}
.wc-block-components-notice-banner ul,
.woocommerce-error {
	margin: 0;
	padding-left: 0;
}
.wc-block-components-notice-banner a:not(.button),
.woocommerce-message a:not(.button),
.woocommerce-error a:not(.button),
.woocommerce-info a:not(.button) {
	color: var(--awb-color8) !important;
	text-decoration: underline;
}

/* „Zobrazit košík“ = tlačítko (další krok), ne odkaz */
.wc-block-components-notice-banner .button.wc-forward,
.woocommerce-message .button.wc-forward,
.fusion-woo-notices-tb .wc-forward {
	order: 2;
	float: none !important;
	display: inline-flex !important;
	align-items: center;
	margin: 0 0 0 auto !important;
	padding: 9px 18px !important;
	border: 0 !important;
	border-radius: 15px !important;
	background: var(--awb-color8) !important;
	color: var(--awb-color1) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	white-space: nowrap;
}
.wc-block-components-notice-banner .button.wc-forward:hover,
.woocommerce-message .button.wc-forward:hover,
.fusion-woo-notices-tb .wc-forward:hover {
	background: var(--awb-color4) !important;
	color: var(--awb-color1) !important;
}
/* Text a ikona tlačítka: prvek Woo Notices barví odkaz i jeho ikonu (::before, awb-icons) firemní červenou */
body.fusion-body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content a.wc-forward,
body.fusion-body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content a.wc-forward::before,
body.fusion-body .wc-block-components-notice-banner.is-success > .wc-block-components-notice-banner__content a.wc-forward,
body.fusion-body .woocommerce-message a.button.wc-forward {
	color: var(--awb-color1) !important;
}
body .fusion-woo-notices-tb .wc-block-components-notice-banner a.wc-forward::before {
	margin-right: 6px;
}

/* Avada u prvku Woo Notices tlačítko skrývá jen volbou show_button; obal nepotřebuje vlastní rámeček */
.fusion-woo-notices-tb {
	border: 0 !important;
}
@media (max-width: 640px) {
	/* na mobilu tlačítko pod textem, text přes celou šířku */
	body.fusion-body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content:has(> .wc-forward) {
		flex-direction: column !important;
		align-items: flex-start !important;
		flex-wrap: nowrap !important;
	}
	body.fusion-body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-notices-text {
		flex: 0 0 auto !important;
	}
	body.fusion-body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content a.wc-forward,
	.woocommerce-message .button.wc-forward {
		margin-left: 0 !important;
	}
}
