/**
 * Shirley May - Login and Register screens.
 *
 * @package ShirleyMay
 */

.woocommerce-account:not(.logged-in) .site-main,
.page-template-default .sm-auth-shell {
	padding-top: 0;
	padding-bottom: 0;
}

.woocommerce-account:not(.logged-in) .container.site-main {
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}

.sm-auth-shell {
	display: grid;
	grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1.12fr);
	width: min(1180px, calc(100vw - 48px));
	min-height: 780px;
	margin: 40px auto;
	background: var(--color-white);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.sm-auth-shell--register {
	min-height: 960px;
}

.sm-auth-visual {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 100%;
	background-position: center;
	background-size: cover;
	isolation: isolate;
}

.sm-auth-visual::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12));
	z-index: -1;
}

.sm-auth-benefits {
	width: min(360px, calc(100% - 32px));
	margin: 0 auto 78px;
	padding: 28px 30px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.72);
}

.sm-auth-benefit {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 16px;
	align-items: start;
}

.sm-auth-benefit + .sm-auth-benefit {
	margin-top: 28px;
}

.sm-auth-benefit > span {
	display: inline-flex;
	width: 28px;
	height: 28px;
	align-items: center;
	justify-content: center;
	color: var(--color-black);
}

.sm-auth-benefit strong {
	display: block;
	margin-bottom: 4px;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--color-black);
}

.sm-auth-benefit p {
	margin: 0;
	font-size: 0.75rem;
	line-height: 1.5;
	color: #5d5d5d;
}

.sm-auth-panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	max-width: 620px;
	margin: 0 auto;
	padding: 64px 56px;
}

.sm-auth-shell--register .sm-auth-panel {
	max-width: 660px;
	padding-top: 50px;
	padding-bottom: 50px;
}

.sm-auth-heading {
	margin-bottom: 34px;
}

.sm-auth-heading h1 {
	margin-bottom: 12px;
	font-family: var(--font-headings);
	font-size: clamp(2rem, 3.2vw, 3rem);
	font-weight: 500;
	line-height: 1.12;
	color: var(--color-black);
}

.sm-auth-heading p {
	max-width: 360px;
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.7;
	color: var(--color-text-muted);
}

.sm-auth-form .form-row {
	float: none !important;
	clear: none !important;
	width: 100% !important;
	margin-bottom: 20px;
}

.sm-auth-form label,
.sm-auth-fieldset legend {
	display: block;
	margin-bottom: 8px;
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--color-black);
	text-transform: none;
}

.sm-auth-form input[type="text"],
.sm-auth-form input[type="email"],
.sm-auth-form input[type="tel"],
.sm-auth-form input[type="password"],
.sm-auth-form select {
	height: 52px;
	padding: 0 18px;
	background: var(--color-white);
	border: 1px solid #dedede;
	font-size: 0.86rem;
	color: var(--color-black);
}

.sm-auth-form input::placeholder {
	color: #9a9a9a;
}

.sm-auth-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: start;
	margin-bottom: 20px;
}

.sm-auth-form__grid > .form-row {
	min-width: 0;
	margin-bottom: 20px;
}

.sm-auth-form__grid > .form-row:nth-last-child(-n+2) {
	margin-bottom: 0;
}

.sm-auth-form__grid label {
	min-height: 1.3em;
	white-space: nowrap;
}

.sm-auth-fieldset {
	margin: 8px 0 4px;
	padding: 0;
	border: 0;
}

.sm-auth-fieldset legend {
	margin: 0 0 18px;
	font-size: 1.18rem;
	font-weight: 600;
}

.sm-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: -2px 0 24px;
}

.sm-auth-check {
	display: inline-flex !important;
	align-items: center;
	gap: 9px;
	margin: 0 0 16px;
	font-size: 0.8rem !important;
	font-weight: 400 !important;
	color: var(--color-text-muted) !important;
	cursor: pointer;
}

.sm-auth-check--muted {
	margin-top: -4px;
}

.sm-auth-check input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--color-black);
}

.sm-auth-link,
.sm-auth-switch a {
	font-size: 0.8rem;
	font-weight: 600;
	color: #9b7a42;
}

.sm-auth-submit {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 58px;
	margin-top: 6px;
	background: var(--color-black) !important;
	border: 1px solid var(--color-black) !important;
	color: var(--color-white) !important;
	font-size: 0.82rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	border-radius: 0 !important;
	transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.sm-auth-submit:hover,
.sm-auth-submit:focus {
	background: var(--color-white) !important;
	color: var(--color-black) !important;
	border-color: var(--color-black) !important;
}

.sm-auth-switch {
	margin-top: 28px;
	text-align: center;
	font-size: 0.86rem;
	color: var(--color-text-muted);
}

.sm-auth-switch a {
	margin-left: 6px;
	text-transform: none;
}

.sm-auth-form .woocommerce-privacy-policy-text {
	margin: 0;
}

.sm-auth-form .woocommerce-privacy-policy-text p {
	margin-bottom: 16px;
	font-size: 0.78rem;
	line-height: 1.6;
}

.sm-auth-divider {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 28px 0 20px;
}

.sm-auth-divider::before,
.sm-auth-divider::after {
	content: '';
	flex: 1;
	border-bottom: 1px solid #e0e0e0;
}

.sm-auth-divider span {
	padding: 0 16px;
	color: #888;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.sm-auth-social {
	display: flex;
	justify-content: center;
	margin-bottom: 12px;
}

.sm-auth-social .nsl-container {
	width: 100%;
}

.sm-auth-social .nsl-button {
	width: 100%;
	justify-content: center;
}

@media (max-width: 980px) {
	.sm-auth-shell {
		grid-template-columns: 1fr;
		width: min(680px, calc(100vw - 32px));
		min-height: auto;
		margin-top: 24px;
		margin-bottom: 24px;
	}

	.sm-auth-visual {
		min-height: 420px;
	}

	.sm-auth-benefits {
		margin-bottom: 28px;
	}

	.sm-auth-panel,
	.sm-auth-shell--register .sm-auth-panel {
		max-width: none;
		padding: 42px 28px;
	}
}

@media (max-width: 600px) {
	.sm-auth-shell {
		width: 100%;
		margin: 0;
		border-left: 0;
		border-right: 0;
	}

	.sm-auth-visual {
		min-height: 320px;
	}

	.sm-auth-benefits {
		width: calc(100% - 28px);
		padding: 22px;
	}

	.sm-auth-panel,
	.sm-auth-shell--register .sm-auth-panel {
		padding: 34px 20px 42px;
	}

	.sm-auth-form__grid {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.sm-auth-form__grid label {
		white-space: normal;
	}

	.sm-auth-row {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
	}
}
