/* Job50 authentication — responsive layer only.
 * Desktop remains fully controlled by the existing public theme.
 */

@media (max-width: 781px), (max-width: 1024px) and (max-height: 500px) {
	body.job50-auth-page--login,
	body.job50-auth-page--register,
	body.job50-auth-page--welcome {
		--job50-auth-gutter: clamp(16px, 4.5vw, 24px);
		--job50-auth-card-width: 480px;
		--job50-auth-header-height: 94px;
		min-height: 100vh;
		min-height: 100svh;
		background: linear-gradient(180deg, #f6fbff 0%, #e9f5fb 42%, #d9edf6 100%) fixed;
		color: var(--wp--preset--color--contrast, #333);
		isolation: isolate;
	}

	body.job50-auth-page--login::before,
	body.job50-auth-page--login::after,
	body.job50-auth-page--register::before,
	body.job50-auth-page--register::after,
	body.job50-auth-page--welcome::before,
	body.job50-auth-page--welcome::after {
		content: "";
		position: fixed;
		inset: -8vh -8vw;
		pointer-events: none;
	}

	body.job50-auth-page--login::before,
	body.job50-auth-page--register::before,
	body.job50-auth-page--welcome::before {
		z-index: -2;
		background:
			linear-gradient(116deg, transparent 0%, rgba(255,255,255,.62) 16%, rgba(136,207,231,.34) 30%, rgba(255,255,255,.30) 43%, transparent 61%),
			linear-gradient(34deg, transparent 4%, rgba(82,171,207,.22) 27%, rgba(255,255,255,.28) 41%, transparent 66%),
			linear-gradient(156deg, transparent 18%, rgba(111,190,220,.18) 39%, rgba(255,255,255,.18) 52%, transparent 72%),
			radial-gradient(ellipse 66% 34% at 15% 13%, rgba(130,204,226,.28) 0%, transparent 70%),
			radial-gradient(ellipse 82% 42% at 88% 78%, rgba(86,167,200,.24) 0%, transparent 74%);
		background-size: 190% 160%, 175% 150%, 155% 145%, 135% 120%, 150% 125%;
		background-position: 36% 24%, 66% 62%, 58% 32%, 9% 7%, 88% 86%;
	}

	body.job50-auth-page--login::after,
	body.job50-auth-page--register::after,
	body.job50-auth-page--welcome::after {
		z-index: -1;
		background:
			radial-gradient(ellipse 44% 30% at 78% 78%, rgba(237,28,36,.28) 0%, rgba(241,92,42,.17) 18%, rgba(255,177,94,.11) 34%, rgba(255,255,255,.10) 48%, transparent 72%),
			radial-gradient(ellipse 34% 24% at 63% 88%, rgba(237,28,36,.13) 0%, rgba(255,255,255,.08) 42%, transparent 74%);
		opacity: .38;
		transform: translate3d(0, 10px, 0) scale(.985);
		transform-origin: 78% 78%;
		animation: job50AuthMobileHalo 2100ms cubic-bezier(.22,.7,.18,1) 120ms 1 both;
	}

	body.job50-auth-page--login .wp-site-blocks,
	body.job50-auth-page--register .wp-site-blocks,
	body.job50-auth-page--welcome .wp-site-blocks {
		min-height: 100vh;
		min-height: 100svh;
		display: flex;
		flex-direction: column;
		background: transparent !important;
		overflow: visible !important;
	}

	body.job50-auth-page--login main,
	body.job50-auth-page--register main,
	body.job50-auth-page--welcome main {
		flex: 1 0 auto;
		width: 100%;
		min-height: calc(100svh - var(--job50-auth-header-height));
		background: transparent !important;
		overflow: clip;
	}

	body.job50-auth-page--login .entry-content,
	body.job50-auth-page--register .entry-content,
	body.job50-auth-page--welcome .entry-content {
		width: 100%;
		background: transparent !important;
		overflow: visible;
	}

	/* Remove the historical marketing triangle and woman on responsive only. */
	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1::before {
		content: none !important;
		display: none !important;
		background: none !important;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 {
		box-sizing: border-box;
		width: 100%;
		max-width: none !important;
		min-height: calc(100svh - var(--job50-auth-header-height));
		margin: 0 !important;
		padding: 52px var(--job50-auth-gutter) 56px !important;
		display: flex;
		flex-direction: column;
		justify-content: center;
		background: transparent !important;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .wp-block-spacer:first-child {
		display: none !important;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .wp-block-spacer:not(:first-child) {
		height: 18px !important;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .wp-block-heading {
		width: 100%;
		max-width: var(--job50-auth-card-width);
		margin: 0 auto 6px !important;
		color: #263947 !important;
		font-size: clamp(28px, 7.5vw, 36px) !important;
		line-height: 1.05 !important;
		text-align: center !important;
		text-transform: uppercase;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > p {
		width: 100%;
		max-width: var(--job50-auth-card-width);
		margin: 0 auto 22px !important;
		color: #40515f !important;
		font-size: 16px;
		line-height: 1.45;
		text-align: center !important;
	}

	body.job50-auth-page--login #wpmem_login,
	body.job50-auth-page--login #wpmem_login_form {
		box-sizing: border-box;
		width: 100%;
		max-width: var(--job50-auth-card-width);
		margin-inline: auto;
	}

	body.job50-auth-page--login #wpmem_login_form fieldset {
		box-sizing: border-box;
		width: 100%;
		max-width: none;
		margin: 0 auto !important;
		padding: clamp(22px, 6vw, 30px) !important;
		border: 1px solid rgba(210,220,226,.95);
		border-radius: 24px;
		background: rgba(255,255,255,.94);
		box-shadow: 0 16px 38px rgba(33,65,82,.10);
	}

	body.job50-auth-page--login #wpmem_login_form fieldset > div {
		min-width: 0;
		margin-bottom: 14px;
	}

	body.job50-auth-page--login #wpmem_login_form input[type="text"],
	body.job50-auth-page--login #wpmem_login_form input[type="email"],
	body.job50-auth-page--login #wpmem_login_form input[type="password"] {
		box-sizing: border-box;
		width: 100%;
		min-width: 0;
		min-height: 56px;
		margin: 0;
	}

	body.job50-auth-page--login #wpmem_login_form .wpmem-pw-field {
		position: relative;
	}

	body.job50-auth-page--login #wpmem_login_form .wpmem-pw-field input {
		padding-right: 50px;
	}

	body.job50-auth-page--login #wpmem_login_form .wpmem-pw-toggle {
		top: 3px;
		right: 10px;
		height: 50px;
	}

	/* Keep the existing, already validated WP-Members action row intact.
	 * The public theme owns checkbox/label/button alignment on every viewport. */
	body.job50-auth-page--login #wpmem_login_form .button_div {
		min-width: 0;
	}

	body.job50-auth-page--login #wpmem_login .link-text {
		margin: 0;
		font-size: 14px;
		line-height: 1.45;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 {
		box-sizing: border-box;
		width: 100%;
		max-width: var(--job50-auth-card-width);
		margin: 0 auto !important;
		padding: 22px 20px !important;
		border: 1px solid rgba(210,220,226,.95);
		border-radius: 24px;
		background: rgba(255,255,255,.90) !important;
		box-shadow: 0 16px 38px rgba(33,65,82,.09);
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 > .wp-block-columns {
		display: grid !important;
		grid-template-columns: 58px minmax(0, 1fr);
		align-items: start !important;
		gap: 14px !important;
		margin: 0;
		padding: 0 !important;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-column {
		min-width: 0;
		margin: 0 !important;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-image {
		margin: 0;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-image img {
		width: 58px !important;
		height: auto;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-heading {
		margin: 0 0 6px;
		font-size: 19px !important;
		line-height: 1.12;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 p {
		margin: 0 0 14px;
		font-size: 15px;
		line-height: 1.4;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-buttons {
		justify-content: flex-start !important;
		margin: 0;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-button,
	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-button__link {
		width: fit-content !important;
		max-width: 100%;
	}

}


/* Member registration — keep the validated desktop untouched and only replace
 * the historical marketing artwork on responsive viewports. */
@media (max-width: 781px), (max-width: 1024px) and (max-height: 500px) {
	body.job50-auth-page--register .entry-content > .bg-simple-fun.figure-2::before {
		content: none !important;
		display: none !important;
		background: none !important;
	}

	body.job50-auth-page--register .entry-content > .bg-simple-fun.figure-2 {
		box-sizing: border-box;
		width: 100%;
		max-width: none !important;
		min-height: calc(100svh - var(--job50-auth-header-height));
		margin: 0 !important;
		padding: 52px var(--job50-auth-gutter) 56px !important;
		display: flex;
		flex-direction: column;
		justify-content: center;
		background: transparent !important;
	}

	body.job50-auth-page--register .entry-content > .bg-simple-fun.figure-2 > .wp-block-spacer:first-child {
		display: none !important;
	}

	body.job50-auth-page--register .entry-content > .bg-simple-fun.figure-2 > .wp-block-group,
	body.job50-auth-page--register #wpmem_reg,
	body.job50-auth-page--register #wpmem_register_form,
	body.job50-auth-page--register .job50-register-page-lead {
		box-sizing: border-box;
		width: 100%;
		max-width: var(--job50-auth-card-width);
		margin-inline: auto;
	}

	body.job50-auth-page--register .entry-content > .bg-simple-fun.figure-2 > .wp-block-group > .wp-block-heading {
		margin: 0 auto 10px !important;
		color: #263947 !important;
		font-size: clamp(26px, 7vw, 34px) !important;
		line-height: 1.08 !important;
		text-align: center !important;
		text-transform: uppercase;
	}

	body.job50-auth-page--register .job50-register-page-lead {
		margin-top: 0;
		margin-bottom: 20px;
		color: #40515f;
		font-size: 17px;
		line-height: 1.4;
	}

	body.job50-auth-page--register #wpmem_register_form fieldset {
		box-sizing: border-box;
		width: 100%;
		max-width: none;
		margin: 0 auto 22px !important;
		padding: clamp(22px, 6vw, 33px) !important;
		border: 1px solid rgba(210,220,226,.95);
		border-radius: 24px;
		background: rgba(255,255,255,.94);
		box-shadow: 0 16px 38px rgba(33,65,82,.10);
	}

	body.job50-auth-page--register #wpmem_register_form fieldset > div,
	body.job50-auth-page--register #wpmem_register_form .job50-register-actions {
		min-width: 0;
	}

	body.job50-auth-page--register #wpmem_register_form input[type="text"],
	body.job50-auth-page--register #wpmem_register_form input[type="email"],
	body.job50-auth-page--register #wpmem_register_form input[type="password"],
	body.job50-auth-page--register #wpmem_register_form select,
	body.job50-auth-page--register #wpmem_register_form textarea,
	body.job50-auth-page--register #wpmem_register_form .job50-ts-wrapper {
		box-sizing: border-box;
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}

	body.job50-auth-page--register #wpmem_register_form .job50-register-actions {
		flex-wrap: wrap;
	}

	body.job50-auth-page--register .entry-content > .bg-simple-fun.figure-2 > .wp-block-group:last-child > p {
		box-sizing: border-box;
		max-width: var(--job50-auth-card-width);
		margin: 0 auto !important;
		padding-inline: 0 !important;
		color: #40515f;
		font-size: 14px !important;
		line-height: 1.45;
	}
}


/* Registration success / member welcome — responsive only.
 * Keep the desktop marketing composition untouched. On mobile the historical
 * artwork is removed, the redundant outer panel is neutralized, and the
 * WP-Members form receives the full useful card width. */
@media (max-width: 781px), (max-width: 1024px) and (max-height: 500px) {
	body.job50-auth-page--welcome .entry-content > .bg-simple-fun.figure-2::before {
		content: none !important;
		display: none !important;
		background: none !important;
	}

	body.job50-auth-page--welcome .entry-content > .bg-simple-fun.figure-2 {
		box-sizing: border-box;
		width: 100%;
		max-width: none !important;
		min-height: calc(100svh - var(--job50-auth-header-height));
		margin: 0 !important;
		padding: 52px var(--job50-auth-gutter) 56px !important;
		display: flex;
		flex-direction: column;
		justify-content: center;
		background: transparent !important;
	}

	body.job50-auth-page--welcome .entry-content > .bg-simple-fun.figure-2 > .wp-block-spacer:first-child {
		display: none !important;
	}

	/* Remove the parent card: the login fieldset remains the only visual card. */
	body.job50-auth-page--welcome .entry-content > .bg-simple-fun.figure-2 > .is-style-section-1 {
		box-sizing: border-box;
		width: 100%;
		max-width: 560px;
		margin: 0 auto !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	body.job50-auth-page--welcome .entry-content > .bg-simple-fun.figure-2 > .is-style-section-1 > .wp-block-heading {
		max-width: 18ch;
		margin: 0 auto 14px !important;
		color: #263947 !important;
		font-size: clamp(25px, 6.7vw, 34px) !important;
		line-height: 1.08 !important;
		text-align: center !important;
		text-transform: uppercase;
		text-wrap: balance;
	}

	body.job50-auth-page--welcome .entry-content > .bg-simple-fun.figure-2 > .is-style-section-1 > p {
		max-width: 28ch;
		margin: 0 auto 22px !important;
		color: #40515f !important;
		font-size: clamp(18px, 4.9vw, 23px) !important;
		line-height: 1.35 !important;
		text-align: center !important;
		text-wrap: balance;
	}

	body.job50-auth-page--welcome #wpmem_login,
	body.job50-auth-page--welcome #wpmem_login_form {
		box-sizing: border-box;
		width: 100%;
		max-width: 560px;
		margin-inline: auto;
	}

	body.job50-auth-page--welcome #wpmem_login_form fieldset {
		box-sizing: border-box;
		width: 100%;
		max-width: none;
		margin: 0 auto !important;
		padding: clamp(22px, 5.5vw, 30px) !important;
		border: 1px solid rgba(210,220,226,.95);
		border-radius: 24px;
		background: rgba(255,255,255,.94);
		box-shadow: 0 16px 38px rgba(33,65,82,.10);
	}

	body.job50-auth-page--welcome #wpmem_login_form fieldset > div {
		min-width: 0;
		margin-bottom: 14px;
	}

	body.job50-auth-page--welcome #wpmem_login_form input[type="text"],
	body.job50-auth-page--welcome #wpmem_login_form input[type="email"],
	body.job50-auth-page--welcome #wpmem_login_form input[type="password"] {
		box-sizing: border-box;
		width: 100%;
		min-width: 0;
		min-height: 56px;
		margin: 0;
	}

	body.job50-auth-page--welcome #wpmem_login_form .wpmem-pw-field {
		position: relative;
	}

	body.job50-auth-page--welcome #wpmem_login_form .wpmem-pw-field input {
		padding-right: 50px;
	}

	body.job50-auth-page--welcome #wpmem_login_form .wpmem-pw-toggle {
		top: 3px;
		right: 10px;
		height: 50px;
	}

	/* Preserve the theme's validated checkbox / label / button row. */
	body.job50-auth-page--welcome #wpmem_login_form .button_div {
		min-width: 0;
	}

	body.job50-auth-page--welcome #wpmem_login .link-text {
		margin: 0;
		font-size: 14px;
		line-height: 1.45;
	}
}

@media (max-width: 420px) {
	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 > .wp-block-columns {
		grid-template-columns: 48px minmax(0, 1fr);
		gap: 12px !important;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-image img {
		width: 48px !important;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-button,
	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1 > .is-style-section-1 .wp-block-button__link {
		width: 100% !important;
		text-align: center !important;
	}
}

@media (max-width: 1024px) and (max-height: 500px) {
	body.job50-auth-page--login,
	body.job50-auth-page--register,
	body.job50-auth-page--welcome {
		--job50-auth-header-height: 70px;
	}

	body.job50-auth-page--login .entry-content > .bg-simple-fun.figure-1,
	body.job50-auth-page--register .entry-content > .bg-simple-fun.figure-2,
	body.job50-auth-page--welcome .entry-content > .bg-simple-fun.figure-2 {
		justify-content: flex-start;
		padding-top: 34px !important;
	}
}

@media (prefers-reduced-motion: reduce) and (max-width: 781px),
       (prefers-reduced-motion: reduce) and (max-width: 1024px) and (max-height: 500px) {
	body.job50-auth-page--login::after,
	body.job50-auth-page--register::after,
	body.job50-auth-page--welcome::after {
		animation: none;
		transform: none;
	}
}

@supports not (overflow: clip) {
	@media (max-width: 781px), (max-width: 1024px) and (max-height: 500px) {
		body.job50-auth-page--login main,
		body.job50-auth-page--register main,
		body.job50-auth-page--welcome main {
			overflow: hidden;
		}
	}
}

@keyframes job50AuthMobileHalo {
	0% {
		opacity: 0;
		transform: translate3d(28px, 34px, 0) scale(.72);
	}
	38% {
		opacity: .70;
		transform: translate3d(0, 0, 0) scale(1.04);
	}
	100% {
		opacity: .38;
		transform: translate3d(0, 10px, 0) scale(.985);
	}
}
