/* DevVN BGBH - trang của khách (báo giá, phiếu bảo hành, tra cứu). Nạp sau dashboard.css: dùng chung token, thẻ, nút, pill, sheet, bảng sản phẩm, tiến độ, thanh toán. */

/* ---------- Khung ---------- */
:root {
	--bgbh-cw: 880px;
	--bgbh-band: var(--bgbh-dark);
	--bgbh-overlap: 44px;
}

body.bgbh-public {
	display: flex;
	flex-direction: column;
	background-color: var(--bgbh-bg);
}

.bgbh-ctop {
	padding: 14px var(--bgbh-gutter) calc(var(--bgbh-overlap) + 14px);
	border-top: 3px solid var(--bgbh-accent);
	background-color: var(--bgbh-band);
	color: #fff;
}
.bgbh-ctop-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--bgbh-s3);
	max-width: var(--bgbh-cw);
	margin: 0 auto;
}

.bgbh-cbrand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bgbh-cbrand-logo {
	display: flex;
	flex: none;
	align-items: center;
	height: 40px;
	padding: 4px 8px;
	border-radius: 10px;
	background-color: #fff;
}
.bgbh .bgbh-cbrand-logo img { display: block; width: auto; max-width: 120px; max-height: 32px; }
.bgbh-cbrand-name {
	display: -webkit-box;
	overflow: hidden;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.01em;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
@media (max-width: 639.98px) {
	.bgbh-cbrand--logo .bgbh-cbrand-name {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

.bgbh .bgbh-ccall {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px 0 12px;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: var(--bgbh-radius-pill);
	background-color: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	white-space: nowrap;
}
.bgbh-ccall:hover { background-color: rgba(255, 255, 255, .16); }
.bgbh-ccall .bgbh-icon { width: 18px; height: 18px; line-height: 1; }

.bgbh-public-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: start;
	gap: var(--bgbh-s4);
	width: 100%;
	max-width: calc(var(--bgbh-cw) + 2 * var(--bgbh-gutter));
	margin: calc(-1 * var(--bgbh-overlap)) auto 0;
	padding: 0 var(--bgbh-gutter) var(--bgbh-s6);
	flex: 1 0 auto;
}
.bgbh-public-main:focus { outline: none; }
.bgbh-public-main > * { min-width: 0; }

.bgbh-public .bgbh-card { padding: var(--bgbh-s5) var(--bgbh-s4); }
.bgbh-csec-title { display: flex; align-items: center; gap: var(--bgbh-s2); margin-bottom: var(--bgbh-s3); }

/* ---------- Đầu tài liệu (thẻ nổi lên dải tối) ---------- */
.bgbh-public .bgbh-chero {
	display: grid;
	gap: 14px;
	box-shadow: 0 12px 32px -18px rgba(15, 23, 42, .45), 0 1px 2px rgba(15, 23, 42, .06);
}
.bgbh-chero-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px 12px;
}
.bgbh-chero-heading { display: grid; flex: 1 1 0; gap: 4px; min-width: 0; }
.bgbh-chero-mark {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background-color: var(--bgbh-accent-soft);
	color: var(--bgbh-accent);
}
.bgbh-chero-mark .bgbh-icon { width: 26px; height: 26px; line-height: 1; }
.bgbh-chero-title {
	font-size: clamp(24px, 6.8vw, 30px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}
.bgbh-chero-head > .bgbh-pill { margin-top: 4px; padding: 6px 12px; font-size: 14px; }
.bgbh-chero-lead { color: var(--bgbh-ink-2); }

.bgbh-chero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 0;
	padding: 0;
	color: var(--bgbh-muted);
	font-size: 14px;
	list-style: none;
}
.bgbh-chero-meta strong { color: var(--bgbh-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bgbh-chero-meta .is-expired strong { color: var(--bgbh-danger); text-decoration: line-through; }
.bgbh-chero-people { margin-top: 6px; }
.bgbh .bgbh-chero-phone { display: inline-flex; align-items: baseline; gap: 4px; margin-left: 6px; color: var(--bgbh-accent); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.bgbh-chero-phone .bgbh-icon { align-self: center; width: 14px; height: 14px; line-height: 1; }

.bgbh-chero-total {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 4px 12px;
	padding-top: 14px;
	border-top: 1px dashed var(--bgbh-line-strong);
}
.bgbh-chero-total-label { display: grid; color: var(--bgbh-ink-2); font-weight: 600; line-height: 1.3; }
.bgbh-chero-total-sub { color: var(--bgbh-muted); font-size: var(--bgbh-fs-sm); font-weight: 500; }
.bgbh-chero-total-value {
	color: var(--bgbh-hl);
	font-size: clamp(26px, 7.6vw, 32px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.02em;
}

.bgbh-chero-tools { display: flex; flex-wrap: wrap; gap: var(--bgbh-s2); }
.bgbh-chero-tools .bgbh-btn { flex: 1 1 auto; }
.bgbh-chero-tools .bgbh-icon { line-height: 1; }

.bgbh-chero--state { padding-top: var(--bgbh-s2); padding-bottom: var(--bgbh-s2); }
.bgbh-cstate-title { font-size: 20px; }
.bgbh-cstate-text { max-width: 40ch; }

/* ---------- Dải thông báo ---------- */
.bgbh-cnotice {
	display: flex;
	align-items: flex-start;
	gap: var(--bgbh-s3);
	padding: 14px var(--bgbh-s4);
	border: 1px solid var(--bgbh-cn-line, var(--bgbh-line));
	border-radius: var(--bgbh-radius-sm);
	background-color: var(--bgbh-cn-bg, var(--bgbh-surface));
	color: var(--bgbh-cn-ink, var(--bgbh-ink));
}
.bgbh-cnotice--danger { --bgbh-cn-bg: var(--bgbh-danger-soft); --bgbh-cn-ink: var(--bgbh-danger); --bgbh-cn-line: #f3caca; }
.bgbh-cnotice--warn { --bgbh-cn-bg: var(--bgbh-warn-soft); --bgbh-cn-ink: var(--bgbh-warn); --bgbh-cn-line: #f2d3a2; }
.bgbh-cnotice--ok { --bgbh-cn-bg: var(--bgbh-ok-soft); --bgbh-cn-ink: var(--bgbh-ok); --bgbh-cn-line: #c4e6cf; }
.bgbh-cnotice--info { --bgbh-cn-bg: var(--bgbh-accent-soft); --bgbh-cn-ink: var(--bgbh-accent-ink); --bgbh-cn-line: #cddcf8; }
.bgbh-cnotice-icon { display: flex; flex: none; padding-top: 1px; }
.bgbh-cnotice-icon .bgbh-icon { width: 22px; height: 22px; line-height: 1; }
.bgbh-cnotice-body { display: grid; gap: 2px; min-width: 0; }
.bgbh-cnotice-title { font-weight: 700; line-height: 1.4; }
.bgbh-cnotice-text { color: var(--bgbh-ink-2); font-size: 14px; }
.bgbh-cnotice-quote {
	margin: 6px 0 0;
	padding: var(--bgbh-s2) var(--bgbh-s3);
	border-left: 3px solid var(--bgbh-cn-ink, currentColor);
	border-radius: 0 var(--bgbh-radius-xs) var(--bgbh-radius-xs) 0;
	background-color: rgba(255, 255, 255, .7);
	color: var(--bgbh-ink);
	font-size: 14px;
	overflow-wrap: anywhere;
}

/* ---------- Nhãn - giá trị ---------- */
.bgbh-facts { margin: 0; }
.bgbh-facts-row {
	display: grid;
	grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
	gap: var(--bgbh-s3);
	padding: 10px 0;
	border-bottom: 1px solid var(--bgbh-line);
}
.bgbh-facts-row:first-child { padding-top: 0; }
.bgbh-facts-row:last-child { padding-bottom: 0; border-bottom: 0; }
.bgbh-facts dt { color: var(--bgbh-muted); font-size: 14px; }
.bgbh-facts dd { margin: 0; color: var(--bgbh-ink); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bgbh-cprogress-facts { margin-top: var(--bgbh-s4); padding-top: var(--bgbh-s4); border-top: 1px solid var(--bgbh-line); }

/* ---------- Ghi chú, điều khoản ---------- */
.bgbh-cnotes { display: grid; gap: var(--bgbh-s5); }
.bgbh-cnote .bgbh-csec-title { margin-bottom: 6px; }
.bgbh-cnote p { color: var(--bgbh-ink-2); overflow-wrap: anywhere; }

/* ---------- Thanh nút đáy ---------- */
.bgbh-cbar { gap: 10px; }
.bgbh-cbar-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--bgbh-s3);
	color: var(--bgbh-muted);
	font-size: 14px;
}
.bgbh-cbar-total strong { color: var(--bgbh-hl); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.bgbh-cbar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bgbh-s2); }
.bgbh .bgbh-cbar-actions .bgbh-btn { min-height: 52px; padding: 0 10px; font-size: 15px; }
.bgbh .bgbh-cbar-actions .bgbh-btn--primary { font-weight: 700; }

/* ---------- Phiếu bảo hành ---------- */
.bgbh-wcard { display: grid; gap: var(--bgbh-s4); }
.bgbh-wc-h2 { margin-bottom: var(--bgbh-s3); }
.bgbh-wc-open { margin-top: var(--bgbh-s4); }
.bgbh-wc-open .bgbh-icon { line-height: 1; }
.bgbh-wc-empty,
.bgbh-wc-lead { color: var(--bgbh-muted); font-size: 14px; }
.bgbh-wc-lead { margin-bottom: var(--bgbh-s3); }

.bgbh-wc-list { display: grid; gap: var(--bgbh-s3); margin: 0; padding: 0; list-style: none; }
.bgbh-wc-item {
	--bgbh-wc-tone: var(--bgbh-ok);
	--bgbh-wc-soft: var(--bgbh-ok-soft);
	display: grid;
	gap: var(--bgbh-s3);
	padding: var(--bgbh-s4);
	border: 1px solid var(--bgbh-line);
	border-top: 4px solid var(--bgbh-wc-tone);
	border-radius: 14px;
}
.bgbh-wc-item--warn { --bgbh-wc-tone: #d97706; --bgbh-wc-soft: var(--bgbh-warn-soft); }
.bgbh-wc-item--danger { --bgbh-wc-tone: var(--bgbh-danger); --bgbh-wc-soft: var(--bgbh-danger-soft); }

.bgbh-wc-top { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: var(--bgbh-s3); }
.bgbh-wc-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border: 1px solid var(--bgbh-line);
	border-radius: var(--bgbh-radius-sm);
	background-color: var(--bgbh-sunken);
	color: var(--bgbh-faint);
}
.bgbh .bgbh-wc-thumb img { width: 100%; height: 100%; object-fit: contain; background-color: #fff; }
.bgbh-wc-thumb .bgbh-icon { width: 26px; height: 26px; line-height: 1; }
.bgbh-wc-title { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.bgbh-wc-name { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.bgbh-wc-attr { color: var(--bgbh-muted); font-size: var(--bgbh-fs-sm); }
.bgbh-wc-pill { margin-top: 2px; }

.bgbh-wc-serials { display: flex; flex-wrap: wrap; gap: 6px; }
.bgbh-wc-serial {
	padding: 2px 8px;
	border-radius: 6px;
	background-color: var(--bgbh-sunken);
	font-size: 14px;
	letter-spacing: .02em;
}

.bgbh-wc-term {
	display: grid;
	gap: var(--bgbh-s2);
	padding: var(--bgbh-s3) 14px;
	border-radius: var(--bgbh-radius-sm);
	background-color: var(--bgbh-sunken);
}
.bgbh-wc-range {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2px var(--bgbh-s3);
	color: var(--bgbh-muted);
	font-size: 14px;
}
.bgbh-wc-range strong { color: var(--bgbh-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bgbh-wc-bar { height: 8px; overflow: hidden; border-radius: var(--bgbh-radius-pill); background-color: var(--bgbh-line); }
.bgbh-wc-bar > span { display: block; height: 100%; border-radius: inherit; background-color: var(--bgbh-wc-tone); }
.bgbh-wc-left { color: var(--bgbh-wc-tone); font-size: 15px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.bgbh-wc-item--warn .bgbh-wc-left { color: var(--bgbh-warn); }

.bgbh-wc-photos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: var(--bgbh-s2);
	margin: 0;
	padding: 0;
	list-style: none;
}
.bgbh-wc-photos a { display: block; border-radius: 10px; }
.bgbh .bgbh-wc-photos img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border: 1px solid var(--bgbh-line);
	border-radius: 10px;
	background-color: var(--bgbh-sunken);
	object-fit: cover;
}

.bgbh-wc-reqs { display: grid; gap: 10px; }

.bgbh-wc-mine { display: grid; gap: var(--bgbh-s3); margin: 0; padding: 0; list-style: none; }
.bgbh-wc-req { display: grid; gap: var(--bgbh-s3); padding: var(--bgbh-s4); border: 1px solid var(--bgbh-line); border-radius: 14px; }
.bgbh-wc-req-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--bgbh-s3); }
.bgbh-wc-req-title { display: grid; gap: 2px; min-width: 0; }
.bgbh-wc-req-head .bgbh-pill { flex: none; }
.bgbh .bgbh-wc-reqs .bgbh-btn { min-height: 52px; }

.bgbh-prose { color: var(--bgbh-ink-2); font-size: 15px; overflow-wrap: anywhere; }
.bgbh-prose > :first-child { margin-top: 0; }
.bgbh-prose > :last-child { margin-bottom: 0; }
.bgbh .bgbh-prose p { margin: 0 0 var(--bgbh-s2); }
.bgbh-prose ul,
.bgbh-prose ol { margin: 0 0 var(--bgbh-s3); padding-left: 22px; }
.bgbh-prose li { margin: 4px 0; }
.bgbh-prose strong { color: var(--bgbh-ink); }
.bgbh .bgbh-prose :where(h3, h4) { margin: var(--bgbh-s4) 0 var(--bgbh-s2); color: var(--bgbh-ink); font-weight: 700; line-height: 1.35; }
.bgbh .bgbh-prose h3 { font-size: 17px; }
.bgbh .bgbh-prose h4 { font-size: 15px; }
.bgbh .bgbh-prose > :where(h3, h4):first-child { margin-top: 0; }

/* ---------- Form gửi yêu cầu ---------- */
.bgbh-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.bgbh-csuccess {
	display: grid;
	justify-items: center;
	gap: var(--bgbh-s3);
	padding: var(--bgbh-s5) 0 var(--bgbh-s2);
	text-align: center;
}
.bgbh-csuccess:focus { outline: none; }
.bgbh-csuccess .bgbh-empty-icon { width: 60px; height: 60px; }
.bgbh-csuccess .bgbh-empty-icon .bgbh-icon { width: 30px; height: 30px; line-height: 1; }
.bgbh-csuccess-title { max-width: 34ch; font-size: var(--bgbh-fs-md); font-weight: 700; line-height: 1.4; }
.bgbh-public .bgbh-photo-add .bgbh-icon { line-height: 1; }

/* ---------- Tra cứu ---------- */
.bgbh-lk-form { margin-top: 2px; }
.bgbh-lk-row { display: flex; gap: var(--bgbh-s2); }
.bgbh-field .bgbh-lk-row input { flex: 1 1 auto; min-width: 0; }
.bgbh .bgbh-lk-row .bgbh-btn { flex: none; min-height: 48px; padding: 0 var(--bgbh-s4); }
.bgbh-lk-row .bgbh-icon { line-height: 1; }

.bgbh-lk-results { display: grid; gap: var(--bgbh-s3); }
.bgbh-lk-status { color: var(--bgbh-muted); font-size: 14px; font-weight: 600; }
.bgbh-lk-status:empty { display: none; }
.bgbh-lk-status.is-error {
	padding: var(--bgbh-s3) var(--bgbh-s4);
	border: 1px solid #f3caca;
	border-radius: var(--bgbh-radius-sm);
	background-color: var(--bgbh-danger-soft);
	color: var(--bgbh-danger);
}
.bgbh-lk-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bgbh-lk-list:empty { display: none; }
.bgbh-public .bgbh-lk-item {
	display: flex;
	align-items: center;
	gap: var(--bgbh-s3);
	padding: 14px var(--bgbh-s4);
	color: var(--bgbh-ink);
	text-decoration: none;
}
.bgbh-lk-item:hover { background-color: var(--bgbh-sunken); }
.bgbh-lk-icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background-color: var(--bgbh-ok-soft);
	color: var(--bgbh-ok);
}
.bgbh-lk-icon .bgbh-icon { line-height: 1; }
.bgbh-lk-text { display: grid; flex: 1 1 auto; gap: 1px; min-width: 0; line-height: 1.35; }
.bgbh-lk-name { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.bgbh-lk-end { color: var(--bgbh-ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.bgbh-lk-who { color: var(--bgbh-muted); font-size: var(--bgbh-fs-sm); font-variant-numeric: tabular-nums; }
.bgbh-lk-go { color: var(--bgbh-faint); line-height: 1; }

/* ---------- Chân trang ---------- */
.bgbh-cfoot { padding: var(--bgbh-s6) var(--bgbh-gutter) calc(var(--bgbh-s8) + var(--bgbh-safe-b)); border-top: 1px solid var(--bgbh-line); }
.bgbh-public--bar .bgbh-cfoot { padding-bottom: calc(var(--bgbh-safe-b) + 150px); }
.bgbh-public--bar .bgbh-public-main { padding-bottom: var(--bgbh-s6); }
.bgbh-cfoot-in { display: grid; gap: var(--bgbh-s2); max-width: var(--bgbh-cw); margin: 0 auto; }
.bgbh-cfoot-name { color: var(--bgbh-ink); font-weight: 700; }
.bgbh-cfoot-list { display: grid; gap: 6px; margin: 0; padding: 0; color: var(--bgbh-muted); font-size: 14px; list-style: none; }
.bgbh-cfoot-list li { display: flex; align-items: flex-start; gap: var(--bgbh-s2); overflow-wrap: anywhere; }
.bgbh-cfoot-list .bgbh-icon { width: 16px; height: 16px; margin-top: 3px; line-height: 1; }
.bgbh .bgbh-cfoot-list a { color: var(--bgbh-ink-2); text-decoration: none; }
.bgbh-cfoot-list a:hover { text-decoration: underline; }
.bgbh-cfoot-list:empty { display: none; }
.bgbh-cfoot-branch strong { display: block; color: var(--bgbh-ink); font-weight: 700; }
.bgbh-cfoot-list .bgbh-cfoot-branch .bgbh-icon, .bgbh-cfoot-list .bgbh-cfoot-phone .bgbh-icon { color: var(--bgbh-hl); }
.bgbh .bgbh-cfoot-list a.bgbh-cfoot-strong { font-weight: 700; }

/* ---------- Máy tính bảng trở lên ---------- */
@media (min-width: 640px) {
	.bgbh-public .bgbh-card { padding: var(--bgbh-s6); }
	.bgbh-chero-tools .bgbh-btn { flex: 0 0 auto; }
	.bgbh-facts-row { grid-template-columns: 180px minmax(0, 1fr); }
	.bgbh-wc-reqs { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
	.bgbh-cnotes { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (min-width: 1024px) {
	:root { --bgbh-overlap: 56px; }
	.bgbh-ctop { padding-top: 18px; }
	.bgbh-cbar {
		padding-right: max(var(--bgbh-gutter), calc((100vw - var(--bgbh-cw)) / 2));
		padding-left: max(var(--bgbh-gutter), calc((100vw - var(--bgbh-cw)) / 2));
	}
	.bgbh-cbar-total { justify-content: flex-start; font-size: 15px; }
	.bgbh-cbar-total strong { font-size: 20px; }
	.bgbh .bgbh-cbar-actions .bgbh-btn { min-width: 200px; padding: 0 var(--bgbh-s5); }
	.bgbh-public--bar .bgbh-cfoot { padding-bottom: calc(var(--bgbh-safe-b) + 110px); }
}

@media (prefers-reduced-motion: reduce) {
	.bgbh-public .bgbh-sheet-panel,
	.bgbh-public .bgbh-sheet-backdrop { transition: none; }
}

@media print {
	body.bgbh-public { background-color: #fff; }
	.bgbh-ctop { padding-bottom: 14px; border-top: 0; background-color: #fff; color: var(--bgbh-ink); }
	.bgbh-public-main { margin-top: 0; }
	.bgbh-cbar,
	.bgbh-sheet,
	.bgbh-chero-tools,
	.bgbh-wc-reqs,
	.bgbh-paybox-download,
	.bgbh-skip { display: none; }
	.bgbh-public .bgbh-card { box-shadow: none; border: 1px solid var(--bgbh-line); break-inside: avoid; }
}
