/* ==========================================================================
   Login page — /login/
   ========================================================================== */

:root {
	/* --lp-teal:        #3a9e8f; */
	--lp-teal:    #008585;
	--lp-teal-dark:   #2e8070;
	--lp-teal-light:  #eaf5f3;
	--lp-purple:      #3b3177;
	--lp-text:        #1a1a1a;
	--lp-text-light:  #666;
	--lp-border:      #d9d9d9;
	--lp-error:       #d0021b;
	--lp-radius:      6px;
	--lp-font:        'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Layout ── */

.lp-login {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: calc(100vh - 80px);
	font-family: var(--lp-font);
}

.lp-login__left {
	padding: 80px 64px 64px;
	max-width: 560px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.lp-login__right {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0faf8;
	overflow: hidden;
}

.lp-login__illustration {
	width: 100%;
	max-width: 500px;
	padding: 40px;
}

.lp-login__illustration svg {
	width: 100%;
	height: auto;
	border-radius: 12px;
}

/* ── Title ── */

.lp-login__title {
	font-size: clamp(28px, 3.5vw, 40px);
	font-weight: 700;
	color: #333333;
	margin-bottom: 48px;
	line-height: 1.2;
}

/* ── Form ── */

.lp-login-form {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* ── Floating-label field (matches the wizard's .lpw-field look/feel) ──
   .lp-login-field is just a flow wrapper (holds the field + its error message
   below); .lp-login-field__box is the visual gray/rounded box, so an error
   message doesn't inherit the box's background and get clipped by it. */

.lp-login-field__box {
	position: relative;
	min-height: 56px;
	border-radius: 12px 12px 0 0;
	overflow: hidden;
	background: #F9F8F8;
	transition: background .15s;
}

.lp-login-field__box:focus-within {
	background: #efefef;
}

.lp-login-field__box input {
	width: 100%;
	min-height: 56px;
	padding: 24px 19px 8px;
	font-size: 16px;
	line-height: 1.2;
	font-family: var(--lp-font);
	color: var(--lp-text);
	border: none;
	border-bottom: 1.5px solid var(--lp-border);
	background: transparent;
	outline: none;
	transition: border-color .2s;
	box-sizing: border-box;
	display: block;
}

.lp-login-field__box input:focus {
	border-bottom-color: var(--lp-teal);
}

.lp-login-field__box label {
	position: absolute;
	left: 19px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	font-weight: 400;
	color: var(--lp-text-light);
	pointer-events: none;
	line-height: 1;
	transition: top .15s, transform .15s, font-size .15s, color .15s;
}

/* :-webkit-autofill is listed alongside the other two because Chrome withholds
   an autofilled value from :placeholder-shown until the user interacts with the
   page — so on first paint the label sat unfloated directly on top of the
   visible autofilled text. */
.lp-login-field__box input:focus ~ label,
.lp-login-field__box input:not(:placeholder-shown) ~ label,
.lp-login-field__box input:-webkit-autofill ~ label {
	top: 12px;
	transform: none;
	font-size: 11px;
	font-weight: 500;
	color: var(--lp-text-light);
}

/* Chrome paints autofilled inputs with its own lavender background, which
   background-color cannot override — a large inset shadow is the only way to
   cover it. -webkit-text-fill-color is likewise the only way to set the text
   colour, since `color` is overridden too. */
.lp-login-field__box input:-webkit-autofill,
.lp-login-field__box input:-webkit-autofill:hover {
	-webkit-box-shadow: 0 0 0 1000px #F9F8F8 inset;
	box-shadow: 0 0 0 1000px #F9F8F8 inset;
	-webkit-text-fill-color: var(--lp-text);
}

/* Matches .lp-login-field__box:focus-within's own darker fill. */
.lp-login-field__box input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px #efefef inset;
	box-shadow: 0 0 0 1000px #efefef inset;
}

/* Focus specifically (not just filled) gets the teal treatment, to match the
   underline turning teal on input:focus above. */
.lp-login-field__box input:focus ~ label {
	color: var(--lp-teal);
}

/* Invalid state: red underline + red label, mirroring the teal focus treatment.
   Set on the input by login.js. Listed after the focus rules so a field that is
   both focused and invalid still reads as invalid. */
.lp-login-field__box input.is-invalid {
	border-bottom-color: var(--lp-error);
}

.lp-login-field__box input.is-invalid ~ label {
	color: var(--lp-error);
}

.lp-login-field__error {
	display: block;
	font-size: 13px;
	color: var(--lp-error);
	margin-top: 4px;
	min-height: 0;
}

.lp-login-field__error--general {
	font-size: 14px;
	background: #fdf0f0;
	border: 1px solid #f5c6c6;
	border-radius: var(--lp-radius);
	padding: 10px 14px;
}

.lp-login-field__error--general:empty {
	display: none;
}

/* ── Remember / Forgot row ── */

.lp-login-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.lp-login-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--lp-text-light);
	cursor: pointer;
}

.lp-login-remember input {
	accent-color: var(--lp-teal);
	width: 16px;
	height: 16px;
}

.lp-login-forgot {
	font-size: 14px;
	color: var(--lp-teal);
	text-decoration: none;
	font-weight: 500;
}

.lp-login-forgot:hover {
	color: var(--lp-teal-dark);
	text-decoration: underline;
}

/* ── Button ── */

.lp-btn--login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 40px;
	border-radius: var(--lp-radius);
	background: var(--lp-teal);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	border: none;
	cursor: pointer;
	transition: background .18s;
	align-self: flex-start;
}

.lp-btn--login:hover { background: var(--lp-teal-dark); }
.lp-btn--login:disabled { opacity: .6; cursor: not-allowed; }

.lp-btn--outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: var(--lp-radius);
	background: transparent;
	color: var(--lp-teal);
	font-size: 14px;
	font-weight: 600;
	border: 1.5px solid var(--lp-teal);
	cursor: pointer;
	transition: background .18s, color .18s;
}

.lp-btn--outline:hover { background: var(--lp-teal); color: #fff; }
.lp-btn--sm { padding: 8px 16px; font-size: 13px; }

/* ── Footer links ── */

.lp-login-footer-links {
	margin-top: 40px;
	text-align: left;
}

.lp-login-footer-links p {
	font-size: 14px;
	color: var(--lp-text-light);
	margin-bottom: 4px;
}

.lp-login-signup {
	font-size: 14px;
	color: var(--lp-teal);
	text-decoration: none;
	font-weight: 600;
}

.lp-login-signup:hover { text-decoration: underline; }

/* ── Forgot password ── */

.lp-login-forgot-form {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--lp-border);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Author rule above has the same specificity as the UA stylesheet's
   [hidden] { display: none }, and author styles always win that tie — so
   without this, the reset form stayed visible regardless of the hidden
   attribute. */
.lp-login-forgot-form[hidden] {
	display: none;
}

.lp-login-forgot-form__intro {
	font-size: 14px;
	color: var(--lp-text-light);
	margin: 0;
}

.lp-login-forgot-form__success {
	background: #eafaf3;
	border: 1px solid #b2e3d2;
	border-radius: var(--lp-radius);
	padding: 10px 14px;
	font-size: 13px;
	color: #1a7a54;
}

/* ── Responsive ── */

@media (max-width: 900px) {
	.lp-login { grid-template-columns: 1fr; }
	.lp-login__right { display: none; }
	.lp-login__left { padding: 48px 24px; max-width: 100%; }
}

/* ── Password visibility toggle ──
   Sits inside the field box, which is position:relative. The input gets extra
   right padding so a long password can't run underneath the button. */
.lp-login-field__box--password input {
	padding-right: 48px;
}

.lp-toggle-password {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--lp-text-light);
	display: flex;
	align-items: center;
	z-index: 1;
}

.lp-toggle-password:hover { color: var(--lp-teal); }
