.pdb-box {
	margin: 2em 0 1em;
	padding: 16px 20px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	background: #fafafa;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.pdb-icon { font-size: 28px; line-height: 1; }
.pdb-info { flex: 1; min-width: 160px; }
.pdb-title { font-weight: 600; word-break: break-word; }
.pdb-meta { font-size: .85em; color: #666; }
.pdb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pdb-btn {
	display: inline-block;
	padding: 10px 18px;
	background: #b3261e;
	color: #fff !important;
	border: 1px solid #b3261e;
	border-radius: 6px;
	text-decoration: none !important;
	font-weight: 600;
	text-align: center;
}
.pdb-btn:hover { background: #8c1d18; }

/* Khung xem */
.pdb-viewer {
	margin: 0 0 2em;
	border: 1px solid #ddd;
	border-radius: 10px;
	overflow: hidden;
	background: #eee;
	display: flex;
	flex-direction: column;
}
.pdb-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 8px 10px;
	background: #fff;
	border-bottom: 1px solid #ddd;
	font-size: 14px;
	color: #333;
}
.pdb-tbtn {
	min-width: 40px;
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid #ccc;
	background: #fff;
	color: #222;
	border-radius: 6px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.pdb-zoom-label { min-width: 44px; text-align: center; }
.pdb-count { color: #777; }

.pdb-scroll {
	overflow: auto;
	max-height: 75vh;
	padding: 8px;
	-webkit-overflow-scrolling: touch;
}
.pdb-pages { margin: 0; }
.pdb-page {
	width: 100%;
	margin: 0 0 8px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.pdb-page canvas { display: block; width: 100%; height: auto; }
.pdb-status { padding: 14px; text-align: center; font-size: 14px; color: #555; }

@media (max-width: 480px) {
	.pdb-box { padding: 12px; }
	.pdb-actions { width: 100%; }
	.pdb-actions .pdb-btn { flex: 1; }
	.pdb-scroll { max-height: 70vh; padding: 4px; }
}

.pdb-status a { font-weight: 600; text-decoration: underline; }

.pdb-tbtn-print { font-size: 14px; }

/* In ấn: chỉ in các trang PDF, ẩn phần còn lại của website */
#pdb-print-root { display: none; }
@media print {
	html.pdb-printing body > *:not(#pdb-print-root) { display: none !important; }
	html.pdb-printing body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
	html.pdb-printing #pdb-print-root { display: block; }
	.pdb-print-page {
		display: block;
		width: 100%;
		height: auto;
		max-height: 100vh;
		object-fit: contain;
		margin: 0 auto;
		break-after: page;
		page-break-after: always;
	}
	.pdb-print-page:last-child { break-after: auto; page-break-after: auto; }
}
