/* Thông báo kiểu Coolmate (assets/notices.js) */
.tb-toasts {
	position: fixed; z-index: 999999; top: 16px; left: 50%; transform: translateX(-50%);
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	width: max-content; max-width: calc(100vw - 32px); pointer-events: none;
}
.tb-toast {
	pointer-events: auto; display: flex; align-items: center; gap: 10px;
	max-width: 520px; padding: 12px 12px 12px 14px; border-radius: 14px;
	background: #1f1f1f; color: #fff; font-size: 14px; line-height: 1.45;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
	opacity: 0; transform: translateY(-10px); transition: opacity .2s ease, transform .2s ease;
}
.tb-toast.is-in { opacity: 1; transform: none; }
.tb-toast-ic { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.tb-toast-ic svg { width: 14px; height: 14px; }
.tb-toast.is-success .tb-toast-ic { background: #2fbf71; color: #fff; }
.tb-toast.is-info .tb-toast-ic { background: #2f45d6; color: #fff; }
.tb-toast.is-error { background: #fff; color: #1f1f1f; border: 1px solid #f3c4c4; }
.tb-toast.is-error .tb-toast-ic { background: #e5484d; color: #fff; }
.tb-toast-msg { flex: 1; min-width: 0; }
.tb-toast-msg p { margin: 0; }
.tb-toast-msg a { color: inherit; font-weight: 600; text-decoration: underline; }
.tb-toast-msg a.button, .tb-toast-msg .button {
	float: none !important; display: inline-block; margin: 0 0 0 8px !important; padding: 0 12px !important;
	min-height: 0; line-height: 28px; border-radius: 99px; font-size: 13px; text-transform: none; text-decoration: none;
	background: #fff !important; color: #111 !important; border: 0 !important;
}
.tb-toast.is-error .tb-toast-msg a.button { background: #111 !important; color: #fff !important; }
.tb-toast-x {
	flex: 0 0 auto; width: 26px; height: 26px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: inherit; opacity: .6; font-size: 20px; line-height: 26px; cursor: pointer;
}
.tb-toast-x:hover { opacity: 1; background: rgba(127, 127, 127, .15); }
/* Khung chứa thông báo cũ đã chuyển hết sang thẻ nổi: không chừa khoảng trống. */
.woocommerce-notices-wrapper.tb-notices-moved, .tb-coupon-msg.tb-notices-moved, .tb-notices-moved { display: none !important; }
/* Thanh thông báo của Flatsome trước khi JS chuyển thành thẻ nổi: ẩn sẵn để không nháy. */
body:not(.woocommerce-checkout) .message-wrapper.woocommerce-message:not(.tb-toast), body:not(.woocommerce-checkout) ul.woocommerce-error.message-wrapper { display: none !important; }

/* Lỗi khi bấm Đặt hàng: thẻ đỏ gọn trên form (giữ lại để khách biết ô nào cần sửa). */
.woocommerce-NoticeGroup-checkout .woocommerce-error,
.woocommerce-NoticeGroup-checkout .message-wrapper {
	list-style: none; margin: 0 0 16px; padding: 12px 16px 12px 44px; position: relative;
	border: 1px solid #f3c4c4; border-radius: 14px; background: #fff5f5; color: #b42318; font-size: 14px; line-height: 1.5;
}
.woocommerce-NoticeGroup-checkout .woocommerce-error::before {
	content: "!"; position: absolute; left: 14px; top: 12px; width: 20px; height: 20px; border-radius: 50%;
	background: #e5484d; color: #fff; font-weight: 700; font-size: 13px; line-height: 20px; text-align: center;
}
.woocommerce-NoticeGroup-checkout .woocommerce-error li { margin: 0; padding: 1px 0; }
.woocommerce-NoticeGroup-checkout .woocommerce-error a { color: inherit; font-weight: 600; }

@media (max-width: 549px) {
	.tb-toasts { top: 10px; width: calc(100vw - 20px); }
	.tb-toast { width: 100%; max-width: none; font-size: 13.5px; }
}
