.store-action--button {
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-family: inherit;
}

.auth-modal[hidden] {
	display: none !important;
}

.auth-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 20px;
	overflow-y: auto;
}

/* SOLID BACKDROP WITHOUT BLUR AS REQUESTED */
.auth-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(8, 14, 20, 0.74);
	cursor: pointer;
}

.auth-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 460px);
	max-height: calc(100vh - 40px);
	padding: 32px 28px 28px;
	overflow-y: auto;
	border: 1px solid #dfdbe2;
	border-radius: 24px;
	background: #ffffff;
	box-shadow: 0 24px 70px rgba(18, 10, 26, 0.22);
	outline: 0;
	animation: authModalEntrance 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authModalEntrance {
	from {
		opacity: 0;
		transform: scale(0.96) translateY(8px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.auth-modal__close {
	position: absolute;
	top: 18px;
	left: 18px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #e3e0e6;
	border-radius: 50%;
	color: #4a444e;
	background: #ffffff;
	cursor: pointer;
	transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.auth-modal__close:hover {
	border-color: var(--moweb-color-brand);
	color: var(--moweb-color-brand);
	background: var(--moweb-color-brand-soft);
}

.auth-modal__header {
	margin-bottom: 20px;
	padding-inline-end: 35px;
}

.auth-modal__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.auth-modal__logo {
	display: block;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid #ebdbe8;
	object-fit: cover;
}

.auth-modal__brand-meta {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.auth-modal__brand-name {
	color: var(--moweb-color-brand-deep);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.auth-modal__tagline {
	color: var(--moweb-color-muted);
	font-size: 0.65rem;
}

.auth-modal__title {
	margin: 0 0 6px;
	color: var(--moweb-color-heading);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.25;
}

.auth-modal__description {
	margin: 0;
	color: var(--moweb-color-muted);
	font-size: 0.8rem;
	line-height: 1.6;
}

/* SEGMENTED TABS */
.auth-modal__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	padding: 5px;
	margin-bottom: 22px;
	border: 1px solid #eae6ee;
	border-radius: 999px;
	background: #f6f3f8;
}

.auth-modal__tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 6px 14px;
	border: 0;
	border-radius: 999px;
	color: #6a6370;
	background: transparent;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.18s ease;
}

.auth-modal__tab svg {
	flex-shrink: 0;
}

.auth-modal__tab:hover {
	color: var(--moweb-color-brand-deep);
}

.auth-modal__tab.is-active {
	color: #ffffff;
	background: var(--moweb-color-brand);
	box-shadow: 0 3px 12px rgba(238, 49, 197, 0.28);
}

/* PANELS */
.auth-modal__panel[hidden] {
	display: none !important;
}

.auth-modal__panel {
	animation: authPanelFade 0.2s ease forwards;
}

@keyframes authPanelFade {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.auth-modal form {
	margin: 0;
}

.auth-modal .form-row {
	margin: 0 0 16px;
	padding: 0;
}

.auth-modal label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
	color: var(--moweb-color-heading);
	font-size: 0.76rem;
	font-weight: 700;
}

.auth-modal .required {
	color: var(--moweb-color-brand);
	text-decoration: none;
}

.auth-modal__input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.auth-modal__input-icon {
	position: absolute;
	right: 13px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	color: #9c94a2;
	pointer-events: none;
}

.auth-modal input.input-text {
	width: 100%;
	min-height: 48px;
	padding: 10px 42px 10px 14px;
	border: 1px solid #dcd8df;
	border-radius: 12px;
	background: #faf9fb;
	color: var(--moweb-color-text);
	font-size: 0.86rem;
	transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-modal input.input-text::placeholder {
	color: #aba4b0;
	font-size: 0.8rem;
}

.auth-modal input.input-text:focus {
	border-color: var(--moweb-color-brand);
	background: #ffffff;
	outline: none;
	box-shadow: 0 0 0 3px rgba(238, 49, 197, 0.14);
}

.auth-modal__input-wrap--password input.input-text {
	padding-left: 44px;
}

/* WooCommerce's JS also wraps the <input> itself in its own <span
 * class="password-input">, styled by WooCommerce core as display:flex with
 * no explicit width -- so it shrinks to the input's intrinsic size instead
 * of filling this wrapper. That left our absolutely-positioned custom eye
 * toggle (anchored to the *wrapper's* edge) floating in the leftover empty
 * space instead of sitting against the now-narrower visible input box.
 * Force WooCommerce's span to actually fill the wrapper so the input (and
 * therefore our toggle button beside it) spans the full field width again. */
.auth-modal__input-wrap--password .password-input {
	display: block !important;
	width: 100% !important;
}
.auth-modal__input-wrap--password .password-input input.input-text {
	width: 100%;
}

/* WooCommerce's own JS (assets/js/frontend/password-toggle or similar) auto-wraps
 * any input[type=password].woocommerce-Input in a <span class="password-input">
 * and injects its own unstyled <button class="show-password-input"> toggle --
 * completely independent of this modal's custom-designed toggle below. That
 * native button was rendering as a second, unstyled, disconnected-looking icon
 * next to our own. We keep our custom toggle and hide WooCommerce's native one
 * inside this modal only (the plain /my-account/ page can keep using it). */
.auth-modal .show-password-input {
	display: none !important;
}

.auth-modal__password-toggle {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #8c8592;
	cursor: pointer;
	transition: color 0.15s ease;
}

.auth-modal__password-toggle:hover {
	color: var(--moweb-color-brand-dark);
}

/* OPTIONS ROW */
.auth-modal__form-options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 6px 0 18px;
	font-size: 0.74rem;
}

.auth-modal__form-options label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	color: #554e5b;
	font-weight: 500;
	cursor: pointer;
}

.auth-modal__form-options input[type="checkbox"] {
	accent-color: var(--moweb-color-brand);
	width: 15px;
	height: 15px;
	cursor: pointer;
}

.auth-modal__lost-password {
	color: var(--moweb-color-brand-deep);
	font-weight: 700;
	text-decoration: none;
	transition: color 0.15s ease;
}

.auth-modal__lost-password:hover {
	color: var(--moweb-color-brand);
	text-decoration: underline;
}

/* SUBMIT BUTTON */
.auth-modal__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	padding: 11px 22px;
	border: 0;
	border-radius: 999px !important;
	background: linear-gradient(135deg, #ee31c5 0%, #c80b9f 100%);
	color: #ffffff !important;
	font-family: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(238, 49, 197, 0.28);
	transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.auth-modal__submit:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow: 0 8px 24px rgba(238, 49, 197, 0.38);
}

.auth-modal__submit:active {
	transform: translateY(0);
}

.auth-modal__submit svg {
	transform: scaleX(-1);
}

/* NOTICE */
.auth-modal__notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	margin-bottom: 16px;
	border: 1px solid #e7e3ea;
	border-radius: 12px;
	background: #f8f6f9;
	color: #605965;
	font-size: 0.76rem;
	line-height: 1.6;
}

.auth-modal__notice svg {
	flex-shrink: 0;
	margin-top: 2px;
	color: var(--moweb-color-brand-deep);
}

.auth-modal__woocommerce-notices {
	margin: -4px 0 16px;
}

.auth-modal__woocommerce-notices .woocommerce-error,
.auth-modal__woocommerce-notices .woocommerce-info,
.auth-modal__woocommerce-notices .woocommerce-message {
	margin: 0 0 8px;
	border-radius: 12px;
	font-size: 0.78rem;
	line-height: 1.65;
}

/* DIVIDER */
.auth-modal__divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0 16px;
	color: #9d96a2;
	font-size: 0.72rem;
	font-weight: 700;
}

.auth-modal__divider::before,
.auth-modal__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e6e2e9;
}

/* GOOGLE LOGIN DISABLED (GRAY) */
.auth-modal__social {
	margin-bottom: 18px;
}

.auth-modal__google {
	display: grid;
	width: 100%;
	min-height: 48px;
	grid-template-columns: 24px 1fr auto;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	border: 1px solid #dcdae0;
	border-radius: 999px;
	background: #f2f1f4;
	color: #7b7582;
	font-family: inherit;
	cursor: not-allowed;
	opacity: 0.88;
	user-select: none;
}

.auth-modal__google-icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
}

.auth-modal__google-svg {
	display: block;
}

.auth-modal__google-text {
	text-align: right;
	font-size: 0.78rem;
	font-weight: 700;
	color: #6f6876;
}

.auth-modal__badge {
	padding: 3px 9px;
	border-radius: 999px;
	background: #dfdce2;
	color: #68616f;
	font-size: 0.62rem;
	font-weight: 700;
}

/* SWITCH LINK */
.auth-modal__switch {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 16px 0 0;
	color: var(--moweb-color-muted);
	font-size: 0.78rem;
	text-align: center;
}

.auth-modal__switch-btn {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--moweb-color-brand-deep);
	font-family: inherit;
	font-size: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	transition: color 0.15s ease;
}

.auth-modal__switch-btn:hover {
	color: var(--moweb-color-brand);
}

.auth-modal-open {
	overflow: hidden;
}

/* RESPONSIVE */
@media (max-width: 575px) {
	.auth-modal {
		align-items: end;
		padding: 0;
	}

	.auth-modal__dialog {
		width: 100%;
		max-height: 90vh;
		padding: 24px 18px calc(20px + env(safe-area-inset-bottom));
		border-bottom: 0;
		border-radius: 24px 24px 0 0;
	}

	.auth-modal__title {
		font-size: 1.4rem;
	}
}
