/* Shared by the patient portal sign-in and OTP pages
   (Views/PatientPortal/LoginPortal.cshtml, OtpVerification.cshtml).

   Split card: a photo panel on the left (images/portal/login-side.jpg, a crop
   of the site's own Uploads/VisionImage/vision.jpg) with the portal's promise
   over a dark indigo fade, and the form on the right - brand, heading,
   subtitle, one underlined field, a full-width button, the copyright line.
   Colours follow the portal (portal-ui.css): indigo on a lavender ground.
   Every colour behind white text is >= 4.5:1. */

.fkh-login {
	--fkh-deep: #4338ca;
	--fkh-ink: #161a45;
	--fkh-text: #1f2350;
	--fkh-soft: #585e82;
	--fkh-faint: #6b7194;
	--fkh-line: #e2e4f0;
	--fkh-focus: #4f46e5;
	--fkh-grad: linear-gradient(135deg, #4338ca 0%, #5b50e6 100%);
	--fkh-grad-hover: linear-gradient(135deg, #3730a3 0%, #4a3fd1 100%);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 100vh;
	padding: 24px 16px;
	background:
		radial-gradient(900px 520px at 100% 0%, rgba(167,139,250,.10), transparent 62%),
		radial-gradient(760px 520px at 0% 100%, rgba(129,140,248,.10), transparent 60%),
		#f4f5fb;
}

/* ---------- The card ---------- */
.fkh-card {
	display: grid;
	grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
	width: min(1040px, 100%);
	min-height: min(640px, calc(100vh - 48px));
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 30px 70px rgba(30,27,75,.12), 0 2px 8px rgba(30,27,75,.05);
	overflow: hidden;
	animation: fkh-rise .5s cubic-bezier(.16, 1, .3, 1) both;
}

/* ---------- Left: photo panel ---------- */
.fkh-side {
	position: relative;
	display: flex;
	align-items: flex-end;
	padding: 44px 44px 48px;
	color: #fff;
	background: linear-gradient(180deg, rgba(30,27,75,0) 32%, rgba(30,27,75,.55) 62%, rgba(22,18,66,.92) 100%), url("../images/portal/makeUsDifferentImg.webp") center 30% / cover no-repeat;
}

.fkh-side-copy {
	max-width: 380px;
}

.fkh-side-title {
	margin: 0 0 16px;
	color: #fff;
	font-size: 34px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.15;
	text-shadow: 0 2px 18px rgba(10,8,40,.35);
}

.fkh-side-text {
	margin: 0;
	color: rgba(255,255,255,.9);
	font-size: 15px;
	line-height: 1.65;
}

/* ---------- Right: form ---------- */
.fkh-card-body {
	display: flex;
	flex-direction: column;
	padding: 56px 72px 28px;
}

	/* The form sits in the middle; the copyright line keeps to the bottom. */
	.fkh-card-body > form {
		width: 100%;
		max-width: 400px;
		margin: auto 0;
	}

.fkh-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 44px;
}

.fkh-logo {
	display: block;
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	object-fit: contain;
}

.fkh-brand-name {
	display: flex;
	flex-direction: column;
	color: #1e1b4b;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .05em;
	line-height: 1.15;
	text-transform: uppercase;
}

.fkh-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 22px;
	color: var(--fkh-soft);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 6px;
	transition: color .18s ease;
}

	.fkh-back i {
		font-size: 12px;
		transition: transform .18s ease;
	}

	.fkh-back:hover {
		color: var(--fkh-deep);
	}

		.fkh-back:hover i { transform: translateX(-2px); }

	.fkh-back:focus-visible {
		outline: 2px solid var(--fkh-focus);
		outline-offset: 3px;
	}

.fkh-title {
	margin: 0 0 8px;
	color: var(--fkh-ink);
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.25;
	text-align: left;
}

.fkh-subtitle {
	margin: 0 0 32px;
	color: var(--fkh-soft);
	font-size: 14.5px;
	line-height: 1.55;
}

.fkh-label {
	display: block;
	margin-bottom: 6px;
	color: #2a2f5c;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* One underlined field, as in the design; the icon lights up on focus. */
.fkh-field {
	position: relative;
}

	.fkh-field i {
		position: absolute;
		top: 50%;
		left: 2px;
		color: #8a90b0;
		font-size: 16px;
		transform: translateY(-50%);
		pointer-events: none;
		transition: color .18s ease;
	}

	.fkh-field:focus-within i {
		color: var(--fkh-focus);
	}

.fkh-input {
	width: 100%;
	padding: 14px 4px 14px 30px;
	color: var(--fkh-text);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .02em;
	background: transparent;
	border: 0;
	border-bottom: 2px solid var(--fkh-line);
	border-radius: 0;
	outline: none;
	transition: border-color .18s ease, box-shadow .18s ease;
}

	.fkh-input::placeholder {
		color: var(--fkh-faint); /* 4.8:1 - a hint is still text */
		font-weight: 500;
		letter-spacing: 0;
	}

	.fkh-input:hover {
		border-bottom-color: #c9cdea;
	}

	.fkh-input:focus {
		border-bottom-color: var(--fkh-focus);
		box-shadow: 0 1px 0 0 var(--fkh-focus);
	}

/* Primary action: full width, indigo gradient. */
.fkh-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 50px;
	margin-top: 28px;
	padding: 13px 20px;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .01em;
	background: var(--fkh-grad);
	border: 0;
	border-radius: 10px;
	box-shadow: 0 10px 22px rgba(79,70,229,.28);
	cursor: pointer;
	transition: box-shadow .18s ease, transform .18s ease;
}

	.fkh-submit:hover {
		background: var(--fkh-grad-hover);
		box-shadow: 0 14px 28px rgba(79,70,229,.36);
		transform: translateY(-1px);
	}

	.fkh-submit:active {
		transform: translateY(1px);
	}

	.fkh-submit:focus-visible {
		outline: 3px solid #c7d2fe;
		outline-offset: 3px;
	}

/* Error: a rose tint with its own warning glyph. */
.fkh-error {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 22px;
	padding: 12px 14px;
	color: #9f1239;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	background: linear-gradient(120deg, #ffe6ea, #fff0e8);
	border: 1px solid #fdb3c1;
	border-left: 4px solid #e11d48;
	border-radius: 10px;
	animation: fkh-shake .4s ease both;
}

	.fkh-error::before {
		content: "\f06a"; /* fa-circle-exclamation */
		flex: 0 0 auto;
		margin-top: 1px;
		color: #e11d48;
		font-family: "Font Awesome 6 Free";
		font-weight: 900;
	}

.fkh-copy {
	margin: 40px 0 0;
	color: var(--fkh-faint);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-align: center;
	text-transform: uppercase;
}

/* ---------- Motion ---------- */
@keyframes fkh-rise {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

@keyframes fkh-shake {
	0%, 100% { transform: none; }
	25% { transform: translateX(-4px); }
	50% { transform: translateX(4px); }
	75% { transform: translateX(-2px); }
}

/* ---------- Tablets: the photo becomes a banner above the form ---------- */
@media (max-width: 900px) {
	.fkh-card {
		grid-template-columns: minmax(0, 1fr);
		width: min(560px, 100%);
		min-height: 0;
	}

	/* Shorter and wider, so the fade starts higher to keep the title legible
	   over the bright scanner, and the crop drops to the staff member. */
	.fkh-side {
		min-height: 260px;
		padding: 28px 32px;
		background: linear-gradient(180deg, rgba(30,27,75,.20) 0%, rgba(30,27,75,.62) 45%, rgba(22,18,66,.94) 100%), url("../images/portal/makeUsDifferentImg.webp") center 42% / cover no-repeat;
	}

	.fkh-side-title {
		margin-bottom: 10px;
		font-size: 27px;
	}

	.fkh-side-text {
		font-size: 14px;
	}

	.fkh-card-body {
		padding: 36px 32px 24px;
	}

		.fkh-card-body > form {
			max-width: none;
		}

	.fkh-brand {
		margin-bottom: 30px;
	}
}

/* ---------- Phones ----------
   The banner keeps only its title; 16px inputs keep iOS from zooming. */
@media (max-width: 560px) {
	.fkh-login {
		padding: 12px;
	}

	.fkh-card {
		border-radius: 20px;
	}

	.fkh-side {
		min-height: 190px;
		padding: 22px 22px;
	}

	.fkh-side-title {
		margin: 0;
		font-size: 23px;
	}

	.fkh-side-text {
		display: none;
	}

	.fkh-card-body {
		padding: 28px 20px 20px;
	}

	.fkh-logo {
		width: 50px;
		height: 50px;
	}

	.fkh-brand-name {
		font-size: 15px;
	}

	.fkh-title {
		font-size: 22px;
	}

	.fkh-input {
		font-size: 16px;
	}

	.fkh-copy {
		margin-top: 32px;
		font-size: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fkh-card,
	.fkh-error {
		animation: none;
	}

	.fkh-input,
	.fkh-submit,
	.fkh-field i,
	.fkh-back,
	.fkh-back i {
		transition: none;
	}

	.fkh-submit:hover,
	.fkh-submit:active,
	.fkh-back:hover i {
		transform: none;
	}
}
