/* ----------------------------
   Modern "Drive-like" Theme
   Minimal · Glass · Neutral
   Replace previous Material3 CSS
   ----------------------------*/
:root {
	--primary: #1a73e8; /* accent */
	--accent-weak: rgba(26, 115, 232, 0.08);
	--surface: #ffffff;
	--bg: #f6f7fb;
	--muted: #6b6f76;
	--glass: rgba(255, 255, 255, 0.65);
	--card-radius: 12px;
	--soft-shadow: 0 6px 18px rgba(32, 33, 36, 0.06);
	--thin-shadow: 0 2px 8px rgba(32, 33, 36, 0.05);
}

/* Reset topbar look to modern flat */
.m3-topbar {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 18px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.9),
		rgba(255, 255, 255, 0.75));
	backdrop-filter: blur(6px);
	border-bottom: 1px solid rgba(99, 102, 106, 0.06);
	z-index: 120;
}

/* Back button subtle */
.m3-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: none;
	background: transparent;
	color: #111;
	font-size: 18px;
	transition: background .12s, transform .06s;
}

.m3-icon-btn:hover {
	background: var(--accent-weak);
	transform: translateY(-1px);
}

/* Title smaller, lighter */
.m3-title {
	font-size: 16px;
	font-weight: 600;
	color: #111;
	letter-spacing: -0.2px;
	margin-right: 8px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* actions cluster aligned right */
.m3-actions {
	margin-left: auto;
	display: flex;
	gap: 8px;
	align-items: center;
}

/* pdf card becomes full-bleed soft container */
.pdf-card {
	width: 100%;
	max-width: 1080px;
	margin: 8px auto;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98),
		rgba(250, 250, 251, 0.98));
	border-radius: var(--card-radius);
	padding: 12px;
	box-shadow: var(--soft-shadow);
	display: flex;
	justify-content: center;
	align-items: flex-start;
}

/* canvas centered, subtle border */
.pdf-page {
	width: 100% !important;
	height: auto !important;
	border-radius: 8px;
	box-shadow: var(--thin-shadow);
	background: #fff;
}

/* Bottom bar: slim, floating effect */
.m3-bottom-bar {
	position: fixed;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	width: min(760px, calc(100% - 48px));
	background: rgba(255, 255, 255, 0.95);
	border-radius: 999px;
	padding: 8px 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	box-shadow: 0 10px 30px rgba(30, 33, 36, 0.06);
	z-index: 130;
	border: 1px solid rgba(20, 20, 20, 0.03);
}

/* Neutral nav buttons */
.m3-nav-btn {
	background: transparent;
	border: none;
	color: var(--muted);
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 10px;
}

.m3-nav-btn:hover {
	background: rgba(26, 115, 232, 0.06);
	color: var(--primary);
}

/* page info centered */
.m3-page-info {
	font-weight: 600;
	color: #222;
}

/* float FAB group: thin rounded */
.m3-fab-group {
	position: fixed;
	right: 20px;
	bottom: 110px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	z-index: 125;
}

/* main FAB: glassy */
.m3-fab, .m3-fab-mini {
	border: none;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .12s;
}

/* big FAB */
.m3-fab {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: linear-gradient(180deg, var(--primary), #1967d2);
	color: #fff;
	display: inline-grid;
	place-items: center;
	box-shadow: 0 8px 22px rgba(26, 115, 232, 0.18);
}

.m3-fab:active {
	transform: translateY(1px);
}

/* mini FABs: border + glass */
.m3-fab-mini {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(20, 20, 20, 0.04);
	color: var(--primary);
	display: inline-grid;
	place-items: center;
	box-shadow: var(--thin-shadow);
}

/* Loading overlay: centered glass card */
#pdf-loading-overlay {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 140;
	pointer-events: none;
}

#pdf-loading-overlay.active {
	display: flex;
	pointer-events: all;
}

.m3-loader {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 12px 36px rgba(14, 18, 23, 0.08);
	border: 1px solid rgba(8, 8, 8, 0.03);
}

.m3-loader::after {
	content: "";
	width: 18px;
	height: 18px;
	border: 3px solid rgba(26, 115, 232, 0.24);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin .85s linear infinite;
}

.m3-loading-text {
	margin-top: 12px;
	font-weight: 600;
	color: var(--muted);
	font-size: 14px;
}

/* thumbnail sidebar suggestion (hidden by default) */
.pdf-thumbs {
	display: none; /* optional: enable if you add sidebar */
}

/* responsive tweaks */
@media ( max-width : 900px) {
	.pdf-card {
		padding: 8px;
		border-radius: 10px;
	}
	.m3-bottom-bar {
		width: calc(100% - 36px);
		bottom: 12px;
	}
	.m3-fab-group {
		right: 12px;
		bottom: 88px;
	}
	.m3-title {
		font-size: 15px;
	}
}

/* small animation for canvas resize to feel smoother */
.pdf-page {
	transition: width .18s ease, height .18s ease;
}

/* accessibility focus outlines */
.m3-icon-btn:focus, .m3-nav-btn:focus, .m3-fab:focus, .m3-fab-mini:focus
	{
	outline: 3px solid rgba(26, 115, 232, 0.12);
	outline-offset: 3px;
}

@keyframes spin {to { transform:rotate(360deg);
	
}

}
.pdf-info-panel {
	width: 100%;
	max-width: 1080px;
	margin: 16px auto 24px;
	background: #fff;
	border-radius: 12px;
	padding: 20px 22px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.05);
}

/* user */
.pdf-user {
	display: flex;
	align-items: center;
	gap: 12px;
}

.pdf-user .avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.pdf-user .time {
	font-size: 13px;
	color: #777;
	margin-top: 2px;
}

/* stats */
.pdf-stats {
	display: flex;
	gap: 20px;
	margin: 18px 0 10px;
	color: #333;
}

.pdf-stats span {
	font-weight: 600;
}

/* rating */
.pdf-rating {
	margin-bottom: 12px;
}

/* school badge */
.badge-school {
	background: #e8f0fe;
	color: #1a73e8;
	padding: 6px 12px;
	border-radius: 8px;
	font-weight: 600;
}

/* alert */
.pdf-alert {
	margin-top: 18px;
	border-radius: 10px !important;
}

.m3-breadcrumb {
	padding: 12px 0;
}

.m3-breadcrumb-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font-size: 15px;
	color: #5f6368;
}

.m3-breadcrumb-list li {
	display: flex;
	align-items: center;
}

.m3-breadcrumb-list a {
	color: #1a73e8;
	text-decoration: none;
	font-weight: 500;
}

.m3-breadcrumb-list a:hover {
	text-decoration: underline;
}

.m3-breadcrumb-list li.active span {
	color: #202124;
	font-weight: 600;
}

.m3-breadcrumb-list .separator {
	padding: 0 6px;
	color: #9aa0a6;
	user-select: none;
}

/* Mobile – nhỏ lại cho gọn */
@media ( max-width : 576px) {
	.m3-breadcrumb-list {
		font-size: 14px;
	}
	.m3-breadcrumb-list .separator {
		padding: 0 4px;
	}
}

.pdf-actions .m3-icon-btn {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	transition: transform 0.1s;
}

.pdf-actions .m3-icon-btn:hover {
	transform: translateY(-1px);
	background: var(--accent-weak);
}

.truncate-multi {
   display: -webkit-box;        /* cũ: WebKit */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;       /* cũ: WebKit */

  display: box;                /* chuẩn cũ (Firefox cũ) */
  box-orient: vertical;

  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;

  /* Chuẩn CSS mới (line-clamp) */
  line-clamp: 2;               /* future-proof */
}