/* Host Genie LMS — Frontend authentication */

.hglms-auth {
	max-width: 32rem;
	margin: 2rem auto;
	padding: 1.75rem 1.5rem;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 12px;
	box-sizing: border-box;
}

.hglms-auth-card {
	max-width: 32rem;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/* Avoid a left-aligned narrow form inside a wide empty content column */
.entry-content > .hglms-auth,
.woocommerce > .hglms-auth,
.woocommerce-page .hglms-auth,
.hglms-auth-page .hglms-auth {
	margin-left: auto;
	margin-right: auto;
}

.hglms-auth__title {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
}

.hglms-auth__intro {
	margin: 0 0 1.25rem;
	color: #50575e;
	font-size: 1rem;
	line-height: 1.5;
}

.hglms-auth-form .hglms-auth-field {
	margin: 0;
}

.hglms-auth-form .hglms-auth-field + .hglms-auth-field {
	margin-top: 18px;
}

.hglms-auth-form .hglms-auth-field > label {
	display: block;
	font-weight: 600;
	margin: 0 0 8px;
}

.hglms-auth-field__control,
.hglms-password-field {
	display: block;
	width: 100%;
}

.hglms-auth-form .hglms-auth-field__control input[type="text"],
.hglms-auth-form .hglms-auth-field__control input[type="email"],
.hglms-auth-form .hglms-auth-field__control input[type="password"],
.hglms-auth-form .hglms-auth-field > input[type="text"],
.hglms-auth-form .hglms-auth-field > input[type="email"],
.hglms-auth-form .hglms-auth-field > input[type="password"],
.hglms-password-field__input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.75rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	min-height: 46px;
	font: inherit;
	line-height: 1.4;
	background: #fff;
	color: #0f172a;
}

/* In-field password visibility toggle */
.hglms-password-field {
	position: relative;
	display: block;
}

.hglms-password-field__input,
.hglms-password-field > input[type="password"],
.hglms-password-field > input[type="text"] {
	width: 100%;
	padding-right: 48px;
	box-sizing: border-box;
}

button.hglms-password-field__toggle,
.hglms-password-field__toggle {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	box-shadow: none;
	color: #334155;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	line-height: 1;
	font: inherit;
	appearance: none;
	-webkit-appearance: none;
}

/* Do not inherit theme / primary / secondary button chrome */
button.hglms-password-field__toggle.hglms-button,
button.hglms-password-field__toggle.button,
button.hglms-password-field__toggle.hglmsc-button,
.woocommerce button.hglms-password-field__toggle {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	width: 36px !important;
	height: 36px !important;
	min-height: 36px !important;
	padding: 0 !important;
	color: #334155 !important;
	text-decoration: none !important;
}

.hglms-password-field__toggle:hover {
	color: #0d6e6e;
	background: rgba(13, 110, 110, 0.08);
}

.hglms-password-field__toggle:focus,
.hglms-password-field__toggle:focus-visible {
	outline: 2px solid #0d6e6e;
	outline-offset: 2px;
}

.hglms-password-field__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.hglms-password-field__icon--hide {
	display: none;
}

.hglms-password-field__toggle.is-visible .hglms-password-field__icon--show {
	display: none;
}

.hglms-password-field__toggle.is-visible .hglms-password-field__icon--hide {
	display: inline-flex;
}

.hglms-password-field__svg {
	display: block;
	width: 20px;
	height: 20px;
}

/* Suppress WooCommerce core password visibility control when ours is present */
.hglms-password-field .show-password-input,
.hglms-password-field + .show-password-input,
.woocommerce-form-login .hglms-password-field .show-password-input,
.woocommerce-form-register .hglms-password-field .show-password-input {
	display: none !important;
}

.hglms-auth-form input:focus,
.hglms-auth-form select:focus,
.hglms-auth-form button:focus:not(.hglms-password-field__toggle) {
	outline: 2px solid #0d6e6e;
	outline-offset: 2px;
}

.hglms-auth-field--remember label {
	font-weight: 400;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.hglms-auth-errors {
	background: #fcf0f1;
	border: 1px solid #d63638;
	border-radius: 4px;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
}

.hglms-auth-errors ul {
	margin: 0.35rem 0 0;
	padding-left: 1.25rem;
}

.hglms-auth-notice {
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.hglms-auth-notice--success {
	background: #edfaef;
	border: 1px solid #00a32a;
}

.hglms-auth-actions {
	margin: 1rem 0 0;
}

.hglms-auth-actions .hglms-button,
.hglms-auth-actions .hglmsc-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	box-sizing: border-box;
}

.hglms-auth-links {
	margin-top: 1.25rem;
	word-break: break-word;
	text-align: center;
}

.hglms-auth-secondary {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	text-align: center;
}

.hglms-auth-secondary__title {
	margin: 0 0 0.5rem;
	font-size: 1.2rem;
}

.hglms-auth-secondary__text {
	margin: 0 0 1rem;
	color: #50575e;
	line-height: 1.5;
}

.hglms-empty-state {
	padding: 1.25rem;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	margin: 1rem 0;
}

.hglms-empty-state__heading {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
}

.hglms-empty-state__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0 0;
}

@media (max-width: 480px) {
	.hglms-auth {
		padding: 1.25rem 1.125rem;
		margin: 1rem auto;
		max-width: calc(100% - 2rem);
	}
}

/* Honeypot: visually hidden, still in tab order off, not display:none */
.hglms-auth-hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hglms-auth-captcha {
	margin: 1rem 0;
}
