/**
 * Mallria Web 登录弹窗样式
 *
 * @package WP_Mallria
 */

/* —— 登录 Swal（独立壳层，不依赖 bazi-rs-bcp-swal） —— */
.swal2-popup.mallria-web-auth-swal {
	--mallria-auth-ink: #13274f;
	--mallria-auth-label: #1f335f;
	--mallria-auth-help: #6b7897;
	--mallria-auth-border: #cfd8ee;
	--mallria-auth-focus: #6a7dd9;
	--mallria-auth-accent: #5e6ad2;
	--mallria-auth-accent-hover: #4f58b8;
	--mallria-auth-radius: 12px;
	--swal2-padding: 0 !important;
	width: min(22rem, calc(100vw - 1.5rem)) !important;
	max-width: 22rem;
	padding: 0 !important;
	box-sizing: border-box !important;
	overflow: hidden;
	color: var(--mallria-auth-ink) !important;
	border-radius: var(--mallria-auth-radius) !important;
}

.swal2-popup.mallria-web-auth-swal h2.swal2-title,
.swal2-popup.mallria-web-auth-swal .swal2-title {
	display: block !important;
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 1.25rem 1.25rem 0.75rem !important;
	font-family: inherit !important;
	font-size: 1.0625rem !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	text-align: left !important;
	color: var(--mallria-auth-ink) !important;
	background: transparent !important;
}

.swal2-popup.mallria-web-auth-swal .swal2-html-container {
	margin: 0 !important;
	padding: 0 1.25rem 0.5rem !important;
	box-sizing: border-box !important;
	color: var(--mallria-auth-ink) !important;
}

.swal2-popup.mallria-web-auth-swal .swal2-actions {
	display: flex !important;
	flex-direction: row-reverse !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	justify-content: stretch !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0.75rem 0 0 !important;
	padding: 0 1.25rem 1.25rem !important;
	gap: 10px !important;
	box-sizing: border-box !important;
}

.swal2-popup.mallria-web-auth-swal .swal2-actions button.swal2-confirm,
.swal2-popup.mallria-web-auth-swal .swal2-actions button.swal2-confirm.swal2-styled,
.swal2-popup.mallria-web-auth-swal .swal2-actions .mallria-web-auth-swal-confirm {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	flex: 1 1 0 !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 12px 18px !important;
	border: none !important;
	border-radius: var(--mallria-auth-radius) !important;
	background: var(--mallria-auth-accent) !important;
	background-image: none !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	cursor: pointer !important;
	box-shadow: none !important;
	transform: none !important;
	transition: background-color 0.15s ease, opacity 0.15s ease !important;
}

.swal2-popup.mallria-web-auth-swal .swal2-actions button.swal2-confirm:hover:not(:disabled),
.swal2-popup.mallria-web-auth-swal .swal2-actions .mallria-web-auth-swal-confirm:hover:not(:disabled) {
	background: var(--mallria-auth-accent-hover) !important;
	color: #fff !important;
}

.swal2-popup.mallria-web-auth-swal .swal2-actions button.swal2-cancel,
.swal2-popup.mallria-web-auth-swal .swal2-actions button.swal2-cancel.swal2-styled,
.swal2-popup.mallria-web-auth-swal .swal2-actions .mallria-web-auth-swal-cancel {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	flex: 1 1 0 !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 12px 18px !important;
	border: 1px solid var(--mallria-auth-border) !important;
	border-radius: var(--mallria-auth-radius) !important;
	background: #fff !important;
	background-image: none !important;
	color: var(--mallria-auth-label) !important;
	font-family: inherit !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	cursor: pointer !important;
	box-shadow: none !important;
	transform: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.swal2-popup.mallria-web-auth-swal .swal2-actions button.swal2-cancel:hover:not(:disabled),
.swal2-popup.mallria-web-auth-swal .swal2-actions .mallria-web-auth-swal-cancel:hover:not(:disabled) {
	background: #f4f7ff !important;
	border-color: var(--mallria-auth-focus) !important;
	color: var(--mallria-auth-ink) !important;
}

/* 轻确认（退出登录等）：无图标、文案左对齐 */
.swal2-popup.mallria-web-auth-swal.mallria-web-auth-confirm-swal {
	width: min(20rem, calc(100vw - 1.5rem)) !important;
	max-width: 20rem;
}

.swal2-popup.mallria-web-auth-swal.mallria-web-auth-confirm-swal .swal2-icon {
	display: none !important;
}

.swal2-popup.mallria-web-auth-swal.mallria-web-auth-confirm-swal h2.swal2-title,
.swal2-popup.mallria-web-auth-swal.mallria-web-auth-confirm-swal .swal2-title {
	padding-bottom: 0.35rem !important;
}

.swal2-popup.mallria-web-auth-swal.mallria-web-auth-confirm-swal .swal2-html-container {
	margin-top: 0 !important;
	padding-top: 0 !important;
	font-size: 0.9375rem !important;
	line-height: 1.55 !important;
	color: var(--mallria-auth-help) !important;
	text-align: left !important;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-stepper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0 0 16px;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-stepper-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--mallria-auth-border);
	transition: background 0.25s ease, transform 0.25s ease;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-stepper-dot.is-active {
	background: var(--mallria-auth-accent);
	transform: scale(1.15);
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-stepper-line {
	width: 36px;
	height: 2px;
	margin: 0 8px;
	border-radius: 1px;
	background: #e2e8f4;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-steps-viewport {
	width: 100%;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-steps-track {
	display: block;
	width: 100%;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-step-panel {
	width: 100%;
	box-sizing: border-box;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-step-panel[data-auth-panel='email'] {
	display: block;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-step-panel[data-auth-panel='otp'] {
	display: none;
}

.swal2-popup.mallria-web-auth-swal.mallria-auth-step-otp .mallria-auth-step-panel[data-auth-panel='email'] {
	display: none !important;
}

.swal2-popup.mallria-web-auth-swal.mallria-auth-step-otp .mallria-auth-step-panel[data-auth-panel='otp'] {
	display: block !important;
}

.swal2-popup.mallria-web-auth-swal.mallria-auth-step-otp .swal2-cancel {
	display: none !important;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-back-email {
	display: block;
	width: 100%;
	margin: 12px 0 0;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--mallria-auth-help);
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-back-email:hover {
	color: var(--mallria-auth-accent);
}

.swal2-popup.mallria-web-auth-swal.mallria-auth-confirm-loading .swal2-confirm {
	position: relative;
	pointer-events: none;
	opacity: 0.88;
}

.swal2-popup.mallria-web-auth-swal.mallria-auth-confirm-loading .swal2-confirm::before {
	content: '';
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.45em;
	vertical-align: -0.15em;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mallria-auth-spin 0.65s linear infinite;
}

@keyframes mallria-auth-spin {
	to {
		transform: rotate(360deg);
	}
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-lead {
	margin: 0 0 10px;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--mallria-auth-label);
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-email-mask {
	margin: 0 0 14px;
	font-size: 0.8125rem;
	color: var(--mallria-auth-help);
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-email-input.swal2-input {
	width: 100%;
	margin: 0 0 10px;
	padding: 10px 12px;
	border: 1px solid var(--mallria-auth-border);
	border-radius: 10px;
	font-size: 1rem;
	box-shadow: none;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-email-input.swal2-input:focus {
	border-color: var(--mallria-auth-focus);
	box-shadow: 0 0 0 3px rgba(106, 125, 217, 0.2);
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-turnstile-slot {
	margin: 8px auto 4px;
	display: flex;
	justify-content: center;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-otp-row {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin: 4px 0 16px;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-otp-cell.swal2-input {
	width: 3rem;
	height: 3rem;
	margin: 0;
	padding: 0;
	border: 1px solid var(--mallria-auth-border);
	border-radius: 10px;
	background: #fff;
	color: var(--mallria-auth-ink);
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 3rem;
	text-align: center;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-otp-cell.swal2-input:focus {
	outline: none;
	border-color: var(--mallria-auth-focus);
	box-shadow: 0 0 0 3px rgba(106, 125, 217, 0.22);
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-remember {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 0.875rem;
	color: var(--mallria-auth-label);
	cursor: pointer;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-remember input {
	width: 1rem;
	height: 1rem;
	margin: 0;
	accent-color: var(--mallria-auth-accent);
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-resend-btn {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--mallria-auth-accent);
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
	text-align: left;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-resend-btn:disabled {
	color: #9aa5bd;
	cursor: not-allowed;
}

.swal2-popup.mallria-web-auth-swal .mallria-auth-error {
	margin: 10px 0 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: #c53030;
}
