/**
 * CleanWave — WooCommerce notices (global, premium)
 */

.woocommerce-notices-wrapper {
	margin: 0 0 0.85rem;
}

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

/* —— Base status chip (tylko wrappery notice — nie layout strony) ── */

:is(
	.woocommerce-notices-wrapper,
	.cw-commerce-notices,
	.cw-flow-notices,
	.cw-checkout-notices,
	.cw-account-page .woocommerce-MyAccount-content
) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error),
:is(
	.woocommerce-notices-wrapper,
	.cw-commerce-notices,
	.cw-flow-notices,
	.cw-checkout-notices
) ul.woocommerce-error,
.entry-content > :is(.woocommerce-message, .woocommerce-info, .woocommerce-error),
.entry-content > ul.woocommerce-error {
	position: relative;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
	width: auto;
	max-width: min(100%, 38rem);
	margin: 0 0 0.65rem !important;
	padding: 0.62rem 1rem 0.62rem 2.35rem !important;
	border: 1px solid var(--cw-border, #e8e8e4) !important;
	border-top-color: var(--cw-border, #e8e8e4) !important;
	border-radius: 999px !important;
	background: var(--cw-white, #fff) !important;
	box-shadow: none !important;
	color: var(--cw-graphite, #2b2b2b) !important;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.45;
	list-style: none !important;
	overflow: visible;
}

ul.woocommerce-error {
	flex-direction: column;
	align-items: flex-start;
	max-width: 100%;
	padding-left: 2.35rem !important;
	border-radius: var(--cw-radius-lg, 16px) !important;
}

ul.woocommerce-error li {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	list-style: none;
}

ul.woocommerce-error li + li {
	margin-top: 0.35rem;
	padding-top: 0.35rem;
	border-top: 1px solid rgba(220, 38, 38, 0.12);
}

.woocommerce-message {
	border-color: rgba(26, 92, 255, 0.16) !important;
	background: rgba(26, 92, 255, 0.035) !important;
	color: var(--cw-black, #0a0a0a) !important;
}

.woocommerce-info {
	border-color: var(--cw-border, #e8e8e4) !important;
	background: var(--cw-stone, #f5f4f0) !important;
}

.woocommerce-error,
ul.woocommerce-error {
	border-color: rgba(220, 38, 38, 0.18) !important;
	background: rgba(220, 38, 38, 0.035) !important;
	color: #9b2c1a !important;
	border-radius: var(--cw-radius-lg, 16px) !important;
}

/* —— Ikona statusu ─────────────────────────────────────── */

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before,
ul.woocommerce-error::before {
	position: absolute !important;
	top: 50% !important;
	left: 0.8rem !important;
	transform: translateY(-50%) !important;
	width: 1.125rem !important;
	height: 1.125rem !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-family: inherit !important;
	font-size: 0.625rem !important;
	font-weight: 700 !important;
	line-height: 1.125rem !important;
	text-align: center !important;
	text-indent: 0 !important;
	overflow: visible !important;
	content: "✓" !important;
	color: #fff !important;
	background: var(--cw-blue, #1a5cff) !important;
	box-shadow: none !important;
}

.woocommerce-info::before {
	content: "i" !important;
	font-size: 0.6875rem !important;
	font-style: italic;
	font-weight: 600 !important;
	background: var(--cw-graphite, #2b2b2b) !important;
}

.woocommerce-error::before,
ul.woocommerce-error::before {
	content: "!" !important;
	font-size: 0.6875rem !important;
	font-weight: 700 !important;
	background: #dc2626 !important;
}

ul.woocommerce-error li::before {
	display: none !important;
}

/* —— Komunikaty z przyciskiem ─────────────────────────── */

.woocommerce-message:has(.button),
.woocommerce-message:has(.woocommerce-Button),
.woocommerce-info:has(.button),
.woocommerce-info:has(.woocommerce-Button),
.woocommerce-error:has(.button),
.woocommerce-error:has(.woocommerce-Button) {
	display: flex;
	justify-content: space-between;
	width: 100%;
	max-width: 100%;
	border-radius: var(--cw-radius-lg, 16px) !important;
	padding: 0.85rem 1rem 0.85rem 2.5rem !important;
}

.woocommerce-message .button,
.woocommerce-message a.button,
.woocommerce-info .button,
.woocommerce-info a.button,
.woocommerce-error .button,
.woocommerce-error a.button,
.woocommerce-message .woocommerce-Button,
.woocommerce-info .woocommerce-Button,
.woocommerce-error .woocommerce-Button,
.woocommerce-message a.woocommerce-Button,
.woocommerce-info a.woocommerce-Button,
.woocommerce-error a.woocommerce-Button {
	float: none !important;
	order: 2;
	flex: 0 0 auto;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	margin: 0 !important;
	padding: 0 1.05rem !important;
	border: 1px solid var(--cw-blue, #1a5cff) !important;
	border-radius: 999px !important;
	background: var(--cw-blue, #1a5cff) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	text-shadow: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition:
		background 0.25s var(--cw-ease, ease),
		border-color 0.25s var(--cw-ease, ease),
		transform 0.25s var(--cw-ease, ease);
}

.woocommerce-info .button,
.woocommerce-info a.button,
.woocommerce-info .woocommerce-Button,
.woocommerce-info a.woocommerce-Button {
	border-color: var(--cw-black, #0a0a0a) !important;
	background: var(--cw-black, #0a0a0a) !important;
}

.woocommerce-error .button,
.woocommerce-error a.button,
.woocommerce-error .woocommerce-Button,
.woocommerce-error a.woocommerce-Button {
	border-color: #dc2626 !important;
	background: #dc2626 !important;
}

.woocommerce-message .button:hover,
.woocommerce-message a.button:hover,
.woocommerce-info .button:hover,
.woocommerce-info a.button:hover,
.woocommerce-error .button:hover,
.woocommerce-error a.button:hover,
.woocommerce-message .woocommerce-Button:hover,
.woocommerce-info .woocommerce-Button:hover,
.woocommerce-error .woocommerce-Button:hover {
	background: var(--cw-blue-hover, #1449d4) !important;
	border-color: var(--cw-blue-hover, #1449d4) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.woocommerce-info .button:hover,
.woocommerce-info a.button:hover,
.woocommerce-info .woocommerce-Button:hover {
	background: var(--cw-graphite, #2b2b2b) !important;
	border-color: var(--cw-graphite, #2b2b2b) !important;
}

.woocommerce-error .button:hover,
.woocommerce-error a.button:hover,
.woocommerce-error .woocommerce-Button:hover {
	background: #b91c1c !important;
	border-color: #b91c1c !important;
}

@media (max-width: 639px) {
	.woocommerce-message:has(.button),
	.woocommerce-message:has(.woocommerce-Button),
	.woocommerce-info:has(.button),
	.woocommerce-info:has(.woocommerce-Button),
	.woocommerce-error:has(.button),
	.woocommerce-error:has(.woocommerce-Button) {
		flex-direction: column;
		align-items: stretch;
	}

	.woocommerce-message .button,
	.woocommerce-message a.button,
	.woocommerce-info .button,
	.woocommerce-info a.button,
	.woocommerce-error .button,
	.woocommerce-error a.button,
	.woocommerce-message .woocommerce-Button,
	.woocommerce-info .woocommerce-Button,
	.woocommerce-error .woocommerce-Button {
		width: 100%;
		margin-top: 0.15rem !important;
	}
}

/* —— Konteksty stron ─────────────────────────────────── */

.cw-flow-notices,
.cw-checkout-notices {
	padding: 0.75rem 0 1.25rem;
}

body.cw-cart-page .cw-flow-notices.cw-commerce-notices,
body.cw-checkout-page .cw-checkout-notices.cw-commerce-notices {
	padding-top: 0.85rem;
	padding-bottom: 1.5rem;
	margin-bottom: 0.15rem;
	border-bottom: 1px solid var(--cw-border, #e8e8e4);
}

.cw-flow-notices .woocommerce-notices-wrapper,
.cw-checkout-notices .woocommerce-notices-wrapper {
	margin: 0;
}

body.cw-cart-page .cw-flow-notices.cw-commerce-notices .woocommerce-notices-wrapper,
body.cw-checkout-page .cw-checkout-notices.cw-commerce-notices .woocommerce-notices-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	width: 100%;
}

body.cw-cart-page .cw-flow-notices.cw-commerce-notices :is(.woocommerce-message, .woocommerce-info, .woocommerce-error),
body.cw-checkout-page .cw-checkout-notices.cw-commerce-notices :is(.woocommerce-message, .woocommerce-info, .woocommerce-error),
body.cw-cart-page .cw-flow-notices.cw-commerce-notices ul.woocommerce-error,
body.cw-checkout-page .cw-checkout-notices.cw-commerce-notices ul.woocommerce-error {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	border-radius: 14px !important;
}

.cw-account-page .woocommerce-MyAccount-content .woocommerce-notices-wrapper {
	margin-bottom: 1rem;
}

/* —— Koszyk / PDP — pełna szerokość, jedna kolumna ───── */

.cw-commerce-notices .woocommerce-notices-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	width: 100%;
	margin: 0 0 0.85rem;
}

.cw-commerce-notices .woocommerce-message,
.cw-commerce-notices .woocommerce-info,
.cw-commerce-notices .woocommerce-error,
.cw-commerce-notices ul.woocommerce-error {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 14px !important;
	border-top-width: 1px !important;
	overflow: hidden;
	box-shadow: 0 10px 28px rgba(10, 12, 20, 0.06);
}

.cw-commerce-notices .woocommerce-message {
	border-color: rgba(26, 92, 255, 0.14) !important;
	background: linear-gradient(180deg, rgba(26, 92, 255, 0.05) 0%, #fff 100%) !important;
	box-shadow: 0 12px 32px rgba(26, 92, 255, 0.08);
}

.cw-commerce-notices .woocommerce-info {
	border-color: rgba(10, 12, 20, 0.1) !important;
	background: #fafaf8 !important;
}

.cw-commerce-notices .woocommerce-error,
.cw-commerce-notices ul.woocommerce-error {
	border-color: rgba(220, 38, 38, 0.2) !important;
	background: linear-gradient(180deg, rgba(220, 38, 38, 0.05) 0%, #fff 100%) !important;
	border-radius: 14px !important;
}

.cw-commerce-notices .woocommerce-message::before,
.cw-commerce-notices .woocommerce-info::before,
.cw-commerce-notices .woocommerce-error::before,
.cw-commerce-notices ul.woocommerce-error::before {
	top: 1.1rem !important;
	left: 1rem !important;
	transform: none !important;
	width: 1.35rem !important;
	height: 1.35rem !important;
	font-size: 0.75rem !important;
	line-height: 1.35rem !important;
	border-radius: 999px !important;
}

.cw-commerce-notices .woocommerce-info::before {
	background: var(--cw-graphite, #2b2b2b) !important;
}

.cw-commerce-notices .woocommerce-message .button,
.cw-commerce-notices .woocommerce-message a.button,
.cw-commerce-notices .woocommerce-info .button,
.cw-commerce-notices .woocommerce-info a.button {
	display: none !important;
}

.cw-commerce-notices .cw-pdp-notice__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	padding: 0.95rem 1rem 0.95rem 3rem;
}

.cw-commerce-notices .cw-pdp-notice__text {
	margin: 0;
	flex: 1 1 12rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.45;
	color: var(--cw-black, #0a0a0a);
}

.cw-commerce-notices .cw-pdp-notice__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 38px;
	padding: 0 1rem;
	border: 1px solid var(--cw-blue, #1a5cff);
	border-radius: 999px;
	background: var(--cw-blue, #1a5cff) !important;
	color: #fff !important;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cw-commerce-notices .cw-pdp-notice__cta:hover {
	background: #1248d4 !important;
	box-shadow: 0 8px 20px rgba(26, 92, 255, 0.22);
	transform: translateY(-1px);
	color: #fff !important;
}

.cw-commerce-notices .cw-pdp-notice__cta-arrow {
	font-size: 0.9rem;
	line-height: 1;
	opacity: 0.9;
}

#cw-cart-config {
	scroll-margin-top: calc(var(--cw-header-offset, 7rem) + 1rem);
}
