@charset "utf-8";
/* GBCU public online application (intake programme picker + application form).
   Layout follows the la.edurole application module, in GBCU colours. */

:root {
	--ap-green: #1f7a35;
	--ap-green-dark: #24502c;
	--ap-green-pale: #e3f1dc;
	--ap-red: #d93a32;
	--ap-ink: #1f2937;
	--ap-muted: #6b7280;
	--ap-line: #e5e7eb;
	--ap-bg: #f9fafb;
}

/* ---------- Public page shell (no sidebar; header/footer from header.inc.php) ---------- */
body.ap-page {
	background: var(--ap-bg) !important;
	font-family: "Inter", Arial, Helvetica, sans-serif;
	color: var(--ap-ink);
}
body.ap-page #sidebar,
body.ap-page #sidebarBackdrop,
body.ap-page .gbcu-burger,
body.ap-page .breadcrumb {
	display: none !important;
}
body.ap-page #content {
	margin: 0 !important;
	width: 100% !important;
	padding: calc(var(--gbcu-nav-h, 70px) + 8px) 20px 40px !important;
	min-height: 0 !important;
}
body.ap-page .ap-hide-for-public { display: none !important; }

.ap-page svg.lucide { width: 18px; height: 18px; flex: none; stroke-width: 2; }

/* ---------- Programme picker ---------- */
.ap-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 0 40px;
}
.ap-crumbs {
	margin-bottom: 22px;
	font-size: 14px;
	color: var(--ap-muted);
}
.ap-crumbs a { color: var(--ap-muted); text-decoration: none; }
.ap-crumbs a:hover { color: var(--ap-green); }

.ap-title {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 36px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.15;
	color: var(--ap-ink);
}
.ap-lead {
	margin: 8px 0 28px;
	font-size: 16px;
	color: #4b5563;
}

.ap-search {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
	width: auto;
}
.ap-search svg.lucide {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
	width: 20px;
	height: 20px;
}
.ap-search input {
	width: 100% !important;
	height: 46px;
	padding: 0 14px 0 42px !important;
	border: 1px solid #d1d5db !important;
	border-radius: 8px;
	background: #fff !important;
	font: 400 16px "Inter", Arial, sans-serif !important;
	color: var(--ap-ink);
	box-sizing: border-box;
	outline: none;
}
.ap-search input:focus {
	border-color: var(--ap-green) !important;
	box-shadow: 0 0 0 3px rgba(31, 122, 53, .15);
}

.ap-tabs {
	display: flex;
	gap: 26px;
	margin: 26px 0 24px;
	border-bottom: 1px solid var(--ap-line);
}
.ap-tab {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-bottom: -1px;
	padding: 12px 4px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	font: 600 20px "Inter", Arial, sans-serif;
	color: var(--ap-muted);
	cursor: pointer;
}
.ap-tab svg.lucide { width: 20px; height: 20px; }
.ap-tab:hover { color: var(--ap-ink); }
.ap-tab.is-active {
	border-bottom-color: var(--ap-green);
	color: var(--ap-green);
}
.ap-count {
	min-width: 22px;
	padding: 1px 7px;
	border-radius: 999px;
	background: #f3f4f6;
	font-size: 12px;
	font-weight: 600;
	color: var(--ap-muted);
	text-align: center;
}
.ap-tab.is-active .ap-count { background: var(--ap-green-pale); color: var(--ap-green-dark); }

.ap-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.ap-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 18px;
	min-height: 126px;
	padding: 20px;
	border: 1px solid var(--ap-line);
	border-radius: 8px;
	background: #fff;
	color: var(--ap-ink) !important;
	text-decoration: none !important;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ap-card[hidden] { display: none; }
.ap-card:hover,
.ap-card:focus-visible {
	border-color: var(--ap-green);
	box-shadow: 0 10px 20px rgba(0, 0, 0, .08);
	transform: translateY(-3px);
	outline: none;
}
.ap-card h3 {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--ap-ink);
}
.ap-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 14px;
}
.ap-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 6px;
	background: #f3f4f6;
	color: #374151;
}
.ap-chip svg.lucide, .ap-date svg.lucide { width: 16px; height: 16px; }
.ap-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ap-muted);
	white-space: nowrap;
}

.ap-empty {
	padding: 48px 16px;
	text-align: center;
	color: var(--ap-muted);
}
.ap-empty svg.lucide { width: 48px; height: 48px; color: #9ca3af; margin-bottom: 12px; }
.ap-empty h3 { margin: 0 0 4px; border: 0; font-size: 18px; color: #374151; }

@media (max-width: 1024px) {
	.ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	body.ap-page #content { padding: calc(var(--gbcu-nav-h, 70px) + 4px) 14px 30px !important; }
	.ap-title { font-size: 28px; }
	.ap-lead { font-size: 15px; margin-bottom: 20px; }
	.ap-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.ap-tabs { gap: 0; }
	.ap-tab { flex: 1 1 0; justify-content: center; font-size: 15px; }
	.ap-hide-sm { display: none; }
	.ap-card-meta { flex-wrap: wrap; }
}

/* ---------- Public footer ---------- */
.ap-footer {
	padding: 18px 20px;
	border-top: 1px solid var(--ap-line);
	background: #fff;
	text-align: center;
	font-size: 13px;
	color: var(--ap-muted);
}
.ap-footer a { color: var(--ap-green); font-weight: 600; text-decoration: none; }

/* ---------- Application form (multi-step) ---------- */
.ap-formwrap { max-width: 900px; }
.ap-applying {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 18px 0 12px;
	padding: 14px 16px;
	border: 1px solid #cfe6c4;
	border-radius: 8px;
	background: var(--ap-green-pale);
}
.ap-applying svg.lucide { width: 26px; height: 26px; color: var(--ap-green); }
.ap-applying span { display: block; font-size: 13px; color: var(--ap-muted); }
.ap-applying b { display: block; font-size: 17px; color: var(--ap-green-dark); }
.ap-note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 22px;
	font-size: 14px;
	color: #4b5563;
}
.ap-note svg.lucide { margin-top: 2px; color: var(--ap-muted); }
.ap-note a { color: var(--ap-green); }

.ap-progress {
	height: 8px;
	border-radius: 999px;
	background: var(--ap-line);
	overflow: hidden;
}
.ap-progress-bar {
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ap-green), #7ac143);
	transition: width .3s ease;
}
.ap-stepinfo {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin: 8px 0 14px;
	font-size: 14px;
	color: var(--ap-muted);
}
.ap-stepinfo span:last-child { font-weight: 600; color: var(--ap-green-dark); text-align: right; }

.ap-steplist {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}
.ap-steplist li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 6px 6px;
	border: 1px solid var(--ap-line);
	border-radius: 999px;
	background: #fff;
	font-size: 13px;
	color: var(--ap-muted);
	cursor: pointer;
}
.ap-steplist li span {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #f3f4f6;
	font-size: 12px;
	font-weight: 700;
}
.ap-steplist li.is-done { border-color: #cfe6c4; color: var(--ap-green-dark); }
.ap-steplist li.is-done span { background: var(--ap-green-pale); color: var(--ap-green); }
.ap-steplist li.is-current { border-color: var(--ap-green); background: var(--ap-green); color: #fff; font-weight: 600; }
.ap-steplist li.is-current span { background: #fff; color: var(--ap-green); }

.ap-errors {
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid #f3c1be;
	border-radius: 8px;
	background: #fdf0ef;
	font-size: 14px;
	color: #8a1f1a;
}
.ap-errors[hidden] { display: none; }
.ap-errors ul { margin: 6px 0 0; padding-left: 18px; }

.ap-form {
	padding: 26px;
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.ap-step[hidden] { display: none; }
.ap-step h2 {
	margin: 0 0 4px;
	padding: 0;
	border: 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--ap-ink);
}
.ap-step h2.ap-h2-gap { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--ap-line); }
.ap-help { margin: 0 0 20px; font-size: 14px; color: var(--ap-muted); }
.ap-help em, .ap-field em { font-style: normal; color: var(--ap-red); }

.ap-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 20px;
}
.ap-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
}
.ap-field[hidden] { display: none; }
.ap-span2 { grid-column: 1 / -1; }
.ap-field small { font-size: 12px; font-weight: 400; color: var(--ap-muted); }
.ap-field small.ap-ok { color: var(--ap-green); }
.ap-field small.ap-bad { color: var(--ap-red); }
.ap-form input[type=text],
.ap-form input[type=email],
.ap-form input[type=tel],
.ap-form select {
	width: 100% !important;
	height: 44px;
	margin: 0 !important;
	padding: 0 12px !important;
	border: 1px solid #d1d5db !important;
	border-radius: 8px !important;
	background: #fff !important;
	box-sizing: border-box;
	font: 400 15px "Inter", Arial, sans-serif !important;
	color: var(--ap-ink) !important;
	outline: none;
}
.ap-form input:focus, .ap-form select:focus {
	border-color: var(--ap-green) !important;
	box-shadow: 0 0 0 3px rgba(31, 122, 53, .15);
}
.ap-form .is-invalid,
.ap-form input.is-invalid,
.ap-form select.is-invalid { border-color: var(--ap-red) !important; box-shadow: 0 0 0 3px rgba(217, 58, 50, .12); }
.ap-dob { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; }

.ap-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 22px 16px;
	border: 2px dashed #cbd5c4;
	border-radius: 10px;
	background: #fafcf9;
	font-weight: 400;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.ap-drop:hover, .ap-drop.is-drag { border-color: var(--ap-green); background: var(--ap-green-pale); }
.ap-drop.has-file { border-style: solid; border-color: var(--ap-green); background: var(--ap-green-pale); }
.ap-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ap-drop svg.lucide { width: 28px; height: 28px; color: var(--ap-green); }
.ap-drop-text { font-size: 14px; color: #374151; word-break: break-all; }
.ap-drop-text b { color: var(--ap-green); }
.ap-drop-hint { font-size: 12px; color: var(--ap-muted); }

.ap-grades {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px 16px;
}
.ap-grade {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	padding: 6px 6px 6px 12px;
	border: 1px solid var(--ap-line);
	border-radius: 8px;
	font-size: 14px;
	color: #374151;
}
.ap-form .ap-grade select { width: 76px !important; height: 36px; flex: none; }
.ap-empty-note { padding: 18px; border-radius: 8px; background: #f3f4f6; color: var(--ap-muted); }

.ap-record {
	margin-bottom: 16px;
	padding: 16px;
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	background: #fcfcfd;
}
.ap-record-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ap-link { border: 0; background: none; color: var(--ap-red); font-size: 13px; font-weight: 600; cursor: pointer; }
.ap-link[hidden] { display: none; }

.ap-review {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr);
	gap: 0;
	margin: 12px 0 18px;
	border: 1px solid var(--ap-line);
	border-radius: 8px;
	overflow: hidden;
	font-size: 14px;
}
.ap-review dt, .ap-review dd { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--ap-line); }
.ap-review dt { background: #f9fafb; font-weight: 600; color: var(--ap-muted); }
.ap-review dd { word-break: break-word; }
.ap-declare {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px;
	border-radius: 8px;
	background: var(--ap-green-pale);
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}
.ap-declare input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--ap-green); }

.ap-nav {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid var(--ap-line);
}
.ap-nav #apPrev { margin-right: auto; }
.ap-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	padding: 0 20px;
	border: 1px solid var(--ap-green);
	border-radius: 8px;
	background: var(--ap-green);
	font: 600 15px "Inter", Arial, sans-serif;
	color: #fff !important;
	text-decoration: none !important;
	cursor: pointer;
}
.ap-btn:hover { background: var(--ap-green-dark); border-color: var(--ap-green-dark); }
.ap-btn[disabled] { opacity: .6; cursor: wait; }
.ap-btn[hidden] { display: none; }
.ap-btn-ghost { background: #fff; color: var(--ap-green) !important; }
.ap-btn-ghost:hover { background: var(--ap-green-pale); }
.ap-add { margin-top: 2px; }

/* ---------- Confirmation / result page ---------- */
.ap-result {
	max-width: 640px;
	margin: 10px auto 40px;
	padding: 34px 28px;
	border: 1px solid var(--ap-line);
	border-radius: 12px;
	background: #fff;
	text-align: center;
}
.ap-result-icon {
	display: inline-grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-bottom: 14px;
	border-radius: 50%;
	background: var(--ap-green-pale);
	color: var(--ap-green);
}
.ap-result.is-error .ap-result-icon { background: #fdf0ef; color: var(--ap-red); }
.ap-result-icon svg.lucide { width: 32px; height: 32px; }
.ap-result h1 { margin: 0 0 8px; padding: 0; border: 0; font-size: 26px; color: var(--ap-ink); }
.ap-result p { margin: 0 0 14px; font-size: 15px; color: #4b5563; line-height: 1.55; }
.ap-creds {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 8px 16px;
	margin: 18px auto;
	padding: 16px 20px;
	max-width: 360px;
	border: 1px dashed var(--ap-green);
	border-radius: 10px;
	background: var(--ap-green-pale);
	text-align: left;
	font-size: 15px;
}
.ap-creds dt { margin: 0; color: var(--ap-muted); }
.ap-creds dd { margin: 0; font: 700 17px Consolas, "Courier New", monospace; color: var(--ap-green-dark); word-break: break-all; }
.ap-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

@media (max-width: 760px) {
	.ap-grades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.ap-form { padding: 18px 14px; }
	.ap-fields { grid-template-columns: minmax(0, 1fr); }
	.ap-grades { grid-template-columns: minmax(0, 1fr); }
	.ap-steplist { display: none; }
	.ap-review { grid-template-columns: minmax(0, 1fr); }
	.ap-review dt { border-bottom: 0; padding-bottom: 2px; }
	.ap-nav .ap-btn { flex: 1 1 0; padding: 0 12px; }
	.ap-result { padding: 26px 16px; }
}

/* Override the template's generic form/label/em rules inside the application form */
.ap-form { display: block !important; width: auto !important; }
.ap-form label, .ap-form .ap-field { width: auto !important; float: none !important; padding: 0 !important; }
.ap-form em { display: inline !important; }
.ap-form label.ap-drop { padding: 22px 16px !important; }
.ap-form label.ap-grade { padding: 6px 6px 6px 12px !important; }
.ap-form label.ap-declare { padding: 14px !important; }
.ap-note > span { flex: 1; }
.ap-formwrap a { font-size: inherit; }
body.ap-page #mainpage > p { display: none; }	/* page title + description from the functions table */

/* Desktop: the page sits on the login background, so the form area gets a white panel */
@media (min-width: 768px) {
	.ap-formwrap, .ap-result { margin-top: 10px; padding: 28px 32px 32px; border-radius: 12px; background: rgba(255, 255, 255, .97); box-shadow: 0 10px 25px rgba(0, 0, 0, .15); }
}
/* Keep the label text and its * on one line */
.ap-form .ap-field { display: block !important; }
.ap-form .ap-field[hidden] { display: none !important; }
.ap-form .ap-field > input, .ap-form .ap-field > select { margin-top: 6px !important; }
.ap-form .ap-field > small { display: block; margin-top: 6px; }
.ap-form .ap-field > .ap-drop, .ap-form .ap-field > .ap-dob { margin-top: 6px; }

/* Step list: one row of equal columns, numbered circles joined by a line, labels underneath */
.ap-steplist {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 0;
	margin: 6px 0 24px;
}
.ap-steplist li,
.ap-steplist li.is-done,
.ap-steplist li.is-current {
	position: relative;
	flex-direction: column;
	gap: 8px;
	padding: 0 4px;
	border: 0;
	border-radius: 0;
	background: none;
	font-size: 12.5px;
	line-height: 1.3;
	text-align: center;
}
.ap-steplist li::before {
	content: "";
	position: absolute;
	top: 15px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: var(--ap-line);
}
.ap-steplist li:first-child::before { display: none; }
.ap-steplist li span {
	position: relative;
	z-index: 1;
	width: 32px;
	height: 32px;
	border: 2px solid var(--ap-line);
	background: #fff;
	box-sizing: border-box;
	font-size: 13px;
	color: var(--ap-muted);
}
.ap-steplist li.is-done::before,
.ap-steplist li.is-current::before { background: var(--ap-green); }
.ap-steplist li.is-done span { border-color: var(--ap-green); background: var(--ap-green-pale); color: var(--ap-green); }
.ap-steplist li.is-current { color: var(--ap-green-dark); font-weight: 600; }
.ap-steplist li.is-current span { border-color: var(--ap-green); background: var(--ap-green); color: #fff; box-shadow: 0 0 0 4px rgba(31, 122, 53, .15); }
@media (max-width: 900px) {
	.ap-steplist { display: none; }	/* phones and small tablets: the progress bar and "Step N of 7" are enough */
}

/* Review: one heading per step, education records labelled */
.ap-review dt.ap-review-head { grid-column: 1 / -1; background: var(--ap-green-pale); color: var(--ap-green-dark); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.ap-review dt.ap-review-sub { grid-column: 1 / -1; background: #fff; color: var(--ap-ink); }
.ap-review-empty { color: #9ca3af; }
.ap-result a { font-size: inherit; }

/* Staff pages that reuse the application form look (e.g. Direct Admission) */
.ap-admin { max-width: 900px; font-family: "Inter", Arial, Helvetica, sans-serif; color: var(--ap-ink); }
.ap-admin .ap-form { margin-bottom: 24px; }
.ap-admin svg.lucide { width: 18px; height: 18px; flex: none; }
.ap-admin-note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 6px 0 18px;
	padding: 12px 14px;
	border: 1px solid #cfe6c4;
	border-radius: 8px;
	background: var(--ap-green-pale);
	font-size: 14px;
	color: var(--ap-green-dark);
}
.ap-admin .ap-nav { justify-content: flex-start; }
.ap-dob.ap-dob-2 { grid-template-columns: 1.4fr 1fr; }
.ap-admin .ap-form h2 { margin: 0 0 4px; padding: 0; border: 0; font: 700 22px "Inter", Arial, sans-serif; letter-spacing: 0; color: var(--ap-ink); }
.ap-admin .ap-form h2::after, .ap-admin .ap-form h2::before { display: none; }
.ap-admin .ap-btn-ghost { background: #fff; color: var(--ap-green) !important; }
.ap-admin .ap-btn-ghost:hover { background: var(--ap-green-pale); }
.ap-codes { margin: 0 0 18px; font-size: 14px; }
.ap-codes summary { cursor: pointer; font-weight: 600; color: var(--ap-green); }
.ap-codes table { margin-top: 8px; border-collapse: collapse; }
.ap-codes th, .ap-codes td { padding: 5px 12px; border: 1px solid var(--ap-line); text-align: left; }
.ap-codes th { background: #f9fafb; }
