/**
 * Instructor roster: screen + print.
 *
 * Self-contained (no dependency on catalog/checkout sheets). Same ground
 * rules as the rest of the plugin: typography inherits from the theme,
 * WCAG AA contrast, generous targets. Print rules make "Print roster" →
 * Save as PDF produce a clean class list (Phase 1's roster PDF).
 */

.cllcw-instructor-roster {
	max-width: 60rem;
}

/* ---- One card per course ---- */

.cllcw-roster__course {
	border: 1px solid #d0d5da;
	border-radius: 8px;
	padding: 1.25rem 1.5rem 1.5rem;
	margin: 0 0 1.75rem;
	background: #fff;
}

.cllcw-roster__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	border-bottom: 2px solid #2b4d2e;
	padding-bottom: 0.75rem;
	margin-bottom: 0.5rem;
}

.cllcw-roster__title {
	margin: 0 0 0.2rem;
	font-size: 1.35em;
}

.cllcw-roster__schedule {
	margin: 0;
	color: #50575e;
	font-size: 0.95em;
}

.cllcw-roster__count {
	flex: 0 0 auto;
	align-self: center;
	padding: 0.3rem 0.9rem;
	border-radius: 999px;
	background: #eaf3ea;
	color: #1e6b2e; /* 5.0:1 on the tint */
	font-weight: 700;
	white-space: nowrap;
}

.cllcw-roster__count--full {
	background: #fdf3f4;
	color: #a4262c;
}

/* ---- Roster table ---- */

.cllcw-roster__table {
	width: 100%;
	border-collapse: collapse;
	margin: 0.75rem 0 0;
}

.cllcw-roster__table th {
	text-align: left;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #2b4d2e;
	padding: 0.5rem 0.75rem;
	border-bottom: 2px solid #2b4d2e;
}

.cllcw-roster__table td {
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid #e3e7ea;
	vertical-align: top;
}

.cllcw-roster__table tbody tr:nth-child(even) {
	background: #f6f8f6;
}

.cllcw-roster__table tbody tr:last-child td {
	border-bottom: none;
}

.cllcw-roster__empty {
	color: #50575e;
	font-style: italic;
	margin: 0.75rem 0 0;
}

/* Form fields match the page font — the UA default is ~13px (senior audience). */
[class*="cllcw-"] :is(input, select, textarea) {
	font: inherit;
}

/* Restore the keyboard focus ring the theme zeroes out (WCAG 2.4.7). */
[class*="cllcw-"] :is(a, input, select, textarea):focus-visible,
a[class*="cllcw-"]:focus-visible {
	outline: 2px solid #1d2327;
	outline-offset: 1px;
}

/* ---- Print button ---- */

.cllcw-roster__print-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.5rem 1.25rem;
	border: 2px solid transparent;
	border-radius: 6px;
	background: #00539b;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.cllcw-roster__print-btn:hover,
.cllcw-roster__print-btn:focus {
	background: #003d73;
	color: #fff;
}

/* Decorative printer icon — an SVG mask filled with the button's text color.
   (The old "\1F5B6" printer codepoint has no glyph in most fonts and rendered
   as a blank square.) */
.cllcw-roster__print-btn::before {
	content: "";
	width: 1.1em;
	height: 1.1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---- Print: a clean class list ---- */

@media print {
	/* Site chrome, the button, and the email form disappear. */
	#main-header,
	#et-main-area nav,
	.et-l--header,
	.et-l--footer,
	#footer-bottom,
	.cllcw-instructor-roster__print,
	.cllcw-roster__blast,
	.cllcw-roster__notice {
		display: none !important;
	}

	.cllcw-instructor-roster {
		max-width: none;
	}

	.cllcw-roster__course {
		border: none;
		border-radius: 0;
		padding: 0;
		margin: 0 0 1.5rem;
		/* Keep a course's header with at least the top of its table. */
		break-inside: avoid-page;
		page-break-inside: avoid;
	}

	.cllcw-roster__header {
		border-bottom-color: #000;
	}

	.cllcw-roster__count {
		background: none;
		color: #000;
		padding: 0;
		border-radius: 0;
	}

	.cllcw-roster__count--full {
		background: none;
		color: #000;
	}

	.cllcw-roster__table th {
		color: #000;
		border-bottom-color: #000;
	}

	.cllcw-roster__table td {
		border-bottom: 1px solid #999;
	}

	.cllcw-roster__table tbody tr {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.cllcw-roster__table tbody tr:nth-child(even) {
		background: none;
	}
}

/* ---- Email-your-class form (screen only; hidden in print above) ---- */

.cllcw-roster__blast {
	margin: 1rem 0 0.25rem;
	border-top: 1px solid #e2e2e2;
	padding-top: 0.75rem;
}

.cllcw-roster__blast-toggle {
	cursor: pointer;
	font-weight: 600;
}

.cllcw-roster__blast-hint {
	font-size: 0.95em;
	color: #555555;
}

.cllcw-roster__blast input[type="text"],
.cllcw-roster__blast textarea {
	width: 100%;
	max-width: 36rem;
	box-sizing: border-box;
}

.cllcw-roster__notice {
	padding: 0.75rem 1rem;
	margin: 0 0 1rem;
	border-radius: 4px;
	border: 1px solid #b8d4b8;
	background: #eef7ee;
}

.cllcw-roster__notice--error {
	border-color: #e0b4b4;
	background: #fdf0f0;
}

/* ---- Narrow screens: the table scrolls inside its card ---- */

@media (max-width: 700px) {
	.cllcw-roster__table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		white-space: nowrap;
	}
}
