.tmsp-block-title {
	margin: 0 0 0.5em;
}
.tmsp-last-updated {
	font-size: 15px;
	font-weight: 400;
	color: #666;
}
.tmsp-table-controls {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 1em;
}
.tmsp-search-input,
.tmsp-group-filter {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}
.tmsp-search-input {
	flex: 1 1 200px;
	min-width: 160px;
}
button.tmsp-print-button {
	padding: 6px 14px;
	border: 1px solid #ccc !important;
	border-radius: 4px;
	background: #fff !important;
	color: #1e1e1e !important;
	font-size: 14px;
	cursor: pointer;
}
button.tmsp-print-button:hover {
	background: #f5f5f5 !important;
}

/* Printing: drop the interactive chrome, let the table breathe rather than clip. */
@media print {
	@page {
		margin: 10mm;
	}
	.tmsp-table-controls {
		display: none !important;
	}
	.tmsp-table-scroll {
		overflow: visible !important;
	}
	.tmsp-col-sticky {
		position: static !important;
		box-shadow: none !important;
	}
	.tmsp-group-heading {
		break-after: avoid;
		page-break-after: avoid;
	}
	.tmsp-table th,
	.tmsp-table td {
		white-space: normal; /* let month columns etc. wrap instead of running off the page edge */
		padding: 1px 4px;
		font-size: 9px;
		line-height: 1.15;
	}
	.tmsp-group-heading {
		margin-top: 0.5em;
		margin-bottom: 0.15em;
		font-size: 10px;
	}
	.tmsp-badge {
		padding: 0 3px;
		font-size: 8px;
	}
	.tmsp-block-title {
		font-size: 14px;
		margin-bottom: 0.3em;
	}
	.tmsp-last-updated {
		font-size: 10px;
	}

	/* Only active while the print button's JS has added these classes — isolates the
	   clicked table from the rest of the page (header, footer, sidebar widgets, etc.)
	   without affecting a normal Ctrl+P print of the whole page. Hides sibling
	   branches at each level of the ancestor chain rather than repositioning the
	   table, so it isn't clipped by any ancestor's overflow/height rules. */
	body.tmsp-printing-active > *:not(.tmsp-print-ancestor):not(.tmsp-print-target) {
		display: none !important;
	}
	body.tmsp-printing-active .tmsp-print-ancestor > *:not(.tmsp-print-ancestor):not(.tmsp-print-target) {
		display: none !important;
	}
}
.tmsp-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1.5em;
}
.tmsp-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0; /* scroll wrapper owns the spacing now */
}
.tmsp-table th,
.tmsp-table td {
	padding: 6px 10px;
	border-bottom: 1px solid #ddd;
	text-align: left;
}
.tmsp-col-sticky {
	position: sticky;
	left: 0;
	box-shadow: 1px 0 0 #ddd;
}
/* Header cells: deliberately no background rule here at all -- if we set
   any value, including "inherit", we override the theme's own
   `table th { background: ... }` styling instead of letting it apply
   naturally. Leaving this selector out entirely is what makes it match. */
/* Body cells: themes rarely style td backgrounds directly, so there's
   nothing to inherit -- but the sticky cell still needs to be opaque or
   scrolled columns show through underneath it. `Canvas` is a CSS system
   color representing the page's actual default content background
   (adapts to the theme/OS light-dark setting) rather than a hardcoded
   guess like #fff. */
td.tmsp-col-sticky {
	background: Canvas;
}
.tmsp-col-total {
	font-weight: 700;
}
.tmsp-group-heading {
	margin-top: 1.5em;
}
.tmsp-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
}
.tmsp-badge-normal  { background: #e0f2e9; color: #1a7a42; }
.tmsp-badge-special { background: #fff4d6; color: #8a6100; }
.tmsp-badge-note    { background: #f0f0f0; color: #555; }
