/* OCHBS — Portal auth modal
 *
 * Enqueued by the ochbs-portal-auth mu-plugin. Matches the directory popups:
 * white editorial panel on a dimmed navy ground.
 *
 * Source of truth: Sponsors/_Templates/ochbs-auth.css
 *
 * Kit 16738: ink #0F172A · navy #020617 · body #334155 · muted #64748B / #94A3B8 ·
 * hairline #E2E8F0 · plate #F8FAFC · lime #A5BE4C.
 */

/* The header sits at z-index 999 and the jet-tricks sticky wrapper at 1100, so
   the modal has to clear both — same reasoning as the directory popups at 1200. */
.ochbs-auth {
	position: fixed;
	inset: 0;
	z-index: 1300;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ochbs-auth[hidden] {
	display: none;
}

.ochbs-auth__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba( 2, 6, 23, .72 );
	-webkit-backdrop-filter: blur( 6px );
	backdrop-filter: blur( 6px );
	animation: ochbsAuthFade .2s ease both;
}

.ochbs-auth__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	max-height: calc( 100vh - 48px );
	overflow-y: auto;
	padding: 40px;
	border: 1px solid #E2E8F0;
	border-radius: 20px;
	background-color: #fff;
	box-shadow: 0 32px 80px -24px rgba( 2, 6, 23, .55 );
	animation: ochbsAuthRise .28s cubic-bezier( .22, .61, .36, 1 ) both;
}

/* The register panel embeds the full portal application, which is a much taller
   form than the sign-in fields. */
.ochbs-auth__dialog--wide {
	max-width: 560px;
}

@keyframes ochbsAuthFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes ochbsAuthRise {
	from { opacity: 0; transform: translateY( 12px ) scale( .985 ); }
	to   { opacity: 1; transform: none; }
}

@media ( prefers-reduced-motion: reduce ) {
	.ochbs-auth__overlay,
	.ochbs-auth__dialog { animation: none; }
}

.ochbs-auth__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background-color: transparent;
	color: #64748B;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.ochbs-auth__close:hover,
.ochbs-auth__close:focus-visible {
	background-color: #F1F5F9;
	color: #0F172A;
}

.ochbs-auth__close svg { width: 15px; height: 15px; fill: currentColor; }

.ochbs-auth__brand {
	margin-bottom: 18px;
	color: #94A3B8;
	font-family: "Inter", sans-serif;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}

/* ----------------------------------------------------------------- tabs -- */

.ochbs-auth__tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 24px;
	padding: 4px;
	border-radius: 999px;
	background-color: #F1F5F9;
}

.ochbs-auth__tab {
	flex: 1 1 0;
	padding: 9px 12px;
	border: 0;
	border-radius: 999px;
	background-color: transparent;
	color: #64748B;
	font-family: "Inter", sans-serif;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.ochbs-auth__tab:hover { color: #0F172A; }

.ochbs-auth__tab[aria-selected="true"] {
	background-color: #fff;
	color: #0F172A;
	box-shadow: 0 1px 2px rgba( 2, 6, 23, .12 );
}

/* ---------------------------------------------------------------- panel -- */

.ochbs-auth__panel[hidden] { display: none; }

.ochbs-auth h2 {
	margin: 0 0 8px;
	color: #0F172A;
	font-family: "Inter", sans-serif;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.02em;
}

.ochbs-auth__sub {
	margin: 0 0 24px;
	color: #64748B;
	font-family: "Poppins", sans-serif;
	font-size: 14px;
	line-height: 1.6;
}

.ochbs-auth__field { margin-bottom: 16px; }

.ochbs-auth__field label {
	display: block;
	margin-bottom: 7px;
	color: #334155;
	font-family: "Inter", sans-serif;
	font-size: 13px;
	font-weight: 600;
}

.ochbs-auth__field input[type="text"],
.ochbs-auth__field input[type="email"],
.ochbs-auth__field input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	background-color: #fff;
	color: #0F172A;
	font-family: "Poppins", sans-serif;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.ochbs-auth__field input:focus {
	outline: none;
	border-color: #A5BE4C;
	box-shadow: 0 0 0 3px rgba( 165, 190, 76, .28 );
}

.ochbs-auth__pw { position: relative; }

.ochbs-auth__pw input { padding-right: 62px; }

/* Anchored to the bottom of the field rather than centred on it: the block
   includes the label, so top:50% floated the control above the input. */
.ochbs-auth__reveal {
	position: absolute;
	top: auto;
	bottom: 11px;
	right: 8px;
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background-color: transparent;
	color: #64748B;
	font-family: "Inter", sans-serif;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.ochbs-auth__reveal:hover { color: #0F172A; background-color: #F1F5F9; }

.ochbs-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 4px 0 22px;
}

.ochbs-auth__remember {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #64748B;
	font-family: "Poppins", sans-serif;
	font-size: 13px;
	cursor: pointer;
}

.ochbs-auth__remember input { accent-color: #0F172A; width: 15px; height: 15px; }

.ochbs-auth__link {
	border: 0;
	padding: 0;
	background: none;
	color: #0F172A;
	font-family: "Inter", sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: #A5BE4C;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ochbs-auth__link:hover { text-decoration-color: #0F172A; }

.ochbs-auth__submit {
	width: 100%;
	padding: 14px 20px;
	border: 0;
	border-radius: 10px;
	background-color: #0F172A;
	color: #fff;
	font-family: "Inter", sans-serif;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s ease, transform .15s ease;
}

.ochbs-auth__submit:hover:not(:disabled) { background-color: #1E293B; transform: translateY( -1px ); }
.ochbs-auth__submit:disabled { opacity: .6; cursor: default; }

.ochbs-auth__foot {
	margin: 20px 0 0;
	color: #64748B;
	font-family: "Poppins", sans-serif;
	font-size: 13px;
	text-align: center;
}

/* --------------------------------------------------------------- notice -- */

.ochbs-auth__msg {
	margin: 16px 0 0;
	padding: 12px 14px;
	border-radius: 10px;
	font-family: "Poppins", sans-serif;
	font-size: 13.5px;
	line-height: 1.5;
}

.ochbs-auth__msg[hidden] { display: none; }

.ochbs-auth__msg--error {
	border: 1px solid #FECDCA;
	background-color: #FEF3F2;
	color: #B42318;
}

.ochbs-auth__msg--ok {
	border: 1px solid #D7E3A8;
	background-color: #F6F9EC;
	color: #3F5B12;
}

/* -------------------------------------------------- embedded portal form -- */

/* The register panel renders [ochbs_portal_registration] verbatim so the
   reCAPTCHA, pending-approval role and audit trail all still apply. Only its
   presentation is brought in line with the modal. */
.ochbs-auth__panel .ochbs-portal-registration h1 {
	margin: 0 0 8px;
	color: #0F172A;
	font-family: "Inter", sans-serif;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.02em;
}

.ochbs-auth__panel .ochbs-portal-registration p {
	margin: 0 0 14px;
	color: #64748B;
	font-family: "Poppins", sans-serif;
	font-size: 13.5px;
	line-height: 1.6;
}

.ochbs-auth__panel .ochbs-portal-registration label {
	display: block;
	margin-bottom: 14px;
	color: #334155;
	font-family: "Inter", sans-serif;
	font-size: 13px;
	font-weight: 600;
}

.ochbs-auth__panel .ochbs-portal-registration input[type="text"],
.ochbs-auth__panel .ochbs-portal-registration input[type="email"],
.ochbs-auth__panel .ochbs-portal-registration input[type="password"],
.ochbs-auth__panel .ochbs-portal-registration select,
.ochbs-auth__panel .ochbs-portal-registration textarea {
	width: 100%;
	margin-top: 7px;
	padding: 12px 14px;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	color: #0F172A;
	font-family: "Poppins", sans-serif;
	font-size: 15px;
}

.ochbs-auth__panel .ochbs-portal-registration input:focus,
.ochbs-auth__panel .ochbs-portal-registration select:focus,
.ochbs-auth__panel .ochbs-portal-registration textarea:focus {
	outline: none;
	border-color: #A5BE4C;
	box-shadow: 0 0 0 3px rgba( 165, 190, 76, .28 );
}

.ochbs-auth__panel .ochbs-portal-registration button,
.ochbs-auth__panel .ochbs-portal-registration input[type="submit"] {
	width: 100%;
	margin-top: 6px;
	padding: 14px 20px;
	border: 0;
	border-radius: 10px;
	background-color: #0F172A;
	color: #fff;
	font-family: "Inter", sans-serif;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.ochbs-auth__panel .ochbs-portal-registration button:hover,
.ochbs-auth__panel .ochbs-portal-registration input[type="submit"]:hover {
	background-color: #1E293B;
}

.ochbs-auth__panel .ochbs-portal-notice {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #D7E3A8;
	border-radius: 10px;
	background-color: #F6F9EC;
	color: #3F5B12;
	font-family: "Poppins", sans-serif;
	font-size: 13.5px;
	line-height: 1.5;
}

/* --------------------------------------------------------------- header -- */

/* Quieter than the two solid buttons beside it, so the Exhibit / Sponsor CTA
   keeps its prominence. */
.ochbs-login-trigger .elementor-button {
	background-color: transparent !important;
	border: 1px solid transparent !important;
	color: #FFFFFF !important;
	transition: color .2s ease, border-color .2s ease;
}

.ochbs-login-trigger .elementor-button:hover,
.ochbs-login-trigger .elementor-button:focus-visible {
	color: #A5BE4C !important;
	border-color: rgba( 165, 190, 76, .45 ) !important;
}

/* --------------------------------------------------------------- mobile -- */

@media ( max-width: 560px ) {

	.ochbs-auth { padding: 12px; }

	.ochbs-auth__dialog {
		padding: 28px 22px;
		border-radius: 16px;
		max-height: calc( 100vh - 24px );
	}

	.ochbs-auth h2 { font-size: 21px; }
}
