/* Student authentication modal, header controls and account page */

.lh-header__start-lessons[hidden],
[data-lh-discuss-lessons][hidden] {
	display: none !important;
}

.lh-header__auth {
	align-items: center;
	display: inline-flex;
	flex-wrap: wrap;
	gap: var(--spacing-xs);
	justify-content: flex-end;
}

.lh-header__auth--mobile {
	display: none;
	margin-top: var(--spacing-md);
	width: 100%;
}

.lh-header__student-auth {
	align-items: center;
	display: inline-flex;
	gap: var(--spacing-xs);
}

.lh-header__student-auth--mobile {
	display: none;
}

.lh-header__tutor-link {
	align-items: center;
	color: var(--color-text-muted);
	display: inline-flex;
	font-size: var(--font-size-nav);
	font-weight: 500;
	justify-content: center;
	line-height: 1.2;
	min-height: 2.5rem;
	padding: 0.625rem 0.75rem;
	text-decoration: none;
	transition: color var(--transition-base);
	white-space: nowrap;
}

.lh-header__tutor-link:hover,
.lh-header__tutor-link:focus-visible {
	color: var(--color-accent);
	outline: none;
}

.lh-header__tutor-link:focus-visible {
	box-shadow: var(--focus-ring);
	border-radius: var(--radius-pill);
}

.lh-header__student-login,
.lh-header__student-lessons {
	align-items: center;
	background: transparent;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	color: var(--color-text);
	display: inline-flex;
	font-family: inherit;
	font-size: var(--font-size-nav);
	font-weight: 500;
	justify-content: center;
	line-height: 1.2;
	min-height: 2.5rem;
	padding: 0.625rem 1rem;
	text-decoration: none;
	transition: background-color var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

.lh-header__student-login {
	cursor: pointer;
}

.lh-header__student-login:hover,
.lh-header__student-login:focus-visible,
.lh-header__student-lessons:hover,
.lh-header__student-lessons:focus-visible {
	background-color: var(--color-accent-soft);
	border-color: var(--color-border-strong);
	color: var(--color-accent);
	outline: none;
}

.lh-header__student-login:focus-visible,
.lh-header__student-lessons:focus-visible {
	box-shadow: var(--focus-ring);
}

.lh-header__account-menu {
	position: relative;
}

.lh-header__account-menu-toggle {
	align-items: center;
	background: transparent;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	color: var(--color-text);
	cursor: pointer;
	display: inline-flex;
	justify-content: center;
	min-height: 2.5rem;
	min-width: 2.5rem;
	padding: 0;
	transition: background-color var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

.lh-header__account-menu-toggle:hover,
.lh-header__account-menu-toggle:focus-visible {
	background-color: var(--color-accent-soft);
	border-color: var(--color-border-strong);
	color: var(--color-accent);
	outline: none;
}

.lh-header__account-menu-toggle:focus-visible {
	box-shadow: var(--focus-ring);
}

.lh-header__account-menu-icon {
	display: block;
	height: 1.125rem;
	width: 1.125rem;
}

.lh-header__account-menu-panel {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-block);
	box-shadow: var(--shadow-soft);
	list-style: none;
	margin: 0.375rem 0 0;
	min-width: 11rem;
	padding: 0.375rem;
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 30;
}

.lh-header__account-menu-panel a,
.lh-header__account-menu-panel button {
	background: transparent;
	border: 0;
	border-radius: var(--radius-pill);
	color: var(--color-text);
	cursor: pointer;
	display: block;
	font: inherit;
	padding: 0.625rem 0.75rem;
	text-align: left;
	text-decoration: none;
	width: 100%;
}

.lh-header__account-menu-panel a:hover,
.lh-header__account-menu-panel a:focus-visible,
.lh-header__account-menu-panel button:hover,
.lh-header__account-menu-panel button:focus-visible {
	background: var(--color-accent-soft);
	color: var(--color-accent);
	outline: none;
}

@media (max-width: 1023px) {
	.lh-header__auth--desktop {
		display: none;
	}

	.lh-header__auth--mobile {
		display: flex;
		flex-direction: column;
	}

	.lh-header__student-auth--desktop {
		display: none;
	}

	.lh-header__tutor-link--desktop {
		display: none;
	}

	.lh-header__student-auth--mobile {
		display: flex;
		flex-direction: column;
		width: 100%;
	}

	.lh-header__tutor-link--mobile {
		justify-content: center;
		text-align: center;
		width: 100%;
	}

	.lh-header__auth--mobile .lh-header__student-login,
	.lh-header__auth--mobile .lh-header__student-lessons {
		justify-content: center;
		text-align: center;
		width: 100%;
	}

	.lh-header__student-auth--logged-in.lh-header__student-auth--mobile {
		align-items: stretch;
		flex-direction: row;
		gap: var(--spacing-sm);
	}

	.lh-header__student-auth--logged-in.lh-header__student-auth--mobile .lh-header__student-lessons {
		flex: 1;
	}
}

@media (min-width: 1024px) {
	.lh-header__auth--mobile {
		display: none;
	}

	.lh-header__student-auth--mobile {
		display: none;
	}

	.lh-header__tutor-link--mobile {
		display: none;
	}
}

/* Modal */

.lh-auth-modal {
	background: rgb(42 36 32 / 0.45);
	border: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	padding: var(--container-padding);
	width: 100%;
}

.lh-auth-modal::backdrop {
	background: rgb(42 36 32 / 0.45);
}

.lh-auth-modal__inner {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-left: 4px solid var(--color-accent-secondary);
	border-radius: 0 var(--radius-block) var(--radius-block) 0;
	margin: 0 auto;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	max-width: 28rem;
	overflow: auto;
	padding: var(--spacing-lg);
	position: relative;
	width: 100%;
}

.lh-auth-modal__close {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--color-text-muted);
	cursor: pointer;
	display: inline-flex;
	font-size: 1.75rem;
	height: 2.5rem;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: var(--spacing-sm);
	top: var(--spacing-sm);
	width: 2.5rem;
}

.lh-auth-modal__close:hover,
.lh-auth-modal__close:focus-visible {
	color: var(--color-accent);
	outline: none;
}

.lh-auth-modal__close:focus-visible {
	box-shadow: var(--focus-ring);
}

.lh-auth-modal__title {
	font-size: var(--font-size-h3);
	margin: 0 0 var(--spacing-md);
	padding-right: 2rem;
}

.lh-auth-modal__lead,
.lh-auth-modal__follow-up,
.lh-auth-modal__message {
	color: var(--color-text-muted);
	line-height: 1.6;
	margin: 0 0 var(--spacing-md);
}

.lh-auth-modal__feedback {
	border-radius: var(--radius-block);
	margin-bottom: var(--spacing-md);
	padding: 0.75rem 1rem;
}

.lh-auth-modal__feedback--error {
	background: #fdecea;
	color: #7a2e2e;
}

.lh-auth-modal__feedback--success {
	background: #edf7ed;
	color: #2e5c31;
}

.lh-auth-form__field {
	margin-bottom: var(--spacing-md);
}

.lh-auth-form__label {
	display: block;
	font-size: 0.9375rem;
	font-weight: 500;
	margin-bottom: 0.375rem;
}

.lh-auth-form__input {
	background: var(--color-background);
	border: 1px solid var(--color-border);
	border-radius: var(--button-border-radius);
	font: inherit;
	padding: 0.75rem 0.875rem;
	width: 100%;
}

.lh-auth-form__password-wrap {
	display: block;
	position: relative;
}

.lh-auth-form__password-wrap .lh-auth-form__input {
	padding-right: 4.75rem;
}

.lh-auth-form__password-toggle {
	background: transparent;
	border: 0;
	border-radius: 0.375rem;
	color: var(--color-text);
	cursor: pointer;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.35rem 0.5rem;
	position: absolute;
	right: 0.65rem;
	text-decoration: underline;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;
}

.lh-auth-form__password-toggle:hover,
.lh-auth-form__password-toggle:focus-visible {
	color: var(--color-accent);
}

.lh-auth-form__password-toggle:focus-visible {
	box-shadow: var(--focus-ring);
	outline: none;
}

.lh-auth-form__password-toggle[aria-pressed="true"] {
	background: #efefef;
	text-decoration: none;
}

.lh-auth-form__input:focus-visible {
	border-color: var(--color-accent);
	box-shadow: var(--focus-ring);
	outline: none;
}

.lh-auth-form__input[aria-invalid="true"] {
	border-color: #b42318;
}

.lh-auth-form__field--checkbox {
	align-items: flex-start;
	display: flex;
	gap: 0.625rem;
}

.lh-auth-form__field--checkbox input {
	margin-top: 0.25rem;
}

.lh-auth-form__field--checkbox label {
	font-size: 0.9375rem;
	line-height: 1.5;
}

.lh-auth-form__error {
	color: #b42318;
	font-size: 0.875rem;
	margin: 0.375rem 0 0;
}

.lh-auth-form__submit {
	margin-top: var(--spacing-sm);
	width: 100%;
}

.lh-auth-form__links {
	font-size: 0.9375rem;
	margin: var(--spacing-md) 0 0;
	text-align: center;
}

.lh-auth-form__link {
	background: none;
	border: 0;
	color: var(--color-accent);
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
}

.lh-auth-form__link:hover,
.lh-auth-form__link:focus-visible {
	color: var(--color-accent-hover);
	outline: none;
}

.lh-auth-form__honeypot {
	height: 0;
	left: -9999px;
	overflow: hidden;
	position: absolute;
	width: 0;
}

html.lh-auth-modal-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.lh-auth-modal,
	.lh-auth-modal::backdrop {
		animation: none;
	}
}

/* Account landing page */

.lh-page--student-account:has(.lh-student-portal) {
	padding-block: var(--spacing-md);
}

@media (min-width: 768px) {
	.lh-page--student-account:has(.lh-student-portal) {
		padding-block: var(--spacing-lg);
	}
}

.lh-student-account {
	padding-block: var(--spacing-2xl);
}

.lh-page--student-account .lh-student-account:has(.lh-student-portal) {
	padding-block: 0;
}

.lh-page--student-account .lh-container.lh-student-account:has(.lh-student-portal) {
	gap: 0.75rem;
	padding-block: 0.35rem 0;
}

.lh-page--student-account .lh-container.lh-student-account {
	align-items: stretch;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-lg);
	width: 100%;
}

.lh-student-account__header,
.lh-student-account__status,
.lh-student-account .lh-student-portal {
	width: 100%;
}

.lh-student-account__header .lh-student-account__title {
	margin-bottom: 0;
}

.lh-student-account__fallback {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-block);
	box-shadow: 0 10px 28px rgb(36 38 36 / 0.06);
	margin-inline: auto;
	max-width: 28rem;
	padding: clamp(1.25rem, 4vw, 2rem);
	width: 100%;
}

.lh-student-account__fallback .lh-student-account__title {
	font-size: var(--font-size-h2);
	margin-bottom: var(--spacing-md);
	text-align: center;
}

.lh-student-account__fallback-form .lh-auth-form__submit {
	width: 100%;
}

.lh-student-account__fallback-links {
	text-align: center;
}

.lh-student-account__title {
	font-size: var(--font-size-h1);
	margin: 0 0 var(--spacing-lg);
}

.lh-student-account__notice {
	background: var(--color-accent-soft);
	border-left: 4px solid var(--color-accent);
	border-radius: 0 var(--radius-block) var(--radius-block) 0;
	margin-bottom: var(--spacing-lg);
	padding: 0.875rem 1rem;
}

.lh-student-account__status {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-top: 3px solid var(--color-accent-secondary);
	border-radius: var(--radius-block);
	margin-bottom: var(--spacing-lg);
	padding: var(--spacing-lg);
}

.lh-student-account__status-label {
	font-size: var(--font-size-h3);
	margin: 0 0 var(--spacing-sm);
}

.lh-student-account__guidance {
	color: var(--color-text-muted);
	line-height: 1.7;
	margin: 0;
}

.lh-student-account__fallback-lead,
.lh-student-account__fallback-links {
	color: var(--color-text-muted);
	line-height: 1.6;
}

.lh-student-account__fallback-lead {
	margin: 0 0 var(--spacing-md);
	text-align: center;
}

.lh-student-account__fallback-links {
	margin-top: var(--spacing-md);
}

.lh-student-account__fallback-links a {
	color: var(--color-accent);
}

.lh-student-account__notice--error {
	background: #fdecea;
	border-left-color: #b42318;
}

.lh-student-account__links ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-sm) var(--spacing-lg);
	list-style: none;
	margin: 0;
	padding: 0;
}

.lh-student-account__links a {
	color: var(--color-accent);
	font-weight: 500;
	text-decoration: none;
}

.lh-student-account__links a:hover,
.lh-student-account__links a:focus-visible {
	text-decoration: underline;
}
