/*
 Minimal styles for the custom login form. The card, fields, buttons and the
 Lost Password link are styled by your own theme CSS (.login-form__input, .btn,
 .login-form__forgot), so this file only adds what that CSS does not cover:
 the first and last name row on sign up, and the notice messages.

 The white card and its rounded corners come from the Elementor container you
 place the [esg_login_form] shortcode in, so nothing here adds a background.
*/

#esg-auth {
	margin: 0 auto;
	box-sizing: border-box;
}

#esg-auth .login-form__input {
	box-sizing: border-box;
}

.esg-login-form,
.esg-register-form {
	margin: 0;
}

/* First and last name side by side on the sign up view */
.login-form__row {
	display: flex;
	gap: 15px;
	margin-bottom: 20px;
}

.login-form__row .login-form__input {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	box-sizing: border-box;
}

@media (max-width: 480px) {
	.login-form__row {
		flex-direction: column;
		gap: 20px;
	}
}

/* Notices for login and sign up errors */
.esg-auth-msg {
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 15px;
}

.esg-auth-error {
	background: #fff2f2;
	color: #8a1f1f;
	border-left: 4px solid #c0392b;
}

.esg-auth-success {
	background: #eef7f0;
	color: #1e5631;
	border-left: 4px solid #002448;
}

.esg-auth-info {
	background: #eef3f9;
	color: #1f2933;
	border-left: 4px solid #002448;
}

.esg-auth-loggedin {
	text-align: center;
}

/* Welcome / password-reset announcement above the sign in box. */
.esg-auth-announce {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #eef3f9;
	border: 1px solid #cfdcec;
	border-left: 4px solid #002448;
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 22px;
}
.esg-auth-announce__icon {
	flex: 0 0 auto;
	color: #002448;
	margin-top: 2px;
}
.esg-auth-announce__icon svg {
	width: 24px;
	height: 24px;
	display: block;
}
.esg-auth-announce__body {
	min-width: 0;
}
.esg-auth-announce__title {
	display: inline-block;
	margin: 0 0 8px;
	padding: 2px 8px;
	background: #ffe6a0;
	border-radius: 5px;
	color: #002448;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.4;
}
.esg-auth-announce__text {
	margin: 0;
	color: #1f2933;
	font-size: 16px;
	line-height: 1.55;
}
.esg-auth-announce__link {
	color: #002448;
	font-weight: 700;
	text-decoration: underline;
}
.esg-auth-announce__link:hover,
.esg-auth-announce__link:focus {
	color: #003a6e;
}

/* Lost password view: hint, math question, and honeypot */
.login-form__hint {
	margin: 0 0 18px;
	color: #5b6b7a;
	font-size: 14px;
	line-height: 1.55;
}
.login-form__captcha-label {
	display: block;
	margin-bottom: 8px;
	color: #002448;
	font-size: 15px;
	font-weight: 700;
}
.login-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Membership dropdowns on the sign up view: match the text inputs, add a caret */
#esg-auth .login-form__select {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235b6b7a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 38px;
	cursor: pointer;
}
#esg-auth .esg-register-form .login-form__group {
	margin-bottom: 15px;
}

/* Two-column rows: let grouped fields (selects/inputs) sit side by side */
#esg-auth .login-form__row > .login-form__group {
	flex: 1 1 0;
	min-width: 0;
	margin-bottom: 0;
}
#esg-auth .login-form__row > .login-form__group .login-form__input {
	width: 100%;
}
@media (max-width: 480px) {
	#esg-auth .login-form__row {
		flex-direction: column;
		gap: 15px;
	}
}

/* Membership heading */
#esg-auth .login-form__title {
	margin: 0 0 18px;
	font-size: 22px;
	font-weight: 800;
	color: #002448;
	text-align: center;
}

/* Checkbox group: "What got you interested" */
#esg-auth .login-form__checkgroup {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid #e1e6ec;
	border-radius: 12px;
	background: #f7f9fb;
}
#esg-auth .login-form__legend {
	font-weight: 700;
	font-size: 16px;
	color: #002448;
}
/* Helper text: a tooltip under the field, shown only while it is hovered or
   focused. It is positioned absolutely so revealing it never reflows the form —
   the fields below stay exactly where they are. */
#esg-auth .login-form__group {
	position: relative;
}
#esg-auth .login-form__hint {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 5;
	padding: 8px 12px;
	border: 1px solid #e1e6ec;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 20px rgba(0, 36, 72, .12);
	color: #5b6b7a;
	font-size: 13px;
	line-height: 1.45;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
	pointer-events: none;
}
#esg-auth .login-form__group:hover > .login-form__hint,
#esg-auth .login-form__group:focus-within > .login-form__hint {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Inside the checkbox group the hint is a caption for the whole group, not a
   tooltip on one field, so it stays in the flow. */
#esg-auth .login-form__checkgroup .login-form__hint {
	position: static;
	z-index: auto;
	margin: -2px 0 4px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
}

/* Anchor-style buttons (e.g. Back to login) keep white text on hover. */
#esg-auth a.btn--login,
#esg-auth a.btn--login:hover,
#esg-auth a.btn--login:focus,
#esg-auth a.btn--login:active {
	color: #fff !important;
}
#esg-auth .login-form__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 16px;
	color: #1f2933;
	cursor: pointer;
}
#esg-auth .login-form__check input {
	margin-top: 3px;
	width: 16px;
	height: 16px;
	flex: none;
}

/* Password group: same boxed look as the interest group */
#esg-auth .login-form__passgroup {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid #e1e6ec;
	border-radius: 12px;
	background: #f7f9fb;
	margin-bottom: 15px;
}
#esg-auth .login-form__passgroup .login-form__group {
	margin-bottom: 0;
}

/* ---- Post-registration Thank You panel ---- */
.esg-auth-thankyou {
	text-align: center;
	max-width: 620px;
	margin: 0 auto;
	padding: 10px 16px 24px;
}
.esg-thankyou-img {
	display: block;
	max-width: 260px;
	height: auto;
	margin: 0 auto 24px;
}
.esg-thankyou-title {
	color: #002448;
	font-weight: 800;
	font-size: 34px;
	line-height: 1.2;
	margin: 0 0 18px;
}
.esg-thankyou-text {
	color: #1f2933;
	font-size: 16px;
	line-height: 1.7;
	margin: 0 0 28px;
}
.esg-thankyou-text p {
	margin: 0 0 12px;
}
.esg-thankyou-text p:last-child {
	margin-bottom: 0;
}
.esg-thankyou-actions {
	display: flex;
	justify-content: center;
}
.esg-thankyou-btn {
	display: inline-block;
	background: #002448;
	color: #fff !important;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	padding: 13px 48px;
	border-radius: 999px;
	transition: background 0.2s ease;
}
.esg-thankyou-btn:hover,
.esg-thankyou-btn:focus {
	background: #003a6e;
	color: #fff !important;
}
@media (max-width: 600px) {
	.esg-thankyou-title { font-size: 28px; }
	.esg-thankyou-btn { width: 100%; padding: 14px 0; }
}

/* ---- Register form validation states ---- */
.esg-register-form .login-form__input.zap-invalid {
	border-color: #d63638 !important;
	box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.25) !important;
}
.esg-register-form .login-form__checkgroup.zap-invalid {
	border-radius: 8px;
	box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.4);
	padding: 10px 12px;
}
.esg-register-form .login-form__checkgroup.zap-invalid .login-form__legend {
	color: #d63638;
}
.esg-register-form .login-form__error {
	color: #d63638;
	font-size: 13px;
	line-height: 1.4;
	margin: 6px 2px 2px;
}

/* ---------- Professional profile photo ---------- */
#esg-auth .login-form__photo {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 18px;
	border: 1px solid #e1e6ec;
	border-radius: 12px;
	background: #f7f9fb;
}
/* This hint explains the rules, so it stays visible rather than on hover. */
#esg-auth .login-form__photo .login-form__hint--static {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	pointer-events: auto;
	margin: -4px 0 2px;
}
#esg-auth .login-form__file {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}
#esg-auth .login-form__file input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
#esg-auth .login-form__file-btn {
	flex: 0 0 auto;
	padding: 10px 22px;
	border: 2px solid #002448;
	border-radius: 999px;
	background: #fff;
	color: #002448;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}
#esg-auth .login-form__file:hover .login-form__file-btn,
#esg-auth .login-form__file input[type="file"]:focus + .login-form__file-btn {
	background: #002448;
	color: #fff;
}
#esg-auth .login-form__file-name {
	min-width: 0;
	color: #5b6b7a;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
#esg-auth .login-form__file-preview {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #fff;
	box-shadow: 0 4px 14px rgba(0, 36, 72, .15);
}
