/*
 * WCC Program Paths - programs.css
 * ---------------------------------------------------------------
 * BRAND COLORS (Wilkes Community College Brand Standards Guide)
 *   Primary blue    #005677  (dominant)
 *   Primary green   #48773D
 *   Secondary green #C5D5A5
 *   Secondary blue  #A3C6D3
 *   Accent          #D7D2C4
 *   Text            #222222 (on white or #D7D2C4), white (on #005677 / #48773D)
 *
 * BRAND FONTS
 *   Headings, subheads, button text: 'Abel', Arial, sans-serif
 *     18px, -webkit-text-stroke: 0.4px
 *   Body, table, search input:       Arial, sans-serif
 *     16px (table/body), 18px (search input)
 *
 * FONT SIZES USED IN TOTAL: 16px and 18px only.
 * Abel is expected to be loaded by the theme (no external fonts here).
 * ---------------------------------------------------------------
 */

/* ---------- Visually hidden text (caption, etc.) ---------- */
.wccprog-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Admin-only notice (no XML uploaded yet) ---------- */
.wccprog-notice {
	margin: 0 0 1em;
	padding: 10px 14px;
	background: #fff;
	color: #222222;
	border: 2px solid #005677;
	border-radius: 2px;
	font: 16px/1.5 Arial, sans-serif;
}

/* ---------- Button ---------- */
a.wccprog-button,
.fusion-button.wccprog-button {
	background: #005677 !important;
	color: #ffffff !important;
	border: 0;
	border-radius: 2px !important;
	font-family: 'Abel', Arial, sans-serif !important;
	font-size: 18px !important;
	-webkit-text-stroke: 0.4px;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

a.wccprog-button .fusion-button-text,
.fusion-button.wccprog-button .fusion-button-text {
	color: #ffffff !important;
	font-family: 'Abel', Arial, sans-serif !important;
	font-size: 18px !important;
}

a.wccprog-button:hover,
.fusion-button.wccprog-button:hover {
	background: #48773D !important;
	color: #ffffff !important;
}

a.wccprog-button:focus,
a.wccprog-button:focus-visible,
.fusion-button.wccprog-button:focus {
	outline: 3px solid #222222;
	outline-offset: 2px;
}

/* ---------- Modal (class passed to [fusion_modal]) ---------- */
.wccprog-modal .modal-content {
	background: #C5D5A5;
	border: 2px solid #005677;
	border-radius: 2px;
}

.wccprog-modal .modal-header {
	background: #C5D5A5;
	border-bottom: 2px solid #005677;
}

.wccprog-modal .modal-title {
	color: #222222;
	font-family: 'Abel', Arial, sans-serif;
	font-size: 18px;
	-webkit-text-stroke: 0.4px;
}

.wccprog-modal .modal-header .close,
.wccprog-modal .modal-header button.close {
	color: #222222;
	opacity: 1;
}

.wccprog-modal .modal-header .close:focus {
	outline: 3px solid #005677;
	outline-offset: 2px;
}

.wccprog-modal .modal-body {
	background: #C5D5A5;
	color: #222222;
	font-family: Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

/* ---------- Search ---------- */
.wccprog-modal .wccprog-search-wrap {
	margin: 0 0 12px;
}

.wccprog-modal .wccprog-label {
	display: block;
	margin: 0 0 6px;
	color: #222222;
	font-family: 'Abel', Arial, sans-serif;
	font-size: 18px;
	-webkit-text-stroke: 0.4px;
}

.wccprog-modal input.wccprog-search {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	padding: 10px 12px;
	background: #ffffff;
	color: #222222;
	border: 2px solid #005677;
	border-radius: 2px;
	font-family: Arial, sans-serif;
	font-size: 18px;
	line-height: 1.4;
}

.wccprog-modal input.wccprog-search:focus {
	outline: 3px solid #48773D;
	outline-offset: 2px;
	border-color: #005677;
}

/* Result count (also announced by aria-live) */
.wccprog-modal .wccprog-status {
	margin: 8px 0 0;
	color: #222222;
	font-family: Arial, sans-serif;
	font-size: 16px;
}

/* "No programs match" message: bordered so it does not rely on color alone */
.wccprog-modal .wccprog-empty {
	margin: 0 0 12px;
	padding: 10px 14px;
	background: #ffffff;
	color: #222222;
	border: 2px solid #005677;
	border-radius: 2px;
	font-family: Arial, sans-serif;
	font-size: 16px;
}

.wccprog-modal .wccprog-empty[hidden] {
	display: none !important;
}

/* ---------- Scroll region + table ---------- */
.wccprog-modal .wccprog-scroll {
	max-height: 60vh;
	overflow-y: auto;
	overflow-x: auto;
	background: #ffffff;
}

.wccprog-modal .wccprog-scroll:focus {
	outline: 3px solid #005677;
	outline-offset: 3px;
}

.wccprog-modal table.wccprog-table {
	width: 100%;
	margin: 0;
	border: 2px solid #005677;
	border-collapse: collapse;
	background: #ffffff;
	color: #222222;
	font-family: Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

/* Header row: white on #005677; sticky inside the scroll region */
.wccprog-modal table.wccprog-table thead th {
	position: sticky;
	top: 0;
	padding: 10px 12px;
	background: #005677;
	color: #ffffff;
	border: 0;
	text-align: left;
	font-family: 'Abel', Arial, sans-serif;
	font-size: 18px;
	font-weight: 400;
	-webkit-text-stroke: 0.4px;
}

/* Body cells: white and #D7D2C4 rows, #222 text; the row line keeps rows distinct without color alone */
.wccprog-modal table.wccprog-table tbody td {
	padding: 10px 12px;
	background: #ffffff;
	color: #222222;
	border: 0;
	border-bottom: 1px solid #005677;
	text-align: left;
	vertical-align: top;
}

.wccprog-modal table.wccprog-table tbody tr.wccprog-alt td {
	background: #D7D2C4;
}

/* Rows hidden by the search */
.wccprog-modal table.wccprog-table tbody tr[hidden] {
	display: none !important;
}

/* ---------- Responsive: same breakpoints as the Plaque plugin ---------- */
@media (max-width: 950px) {
	.wccprog-modal .modal-dialog {
		width: 90%;
		max-width: 90%;
		margin-left: auto;
		margin-right: auto;
	}
}

@media (max-width: 800px) {
	.wccprog-modal .wccprog-scroll {
		max-height: 55vh;
	}

	.wccprog-modal table.wccprog-table thead th,
	.wccprog-modal table.wccprog-table tbody td {
		padding: 8px 10px;
	}
}

/* Narrow screens: stack each row's cells and show the column label on each */
@media (max-width: 600px) {
	.wccprog-modal .wccprog-scroll {
		overflow-x: hidden;
	}

	.wccprog-modal table.wccprog-table,
	.wccprog-modal table.wccprog-table tbody,
	.wccprog-modal table.wccprog-table tr,
	.wccprog-modal table.wccprog-table td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}

	/* Column headings move into each cell; keep the header available to screen readers */
	.wccprog-modal table.wccprog-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.wccprog-modal table.wccprog-table tbody tr {
		border-bottom: 2px solid #005677;
	}

	.wccprog-modal table.wccprog-table tbody td {
		border-bottom: 0;
		overflow-wrap: anywhere;
	}

	.wccprog-modal table.wccprog-table tbody td::before {
		content: attr(data-label);
		display: block;
		font-family: Arial, sans-serif;
		font-size: 16px;
		font-weight: 700;
	}
}

/* ---------- Reduced motion: no transitions or animations ---------- */
@media (prefers-reduced-motion: reduce) {
	a.wccprog-button,
	.fusion-button.wccprog-button,
	.wccprog-modal,
	.wccprog-modal * {
		transition: none !important;
		animation: none !important;
	}
}
