/* Print styles */
@page {
	size: A4 landscape;
	margin: 8mm; /* Slightly smaller margin to ensure single-page fit */
}

@media print {
	/* --- 1. Global Reset --- */
	body {
		background: white !important;
		color: #1a1a1a !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		margin: 0;
		padding: 0;
		/* Kept Inter as requested; falls back to sans-serif if not loaded */
		font-family:
			"Inter",
			system-ui,
			-apple-system,
			sans-serif;
		font-size: 10pt;
		line-height: 1.2;
	}

	* {
		border-radius: 0 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	/* Hide UI */
	.print-btn,
	.section-modal,
	.controls-wrapper,
	.settings-content,
	header p {
		display: none !important;
	}

	/* --- 2. Compact Header --- */
	header {
		text-align: center;
		border-bottom: 2px solid #0056b3; /* Professional Blue */
		margin-bottom: 8px;
		padding-bottom: 4px;
	}

	h1 {
		font-size: 16pt;
		font-weight: 800;
		color: #0056b3 !important;
		text-transform: uppercase;
		margin: 0;
		letter-spacing: 0.5px;
	}

	h2 {
		font-size: 10pt;
		font-weight: 500;
		margin: 2px 0 0 0;
		color: #444 !important;
	}

	/* --- 3. Table Layout --- */
	.table-wrapper {
		width: 100%;
		display: block;
	}

	table {
		width: 100%;
		border-collapse: collapse;
		table-layout: fixed; /* Crucial for one-page fit */
	}

	th,
	td {
		border: 1px solid #ccc !important;
		padding: 4px 2px;
		vertical-align: middle;
		word-wrap: break-word;
	}

	/* --- 4. Time Slots (The Header Row) --- */
	thead th {
		height: 35px;
		background-color: #f8f9fa !important;
		color: #0056b3 !important;
		font-size: 8.5pt;
		font-weight: 700;
		border-bottom: 2px solid #0056b3 !important;
	}

	/* --- 5. Days Column (The Sidebar) --- */
	th:first-child,
	td.day,
	.day {
		background-color: #f0f4f8 !important; /* Soft tinted gray */
		color: #0056b3 !important;
		font-weight: 800 !important;
		text-transform: uppercase;
		width: 80px; /* Narrowed to save horizontal space */
		font-size: 9pt !important;
	}

	/* --- 6. Data Cells --- */
	td {
		height: 42px; /* Fixed height to force one-page fit */
		text-align: center;
		background: white !important;
	}

	.subject-tag {
		font-size: 10pt;
		font-weight: 700;
		color: #000 !important;
		display: block;
	}

	.prof-id,
	.lab-tag {
		font-size: 8pt;
		color: #555 !important;
		font-weight: 400;
	}

	/* --- 7. Specialized Cells --- */
	.divider {
		border: 0;
		border-top: 1px solid #ddd !important;
		margin: 3px 0;
	}

	.section-label-cell {
		font-size: 7pt;
		background: #e9ecef !important;
		font-weight: bold;
	}

	/* Break/Holiday patterns */
	.break,
	.holiday,
	.no-classes {
		background-color: #fafafa !important;
		background-image: repeating-linear-gradient(
			45deg,
			transparent,
			transparent 10px,
			#f1f1f1 10px,
			#f1f1f1 11px
		) !important;
		font-size: 8pt;
		color: #888 !important;
		letter-spacing: 1px;
	}

	/* --- 8. Current Class --- */
	.current-class {
		background-color: #e7f3ff !important; /* Lightest blue wash */
		outline: 1.5px solid #0056b3 !important;
		outline-offset: -1.5px;
	}

	/* --- 9. Footer --- */
	.status-pill {
		display: block;
		width: fit-content;
		margin: 10px auto 0 auto;
		padding: 3px 10px;
		border: 1px solid #ccc !important;
		font-size: 8pt;
		color: #666 !important;
	}
}
