/* Phần tử chỉ dành cho khách vùng bắt buộc (class do JS gắn lên <html> khi đã xác định quốc gia). */
.blc-regulated-only { display: none !important; }
html.blc-regulated .blc-regulated-only { display: revert !important; }

/* BlackAha Consent — giao diện banner. Màu/chữ lấy theo biến của theme (theme.json) nếu có, không thì giá trị dự phòng. */
.blc-banner, .blc-modal, .blc-reopen {
	--blc-bg: var(--wp--preset--color--surface, #fff);
	--blc-ink: var(--wp--preset--color--ink, #111);
	--blc-soft: var(--wp--preset--color--ink-soft, #555);
	--blc-line: var(--wp--preset--color--line, #dcdcdc);
	--blc-brand: var(--wp--preset--color--brand, #2463eb);
	--blc-radius: var(--wp--custom--radius--lg, 14px);
	--blc-gap: var(--wp--preset--spacing--30, 12px);
	font-family: inherit;
	color: var(--blc-ink);
	box-sizing: border-box;
}
.blc-banner *, .blc-modal * { box-sizing: border-box; }
.blc-banner[hidden], .blc-modal[hidden], .blc-reopen[hidden] { display: none !important; }

.blc-banner { position: fixed; z-index: 99998; left: var(--blc-gap); right: var(--blc-gap); bottom: var(--blc-gap); display: flex; justify-content: center; pointer-events: none; }
.blc-banner.blc-pos-center { inset: 0; align-items: center; background: rgb(0 0 0 / .35); pointer-events: auto; }
.blc-box {
	pointer-events: auto;
	width: 100%; max-width: 760px; max-height: calc(100vh - 2 * var(--blc-gap)); overflow: auto;
	padding: calc(var(--blc-gap) * 1.6);
	background: var(--blc-bg); border: 1px solid var(--blc-line); border-radius: var(--blc-radius);
	box-shadow: 0 12px 40px rgb(0 0 0 / .18);
}
.blc-title { margin: 0 0 6px; font-weight: 700; font-size: var(--wp--preset--font-size--md, 1.05rem); }
.blc-msg, .blc-cat p, .blc-links { margin: 0 0 var(--blc-gap); font-size: var(--wp--preset--font-size--sm, .9rem); line-height: 1.5; color: var(--blc-soft); }
.blc-links a { color: var(--blc-brand); margin-inline-end: 12px; white-space: nowrap; }
/* Accept và Reject cùng kiểu, cùng độ nổi (hướng dẫn của cơ quan bảo vệ dữ liệu EU). */
.blc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.blc-btn {
	flex: 1 1 140px; min-height: 44px; padding: 8px 16px; border-radius: 10px; cursor: pointer;
	font: inherit; font-weight: 600; font-size: var(--wp--preset--font-size--sm, .95rem);
	background: var(--blc-brand); color: #fff; border: 1px solid var(--blc-brand);
}
.blc-btn:hover { filter: brightness(1.08); }
.blc-box:focus { outline: none; }
.blc-btn:focus-visible, .blc-reopen:focus-visible { outline: 3px solid var(--blc-brand); outline-offset: 2px; }
.blc-btn-link { background: transparent; color: var(--blc-ink); border-color: var(--blc-line); }
.blc-modal { position: fixed; z-index: 99999; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--blc-gap); background: rgb(0 0 0 / .45); }
.blc-modal .blc-box { max-width: 560px; }
.blc-cat { padding: var(--blc-gap) 0; border-top: 1px solid var(--blc-line); }
.blc-cat label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.blc-cat input { width: 18px; height: 18px; accent-color: var(--blc-brand); }
.blc-cat p { margin: 4px 0 0 26px; }
.blc-reopen {
	position: fixed; z-index: 99990; left: var(--blc-gap); bottom: var(--blc-gap);
	width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
	background: var(--blc-bg); color: var(--blc-ink); border: 1px solid var(--blc-line); box-shadow: 0 4px 14px rgb(0 0 0 / .12);
}
/* Thanh sát chân trang (position = bar): toàn chiều ngang, dính đáy màn hình; chữ bên trái, nút bên phải. */
.blc-banner.blc-pos-bar { left: 0; right: 0; bottom: 0; }
.blc-pos-bar .blc-box {
	max-width: none; border-radius: 0; border-width: 1px 0 0; box-shadow: 0 -8px 30px rgb(0 0 0 / .10);
	padding: calc(var(--blc-gap) * 1.4) max(var(--blc-gap), calc((100% - var(--wp--style--global--wide-size, 1200px)) / 2));
	display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title actions" "msg actions"; column-gap: calc(var(--blc-gap) * 3); align-items: center;
}
.blc-pos-bar .blc-title { grid-area: title; margin-bottom: 2px; }
.blc-pos-bar .blc-msg { grid-area: msg; margin: 0; }
.blc-pos-bar .blc-actions { grid-area: actions; flex-wrap: nowrap; }
.blc-pos-bar .blc-btn { flex: 0 0 auto; min-width: 128px; }
@media (max-width: 900px) {
	.blc-pos-bar .blc-box { grid-template-columns: 1fr; grid-template-areas: "title" "msg" "actions"; row-gap: 0; padding: 14px 16px; }
	.blc-pos-bar .blc-actions { margin-top: var(--blc-gap); }
	.blc-pos-bar .blc-btn { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 600px) {
	.blc-banner:not(.blc-pos-bar) { left: 8px; right: 8px; bottom: 8px; }
	.blc-box { padding: 16px; }
	.blc-actions { flex-wrap: nowrap; gap: 6px; }
	.blc-btn { flex: 1 1 0; min-width: 0; padding: 8px 6px; }   /* 3 nút một hàng — banner thấp hơn */
}
@media (prefers-reduced-motion: no-preference) {
	.blc-box { animation: blc-in .25s ease-out; }
	@keyframes blc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* Bảng cookie ([blackaha_cookie_table]) — cuộn ngang trên màn hình hẹp. */
.blc-cookie-table { margin: var(--wp--preset--spacing--40, 20px) 0; overflow-x: auto; }
.blc-cookie-table table { width: 100%; border-collapse: collapse; font-size: var(--wp--preset--font-size--sm, .9rem); }
.blc-cookie-table :is(th, td) { padding: 10px 12px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--wp--preset--color--line, #dcdcdc); }
.blc-cookie-table thead th { font-size: var(--wp--preset--font-size--xs, .8rem); text-transform: uppercase; letter-spacing: .04em; color: var(--wp--preset--color--ink-soft, #555); background: var(--wp--preset--color--surface-alt, #f7f7f8); }
.blc-cookie-table code { font-size: .95em; white-space: nowrap; }
