/* HỆ THỐNG THÀNH PHẦN — nạp SAU CÙNG (inc/assets.php) để mọi biến thể dùng chung một chuẩn.
   Xem trang Style guide (staging, riêng tư) để duyệt tổng thể. Token: theme.json custom.tag, custom.radius, bảng màu. */

/* ---------- 1. Viên in hoa (pill): tên tính năng, "Coming soon" ---------- */
:is(.bl-feature, .bl-page-hero) p.is-style-eyebrow:not(.bl-tag p),
.wp-block-group.bl-tag,
.bl-soon {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--custom--tag--gap);
	width: fit-content;
	height: var(--wp--custom--tag--height);
	padding: 0 var(--wp--custom--tag--pad);
	border-radius: var(--wp--custom--radius--pill);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: var(--wp--custom--tag--tracking);
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: middle;
}
.wp-block-group.bl-tag { padding-inline-start: calc(var(--wp--custom--tag--pad) * .75); }
.bl-tag p.is-style-eyebrow { height: auto; padding: 0; line-height: 1; letter-spacing: inherit; }

/* ---------- 2. Chip (chữ thường, viền mảnh): tính năng, logo nền tảng ---------- */
p.is-style-chip {
	height: var(--wp--custom--tag--height);
	padding: 0 var(--wp--custom--tag--pad);
	border-radius: var(--wp--custom--radius--pill);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}
.wp-block-group.is-style-chips { gap: var(--wp--preset--spacing--20); }

/* 3. Nền section: core-group.css (4 loại). */

/* ---------- 4. Icon trong thẻ: một kiểu (bo md, màu thương hiệu trên nền nhạt); nền tối: biến thể tối ---------- */
.wp-block-blackaha-lens-icon.has-background, .bl-icon.has-background { border-radius: var(--wp--custom--radius--md); }

/* ---------- Style guide (trang riêng tư): ô mẫu màu ---------- */
.bl-sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: var(--wp--preset--spacing--30); }
.bl-sg-swatch { display: grid; gap: var(--wp--preset--spacing--10); font-size: var(--wp--preset--font-size--xs); }
.bl-sg-swatch i { display: block; height: 3rem; border-radius: var(--wp--custom--radius--md); border: var(--wp--custom--border--thin) solid var(--wp--preset--color--line); }

/* ---------- Ảnh chia sẻ Open Graph (Style guide → tools/build-og-image) ---------- */
.wp-block-group.bl-og-card {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--wp--custom--og--media);
	align-items: center;
	gap: var(--wp--custom--og--pad);
	width: var(--wp--custom--og--width);
	max-width: none;
	height: var(--wp--custom--og--height);
	margin-inline: auto;
	padding: var(--wp--custom--og--pad);
	background: var(--wp--preset--gradient--hero);
	overflow: hidden;
}
.bl-og-card > * { margin: 0 !important; }   /* !important: thắng khoảng cách mặc định của layout */
.bl-og-card .wp-block-site-logo img { width: var(--wp--custom--og--logo); height: auto; }
.bl-og-card h2 { font-size: var(--wp--custom--og--title); line-height: 1.1; margin-block: var(--wp--preset--spacing--40); }
.bl-og-card .bl-svg { box-shadow: var(--wp--preset--shadow--raised); border-radius: var(--wp--custom--radius--lg); }
.is-style-section-alt:has(> .bl-og-card) { overflow-x: auto; }

/* ---------- Ngôn ngữ CJK: tiêu đề ngắt dòng theo cụm từ (Chrome/Edge hỗ trợ; trình duyệt khác bỏ qua) ---------- */
:lang(ja) :is(h1, h2, h3, .is-style-lead), :lang(ko) :is(h1, h2, h3) { word-break: auto-phrase; }
:lang(ko) :is(h1, h2, h3, p, li) { word-break: keep-all; overflow-wrap: anywhere; }

/* ===== Liên kết ra ngoài (inc/links.php gắn class .bl-ext + target=_blank) =====
   Biểu tượng ↗ nhỏ theo màu chữ, sát cuối chữ (không xuống dòng riêng). Liên kết chỉ chứa ảnh/hình: không biểu tượng. */
a.bl-ext:not(:has(img, svg, picture))::after {
	content: "";
	display: inline-block;
	width: .8em;
	height: .8em;
	margin-inline-start: .2em;
	vertical-align: -.05em;
	background: currentColor;
	-webkit-mask: var(--bl-ext-icon) center / contain no-repeat;
	mask: var(--bl-ext-icon) center / contain no-repeat;
	opacity: .75;
}
.wp-block-button__link.bl-ext::after { opacity: 1; }
/* Nút kiểu mũi tên (is-style-arrow) đã có → ở ::after: liên kết ngoài thay mũi tên bằng ↗. */
.wp-block-button.is-style-arrow > a.bl-ext.wp-block-button__link::after { content: ""; }   /* thắng content "→" ở core-button.css */

/* ===== Từ điển giá (/pricing-dictionary/ — dictionary/build2.py) ===== */
/* Mục lục: thuật ngữ + định nghĩa bên trái, hình nhỏ bên phải (cả điện thoại — trang ngắn hơn). */
.wp-block-columns.bl-dict-entry {
	align-items: center !important;
	gap: var(--wp--preset--spacing--40);
	margin-block: var(--wp--preset--spacing--40);
	padding-block-end: var(--wp--preset--spacing--40);
	border-bottom: var(--wp--custom--border--thin) solid var(--wp--preset--color--line);
}
.bl-dict-entry h3 { margin-block: 0 var(--wp--preset--spacing--20); }
.bl-dict-entry p { margin-block: 0 var(--wp--preset--spacing--20); }
.bl-dict-thumb .bl-svg { border-radius: var(--wp--custom--radius--md); }
/* "Read the full entry" — kiểu liên kết mũi tên của theme (như "Contact support →"). */
p.bl-dict-more { margin: 0; }
p.bl-dict-more a {
	color: var(--wp--preset--color--brand);
	font-weight: 600;
	text-decoration: none;
}
p.bl-dict-more a::after { content: "\2192"; display: inline-block; margin-inline-start: .3em; transition: transform var(--wp--custom--transition); }
p.bl-dict-more a:hover { text-decoration: underline; }
p.bl-dict-more a:hover::after { transform: translateX(var(--wp--preset--spacing--10)); }
/* Bài chi tiết: hình lớn dưới tiêu đề, bo góc như thẻ. */
.bl-dict-hero .bl-svg { max-width: none; border-radius: var(--wp--custom--radius--lg); }
@media (max-width: 781px) {
	.wp-block-columns.bl-dict-entry { gap: var(--wp--preset--spacing--30); align-items: flex-start !important; }
	.wp-block-columns.bl-dict-entry > .wp-block-column:last-child { padding-block-start: var(--wp--preset--spacing--10); }
}

/* ===== Phân đoạn vị trí giá (.bl-seg — màu từ theme.json custom.segments qua inc/levels.php) ===== */
.bl-seg { display: inline-flex; align-items: center; gap: var(--wp--preset--spacing--20); font-weight: 600; color: var(--wp--preset--color--ink); }
.bl-seg::before {
	content: "";
	flex: none;
	width: 1em;
	height: 1em;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--seg, var(--wp--preset--color--line));
}

/* ===== Footer: link mạng xã hội không cần biểu tượng ↗ (vẫn mở tab mới — inc/links.php) ===== */
.bl-footer-social a.bl-ext::after { content: none; }
