/**
 * Avisos WooCommerce — tema escuro + dourado (checkout, carrinho, conta, Imersão OCD).
 */

/* —— Base —— */
.woocommerce-notices-wrapper,
.woocommerce-NoticeGroup,
.imersao-notices {
	width: 100%;
	max-width: 100%;
}

body.woocommerce-account .woocommerce-notices-wrapper,
body.woocommerce-account .woocommerce-NoticeGroup {
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
}

.imersao-notices {
	width: min(100% - 40px, var(--max, 1120px));
	margin: 16px auto 0;
}

.sc-woo-notice-base,
ul.woocommerce-error,
.woocommerce-error:not(ul),
.woocommerce-message,
.woocommerce-info,
.woocommerce-notice,
.sc-notice,
.wc-block-components-notice-banner {
	list-style: none !important;
	margin: 0 0 1.25rem !important;
	padding: 1rem 1.15rem 1rem 1rem !important;
	border-radius: 12px !important;
	border: 1px solid rgba(197, 160, 89, 0.28) !important;
	border-left: 3px solid #c5a059 !important;
	background: rgba(5, 10, 20, 0.85) !important;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #f2f4f7 !important;
	font-family: Inter, system-ui, sans-serif !important;
	font-size: 0.95rem !important;
	line-height: 1.55 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

ul.woocommerce-error,
.woocommerce-error:not(ul),
.sc-notice--error,
.wc-block-components-notice-banner.is-error {
	border-color: rgba(248, 113, 113, 0.4) !important;
	border-left-color: #e57373 !important;
	background: rgba(60, 16, 16, 0.55) !important;
	color: #fecaca !important;
}

.woocommerce-message,
.sc-notice--success,
.wc-block-components-notice-banner.is-success {
	border-color: rgba(197, 160, 89, 0.35) !important;
	border-left-color: #c5a059 !important;
	background: rgba(197, 160, 89, 0.1) !important;
	color: #f6f3ec !important;
}

.woocommerce-info,
.sc-notice--info,
.wc-block-components-notice-banner.is-info {
	border-color: rgba(197, 160, 89, 0.35) !important;
	border-left-color: #c5a059 !important;
	background: rgba(197, 160, 89, 0.12) !important;
	color: #e7d3a1 !important;
}

.woocommerce-info,
.woocommerce-message:not(ul) {
	display: flex !important;
	align-items: flex-start !important;
	gap: 0.65rem !important;
	flex-wrap: wrap !important;
}

ul.woocommerce-error li,
.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
	margin: 0.25rem 0 !important;
	padding: 0 !important;
	color: inherit !important;
	background: transparent !important;
	border: 0 !important;
	list-style: none !important;
}

/* Remove ícones azuis padrão Woo / blocos */
ul.woocommerce-error::before,
ul.woocommerce-error::after,
.woocommerce-error::before,
.woocommerce-error::after,
.woocommerce-message::before,
.woocommerce-message::after,
.woocommerce-info::before,
.woocommerce-info::after,
.woocommerce-notice::before,
.woocommerce-notice::after {
	display: none !important;
	content: none !important;
}

.wc-block-components-notice-banner > svg,
.wc-block-components-notice-banner__icon svg {
	display: none !important;
}

.wc-block-components-notice-banner {
	display: flex !important;
	align-items: flex-start !important;
	gap: 0.65rem !important;
	padding-left: 1rem !important;
}

.wc-block-components-notice-banner::before {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.1rem;
	content: "";
	background-color: #c5a059;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
	mask-size: contain;
	-webkit-mask-size: contain;
	mask-repeat: no-repeat;
	-webkit-mask-repeat: no-repeat;
}

.wc-block-components-notice-banner.is-success::before {
	background-color: #c5a059;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

.wc-block-components-notice-banner.is-error::before {
	background-color: #f4a8a8;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

/* Links */
.woocommerce-notices-wrapper a:not(.button):not(.wc-forward),
.woocommerce-NoticeGroup a:not(.button):not(.wc-forward),
.imersao-notices a:not(.button):not(.wc-forward),
ul.woocommerce-error a:not(.button),
.woocommerce-message a:not(.button),
.woocommerce-info a:not(.button) {
	color: #c5a059 !important;
	text-decoration: underline !important;
	text-underline-offset: 2px;
	font-weight: 500 !important;
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
}

.woocommerce-notices-wrapper a:not(.button):not(.wc-forward):hover,
.woocommerce-NoticeGroup a:not(.button):not(.wc-forward):hover,
.imersao-notices a:not(.button):not(.wc-forward):hover,
ul.woocommerce-error a:not(.button):hover,
.woocommerce-message a:not(.button):hover,
.woocommerce-info a:not(.button):hover {
	color: #a6894a !important;
}

/* Botões dentro de avisos */
.woocommerce-info a.button,
.woocommerce-info .button.wc-forward,
.woocommerce-message a.button,
.woocommerce-message .button.wc-forward {
	display: inline-block !important;
	margin: 0.25rem 0 0 auto !important;
	padding: 0.45rem 0.9rem !important;
	border-radius: 8px !important;
	background: #c5a059 !important;
	border: 0 !important;
	color: #050a14 !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	text-decoration: none !important;
	flex-shrink: 0 !important;
}

.woocommerce-info a.button:hover,
.woocommerce-info .button.wc-forward:hover,
.woocommerce-message a.button:hover,
.woocommerce-message .button.wc-forward:hover {
	background: #a6894a !important;
	color: #050a14 !important;
}

/* Cupom — toggle */
.woocommerce-form-coupon-toggle,
.checkout_coupon,
.woocommerce-cart .coupon {
	font-family: Inter, system-ui, sans-serif !important;
}

.woocommerce-form-coupon-toggle .showcoupon,
.woocommerce-form-coupon-toggle a.showcoupon {
	color: #c5a059 !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.woocommerce-form-coupon-toggle .showcoupon:hover,
.woocommerce-form-coupon-toggle a.showcoupon:hover {
	color: #a6894a !important;
	text-decoration: underline !important;
}

/* Cupom — formulário (carrinho / conta) */
body.woocommerce-cart .coupon input.input-text,
body.woocommerce-account .woocommerce-form-coupon input.input-text,
.checkout_coupon input.input-text {
	background: rgba(255, 255, 255, 0.06) !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	color: #f2f4f7 !important;
	padding: 0.65rem 0.85rem !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	min-height: 44px;
}

body.woocommerce-cart .coupon input.input-text:focus,
body.woocommerce-account .woocommerce-form-coupon input.input-text:focus,
.checkout_coupon input.input-text:focus {
	border-color: #c5a059 !important;
	box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15) !important;
	outline: none !important;
}

body.woocommerce-cart .coupon button,
body.woocommerce-cart .coupon button.button,
body.woocommerce-account .woocommerce-form-coupon button,
.checkout_coupon button,
.checkout_coupon button.button {
	background: #c5a059 !important;
	border: 0 !important;
	color: #050a14 !important;
	font-weight: 700 !important;
	border-radius: 8px !important;
	padding: 0.65rem 1.1rem !important;
	font-family: Inter, sans-serif !important;
	min-height: 44px;
}

body.woocommerce-cart .coupon button:hover,
.checkout_coupon button:hover {
	background: #a6894a !important;
}

/* Cupom no checkout — alinha aos campos claros do formulário */
body.woocommerce-checkout .checkout_coupon input.input-text {
	background: #fff !important;
	border: 1px solid #e5e7eb !important;
	color: #111827 !important;
}

body.woocommerce-checkout .checkout_coupon input.input-text:focus {
	border-color: #c5a059 !important;
	box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1) !important;
}

body.woocommerce-checkout .checkout_coupon {
	margin-bottom: 1.25rem;
	padding: 1rem 1.15rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
}

/* Entrada suave */
@media (prefers-reduced-motion: no-preference) {
	@keyframes sc-woo-notice-in {
		from {
			opacity: 0;
			transform: translateY(-6px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	ul.woocommerce-error,
	.woocommerce-error:not(ul),
	.woocommerce-message,
	.woocommerce-info,
	.woocommerce-notice,
	.sc-notice,
	.wc-block-components-notice-banner {
		animation: sc-woo-notice-in 0.35s ease-out;
	}
}
