/**
 * Bedford Academy staff sign-in.
 * Palette and type lifted from bedford-academy-family-updates/assets/public.css
 * so the login reads as the same product as the parent form.
 */

/**
 * Theme resets. The family-updates plugin ships these in standalone.css but
 * only loads them on its own page, so the login page needs its own copy or the
 * theme's wrapper padding boxes the card in.
 */
html:has(body.bafu-login-page) {
	margin: 0 !important;
	padding: 0 !important;
	background: #f4f7f8 !important;
}

body.bafu-login-page {
	margin: 0 !important;
	padding: 0 !important;
	min-height: 100vh !important;
	max-width: none !important;
	background: #f4f7f8 !important;
}

body.bafu-login-page > .bafu-public {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

@media screen and (max-width: 782px) {
	body.admin-bar.bafu-login-page { padding-top: 0 !important; }
}

.bafu-login {
	--blue: #0d5a8b;
	--blue-dark: #08466f;
	--orange: #f47a2a;
	--lime: #9bbf2f;
	--ink: #183248;
	--muted: #687987;
	--line: #d9e2e8;
	--wash: #f4f7f8;

	margin: 0 calc(50% - 50vw);
	width: 100vw;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--wash);
	color: var(--ink);
	font-family: Arial, Helvetica, sans-serif;
	line-height: 1.4;
}

.bafu-login * { box-sizing: border-box; }
.bafu-login button,
.bafu-login input { font: inherit; }

/* Header -- mirrors .bafu-header on the parent form. */
.bafu-login .bafu-header {
	height: 94px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 max(28px, calc((100vw - 1180px) / 2));
	background: #fff;
	border-bottom: 1px solid #e6ecef;
}

.bafu-login .bafu-header img {
	display: block;
	width: 242px;
	height: auto;
}

.bafu-login .bafu-header > span {
	color: #597080;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bafu-login .bafu-header i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--lime);
}

/* Centred card on the same soft gradient as the hero. */
.bafu-login-wrap {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 26px;
	padding: 56px 20px 32px;
	background: linear-gradient(120deg, #f6fafc, #eef5f7);
}

.bafu-login .bafu-card {
	background: #fff;
	border: 1px solid #dfe7eb;
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(30, 70, 94, .05);
}

.bafu-login-card {
	width: 100%;
	max-width: 440px;
	padding: 38px 36px 32px;
}

.bafu-login .bafu-eyebrow {
	margin: 0 0 10px;
	font-size: 11px;
	letter-spacing: 1.6px;
	font-weight: 800;
	color: var(--orange);
}

.bafu-login-card h1 {
	margin: 0;
	color: var(--blue-dark);
	font: 700 34px/1.1 Georgia, serif;
	letter-spacing: -.5px;
}

.bafu-login-sub {
	margin: 12px 0 26px;
	color: #536b79;
	font-size: 14px;
	line-height: 1.55;
}

/* Fields */
.bafu-login-form label {
	display: block;
	margin-bottom: 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .3px;
	color: #43596a;
}

.bafu-login-form input[type="email"],
.bafu-login-form input[type="password"],
.bafu-login-form input[type="text"] {
	display: block;
	width: 100%;
	margin-top: 7px;
	padding: 12px 13px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: #fcfdfe;
	color: var(--ink);
	font-size: 15px;
	font-weight: 400;
}

.bafu-login-form input:focus {
	outline: none;
	border-color: var(--blue);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(13, 90, 139, .13);
}

.bafu-pass-wrap { position: relative; display: block; }
.bafu-pass-wrap input { padding-right: 68px; }

.bafu-pass-toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	margin-top: 3px;
	padding: 6px 10px;
	border: 0;
	border-radius: 5px;
	background: transparent;
	color: var(--blue);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.bafu-pass-toggle:hover { background: #eef5f9; }

.bafu-remember {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 4px 0 22px;
	font-weight: 400;
	font-size: 13px;
	color: #536b79;
}

.bafu-remember input { width: 15px; height: 15px; margin: 0; }

/* Primary action -- same treatment as "Save & continue". */
.bafu-login-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	padding: 13px 20px;
	border: 0;
	border-radius: 7px;
	background: var(--blue);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease;
}

.bafu-login-btn:hover { background: var(--blue-dark); }
.bafu-login-btn:disabled { opacity: .6; cursor: default; }

/* Messages */
.bafu-login .bafu-inline-error {
	margin: 0 0 18px;
	padding: 12px;
	border-radius: 6px;
	background: #fff0ef;
	color: #9b3d35;
	font-size: 12px;
}

.bafu-login .bafu-inline-notice {
	margin: 0 0 18px;
	padding: 12px;
	border-radius: 6px;
	background: #eef6e6;
	color: #4e6b1c;
	font-size: 12px;
}

.bafu-login-alt {
	margin: 18px 0 0;
	text-align: center;
	font-size: 13px;
}

.bafu-login-alt a { color: var(--blue); text-decoration: none; font-weight: 700; }
.bafu-login-alt a:hover { text-decoration: underline; }

/* Reassurance block, same as the parent form's privacy note. */
.bafu-privacy {
	display: flex;
	gap: 11px;
	margin-top: 26px;
	padding: 13px 14px;
	border: 1px solid #e3ebef;
	border-radius: 8px;
	background: #f8fbfc;
}

.bafu-privacy > span {
	flex: 0 0 auto;
	width: 19px;
	height: 19px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #e9f2db;
	color: #658018;
	font-size: 11px;
	font-weight: 800;
}

.bafu-privacy p {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: #5c7383;
}

.bafu-privacy strong { color: var(--ink); }

/* Footer */
.bafu-login .bafu-footer {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	justify-content: center;
	color: #7d909c;
	font-size: 12px;
}

@media (max-width: 600px) {
	.bafu-login .bafu-header { height: 74px; padding: 0 18px; }
	.bafu-login .bafu-header img { width: 168px; }
	.bafu-login .bafu-header > span { font-size: 11px; }
	.bafu-login-wrap { padding: 28px 16px 24px; }
	.bafu-login-card { padding: 28px 22px 26px; }
	.bafu-login-card h1 { font-size: 28px; }
}
