/* Shared responsive shell for authenticated student and teacher spaces.
 * Keep structural mobile behavior in one place so teacher pages follow the
 * already validated student-space pattern instead of growing page-specific
 * media-query patches.
 */

@media (max-width: 900px) {
	.lc-app-shell--student .lc-app-sidebar,
	.lc-app-shell--teacher .lc-app-sidebar {
		overscroll-behavior: contain;
		touch-action: pan-y;
		-webkit-overflow-scrolling: touch;
	}

	.lc-app-shell--student .lc-app-topbar,
	.lc-app-shell--teacher .lc-app-topbar {
		max-width: 100vw;
		min-width: 0;
		overflow-x: clip;
	}
}

@media (max-width: 880px) {
	.lc-app-shell--student,
	.lc-app-shell--teacher {
		width: 100%;
		min-width: 0;
		margin-left: 0;
		overflow-x: clip;
	}

	.lc-app-shell--student .lc-app-main,
	.lc-app-shell--teacher .lc-app-main {
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}

	.lc-app-shell--student .lc-app-sidebar,
	.lc-app-shell--teacher .lc-app-sidebar {
		width: min(320px, calc(100vw - 28px));
		max-width: 100%;
	}

	.lc-app-shell--student .lc-app-topbar,
	.lc-app-shell--teacher .lc-app-topbar {
		position: sticky;
		top: 0;
		z-index: 30;
		min-height: 76px;
		gap: 12px;
		padding: 12px 16px;
	}

	body.admin-bar .lc-app-shell--student .lc-app-topbar,
	body.admin-bar .lc-app-shell--teacher .lc-app-topbar {
		top: 46px;
	}

	.lc-app-shell--student .lc-account-user,
	.lc-app-shell--teacher .lc-account-user {
		display: none;
	}

	.lc-app-shell--student .lc-app-topbar > p,
	.lc-app-shell--teacher .lc-app-topbar > p {
		min-width: 0;
		margin-right: auto;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.lc-app-shell--teacher .lc-layout-content {
		box-sizing: border-box;
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}

	/* The layout content already owns the page padding, like the student space.
	 * Removing the second teacher-only padding layer restores the usable width.
	 */
	.lc-app-shell--teacher .lc-teacher-space {
		box-sizing: border-box;
		width: 100%;
		min-width: 0;
		max-width: 100%;
		padding: 0;
	}

	.lc-app-shell--teacher :where(
		.lc-teacher-hero,
		.lc-tracking-grid,
		.lc-tracking-course-grid,
		.lc-tracking-metrics,
		.lc-tracking-panel,
		.lc-tracking-course-card,
		.lc-tracking-course-detail,
		.lc-teacher-profile,
		.lc-tracking-session-list,
		.lc-tracking-session-row,
		.lc-tracking-table-wrap
	) {
		min-width: 0;
		max-width: 100%;
	}
}
