/* =====================================================================
 * Notifikasi WooCommerce SERAGAM (21 Nov 2026).
 * Satu desain untuk .woocommerce-message / -info / -error / .coupon-error-notice
 * di seluruh storefront. Warna aksen mengikuti Pengaturan Global Toko lewat
 * --zsd-co-* (diinjeksi zsd_tema_global_pasang); nilai di bawah adalah cadangan.
 * Selector sengaja digandakan (.x.x.x) supaya menang atas gaya per-halaman lama
 * (cart-restyle, checkout-restyle, akun-app, woo-compat-botiga) tanpa mengedit file itu.
 * ===================================================================== */
body {
	--nt-aksen: var(--zsd-co-coklat, #6b5744);
	--nt-aksen-gelap: var(--zsd-co-coklat-hover, color-mix(in srgb, var(--nt-aksen) 78%, black));
	--nt-teks: var(--zsd-co-teks, #2c2620);
	--nt-muted: var(--zsd-co-teks-muted, #6f6558);
	--nt-ok: #2e7d4f;
	--nt-err: #c0392b;
	--nt-radius: 14px;
}

body .woocommerce-notices-wrapper { margin: 0; }

body .woocommerce-message.woocommerce-message.woocommerce-message,
body .woocommerce-info.woocommerce-info.woocommerce-info,
body .woocommerce-error.woocommerce-error.woocommerce-error,
body .coupon-error-notice.coupon-error-notice.coupon-error-notice {
	--nt-nada: var(--nt-aksen);
	position: relative;
	box-sizing: border-box;
	margin: 0 0 24px !important;
	padding: 22px 20px 22px 76px !important;
	min-height: 68px;
	background: color-mix(in srgb, var(--nt-nada) 6%, #fff) !important;
	border: 1px solid color-mix(in srgb, var(--nt-nada) 24%, #fff) !important;
	border-radius: var(--nt-radius) !important;
	box-shadow: none !important;
	color: var(--nt-teks) !important;
	font-size: 14px;
	font-weight: 500 !important;
	line-height: 1.55;
	text-align: left;
	list-style: none;
	display: block;
}
/* Pesan dengan judul + tombol: baris fleksibel, tombol di kanan */
body .woocommerce-message.woocommerce-message.woocommerce-message:has(.zsd-nt-isi) {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
}
body .woocommerce-message.woocommerce-message.woocommerce-message { --nt-nada: var(--nt-ok); }
body .woocommerce-error.woocommerce-error.woocommerce-error,
body .coupon-error-notice.coupon-error-notice.coupon-error-notice { --nt-nada: var(--nt-err); }

/* Ikon bulat di kiri + garis pemisah tipis */
body .woocommerce-message.woocommerce-message.woocommerce-message::before,
body .woocommerce-info.woocommerce-info.woocommerce-info::before,
body .woocommerce-error.woocommerce-error.woocommerce-error::before,
body .coupon-error-notice.coupon-error-notice.coupon-error-notice::before {
	content: "" !important;
	position: absolute !important;
	left: 20px !important;
	top: 50% !important;
	transform: translateY(-50%);
	width: 36px !important;
	height: 36px !important;
	margin: 0 !important;
	border-radius: 50%;
	background-color: var(--nt-nada) !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 20px 20px !important;
	color: #fff !important;
	font-size: 0 !important;
	line-height: 0 !important;
	border: 0 !important;
}
body .woocommerce-message.woocommerce-message.woocommerce-message::after,
body .woocommerce-info.woocommerce-info.woocommerce-info::after,
body .woocommerce-error.woocommerce-error.woocommerce-error::after,
body .coupon-error-notice.coupon-error-notice.coupon-error-notice::after {
	content: "" !important;
	position: absolute;
	left: 64px;
	top: 16px;
	bottom: 16px;
	width: 1px;
	background: color-mix(in srgb, var(--nt-nada) 35%, #fff);
	display: block;
	clear: none;
}
body .woocommerce-message.woocommerce-message.woocommerce-message::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") !important;
}
body .woocommerce-info.woocommerce-info.woocommerce-info::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 11v6'/%3E%3Cpath d='M12 7.2h.01'/%3E%3C/svg%3E") !important;
}
body .woocommerce-error.woocommerce-error.woocommerce-error::before,
body .coupon-error-notice.coupon-error-notice.coupon-error-notice::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5v7'/%3E%3Cpath d='M12 17.4h.01'/%3E%3C/svg%3E") !important;
}

/* Teks: warna dikunci agar tidak ditimpa aturan lama */
body .woocommerce-message.woocommerce-message *,
body .woocommerce-info.woocommerce-info *,
body .woocommerce-error.woocommerce-error *,
body .coupon-error-notice.coupon-error-notice * { box-sizing: border-box; }
body .woocommerce-error.woocommerce-error.woocommerce-error li {
	list-style: none;
	margin: 0;
	padding: 0;
	color: var(--nt-teks) !important;
}
body .woocommerce-error.woocommerce-error.woocommerce-error li + li { margin-top: 4px; }
body .woocommerce-message a:not(.button),
body .woocommerce-info a:not(.button),
body .woocommerce-error a:not(.button) {
	color: var(--nt-aksen) !important;
	font-weight: 600;
	text-decoration: underline;
}

/* Judul + keterangan pesan "ditambahkan ke keranjang" */
body .woocommerce-message .zsd-nt-isi { display: block; flex: 1 1 260px; min-width: 0; }
body .woocommerce-message .zsd-nt-judul { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--nt-ok) !important; }
body .woocommerce-message .zsd-nt-teks { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--nt-muted) !important; word-break: break-word; }

/* Tombol aksi di kanan (Lihat Keranjang) */
body .woocommerce-message.woocommerce-message .zsd-nt-aksi,
body .woocommerce-message.woocommerce-message > a.button {
	float: none !important;
	flex: none;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	order: 2;
	margin: 0 0 0 auto !important;
	min-height: 44px;
	padding: 0 22px !important;
	background: var(--nt-aksen) !important;
	border: 0 !important;
	border-radius: var(--cp-radius, 6px) !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	white-space: nowrap;
	box-shadow: none !important;
	transition: background .15s ease;
}
body .woocommerce-message.woocommerce-message .zsd-nt-aksi:hover,
body .woocommerce-message.woocommerce-message .zsd-nt-aksi:focus-visible,
body .woocommerce-message.woocommerce-message > a.button:hover {
	background: var(--nt-aksen-gelap) !important;
	color: #fff !important;
}
body .woocommerce-message .zsd-nt-aksi span { color: inherit !important; }
/* Ikon tombol digambar lewat CSS (wc_kses_notice membuang <svg>): keranjang di kiri, panah di kanan */
body .woocommerce-message .zsd-nt-aksi::before,
body .woocommerce-message .zsd-nt-aksi::after {
	content: "" !important;
	position: static !important;
	display: block !important;
	flex: none;
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	background: currentColor !important;
	border: 0 !important;
	transform: none !important;
	-webkit-mask: var(--nt-ikon) center / contain no-repeat;
	mask: var(--nt-ikon) center / contain no-repeat;
}
body .woocommerce-message .zsd-nt-aksi::before { --nt-ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2.2l2.1 10.2a1.6 1.6 0 0 0 1.6 1.3h7.6a1.6 1.6 0 0 0 1.6-1.2L19.6 8H6.2'/%3E%3Ccircle cx='9.5' cy='19.3' r='1.2'/%3E%3Ccircle cx='16.5' cy='19.3' r='1.2'/%3E%3C/svg%3E"); }
body .woocommerce-message .zsd-nt-aksi::after { --nt-ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='13 6 19 12 13 18'/%3E%3C/svg%3E"); }

@media (max-width: 640px) {
	body .woocommerce-message.woocommerce-message.woocommerce-message,
	body .woocommerce-info.woocommerce-info.woocommerce-info,
	body .woocommerce-error.woocommerce-error.woocommerce-error,
	body .coupon-error-notice.coupon-error-notice.coupon-error-notice {
		padding: 18px 16px 18px 64px !important;
		margin-bottom: 18px !important;
		min-height: 60px;
	}
	body .woocommerce-message.woocommerce-message.woocommerce-message::before,
	body .woocommerce-info.woocommerce-info.woocommerce-info::before,
	body .woocommerce-error.woocommerce-error.woocommerce-error::before,
	body .coupon-error-notice.coupon-error-notice.coupon-error-notice::before { left: 14px !important; width: 34px !important; height: 34px !important; }
	body .woocommerce-message.woocommerce-message.woocommerce-message::after,
	body .woocommerce-info.woocommerce-info.woocommerce-info::after,
	body .woocommerce-error.woocommerce-error.woocommerce-error::after,
	body .coupon-error-notice.coupon-error-notice.coupon-error-notice::after { left: 56px; }
	body .woocommerce-message .zsd-nt-judul { font-size: 15px; }
	body .woocommerce-message.woocommerce-message .zsd-nt-aksi,
	body .woocommerce-message.woocommerce-message > a.button {
		flex: 1 1 100%;
		order: 3;
		margin: 10px 0 0 !important;
		width: 100%;
	}
}

/* Notifikasi kupon di dalam kartu kode promo (sempit): versi ringkas */
body .coupon-error-notice.coupon-error-notice.coupon-error-notice {
	min-height: 0;
	padding: 12px 14px 12px 58px !important;
	margin: 10px 0 0 !important;
	font-size: 13px;
	border-radius: 12px !important;
}
body .coupon-error-notice.coupon-error-notice.coupon-error-notice::before { left: 14px !important; width: 30px !important; height: 30px !important; background-size: 17px 17px !important; }
body .coupon-error-notice.coupon-error-notice.coupon-error-notice::after { left: 52px; top: 10px; bottom: 10px; }
