/*!
 * SMS Auth UI - phone-first login switch and login help
 */

.wcsms-auth-ui-top {
	display: none;
	box-sizing: border-box;
	width: 100%;
}

.wcsms-auth-ui-ready .wcsms-auth-ui-top {
	display: block;
	margin: 0 0 1.15rem;
}

.wcsms-auth-ui-switch {
	display: none;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 4px;
	gap: 4px;
	direction: rtl;
	background: #efe9df;
	border: 1px solid rgba(47, 42, 35, 0.12);
	border-radius: 999px;
}

.wcsms-auth-ui-ready .wcsms-auth-ui-switch {
	display: flex;
}

.wcsms-auth-ui-switch__btn {
	appearance: none;
	-webkit-appearance: none;
	flex: 1 1 0;
	min-height: 42px;
	margin: 0;
	padding: 0.62rem 0.8rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: #6f6559;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-transform: none;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.wcsms-auth-ui-switch__btn:hover {
	color: #2f2a23;
}

.wcsms-auth-ui-switch__btn.is-active {
	background: #2f2a23;
	color: #fff;
	box-shadow: 0 2px 10px rgba(47, 42, 35, 0.18);
}

.wcsms-auth-ui-switch__btn:focus-visible {
	outline: 2px solid #8a6b45;
	outline-offset: 2px;
}

/* Login / register tabs: one visible form at a time */
.wcsms-auth-ui-tabs {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 1.1rem;
}

.wcsms-auth-ui-tabs[hidden] {
	display: none !important;
}

.wcsms-auth-ui-tabs__bar {
	display: flex;
	gap: 4px;
	padding: 4px;
	direction: rtl;
	background: #efe9df;
	border: 1px solid rgba(47, 42, 35, 0.12);
	border-radius: 999px;
}

.wcsms-auth-ui-tabs__tab {
	appearance: none;
	-webkit-appearance: none;
	flex: 1 1 0;
	min-height: 44px;
	margin: 0;
	padding: 0.62rem 0.8rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: #6f6559;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	text-transform: none;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.wcsms-auth-ui-tabs__tab:hover {
	color: #2f2a23;
}

.wcsms-auth-ui-tabs__tab.is-active {
	background: #9d4f39;
	color: #fff;
	box-shadow: 0 2px 10px rgba(157, 79, 57, 0.28);
}

.wcsms-auth-ui-tabs__tab:focus-visible {
	outline: 2px solid #8a6b45;
	outline-offset: 2px;
}

.wcsms-auth-ui-tabbed .u-column1,
.wcsms-auth-ui-tabbed .u-column2 {
	float: none !important;
	width: 100% !important;
	max-width: 640px;
	margin-inline: auto;
}

.wcsms-auth-ui-tabbed .u-column1 > h2,
.wcsms-auth-ui-tabbed .u-column2 > h2 {
	display: none;
}

.wcsms-auth-ui-tabbed .u-column1[hidden],
.wcsms-auth-ui-tabbed .u-column2[hidden] {
	display: none !important;
}

.wcsms-auth-ui-helpbar {
	display: none;
	box-sizing: border-box;
	width: 100%;
	margin-top: 0.55rem;
	gap: 0.25rem 0.55rem;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	direction: rtl;
	line-height: 1.7;
}

.wcsms-auth-ui-ready .wcsms-auth-ui-helpbar {
	display: flex;
}

.wcsms-auth-ui-help-link,
.wcsms-auth-ui-inline-link {
	appearance: none;
	-webkit-appearance: none;
	display: inline;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: #8a5a43;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: inherit;
	text-align: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	cursor: pointer;
}

.wcsms-auth-ui-help-link:hover,
.wcsms-auth-ui-inline-link:hover {
	color: #6f3d2a;
}

.wcsms-auth-ui-help-link:focus-visible,
.wcsms-auth-ui-inline-link:focus-visible {
	outline: 2px solid #8a6b45;
	outline-offset: 2px;
	border-radius: 4px;
}

.wcsms-auth-ui-helpbar__dot {
	color: #b7a795;
	font-size: 0.72rem;
}

.wcsms-auth-ui-email-note {
	display: none;
	box-sizing: border-box;
	margin: 0.65rem 0 0;
	padding: 0.65rem 0.8rem;
	border: 1px solid rgba(157, 79, 57, 0.14);
	border-radius: 12px;
	background: #f6efe4;
	color: #5f554b;
	font-size: 0.84rem;
	line-height: 1.8;
}

.wcsms-auth-ui-ready.wcsms-auth-ui--email .wcsms-auth-ui-email-note {
	display: block;
}

.wcsms-auth-ui-blacklist {
	display: none;
	box-sizing: border-box;
	margin: 0.65rem 0 0;
	padding: 0.7rem 0.85rem;
	border: 1px solid #e4c4a2;
	border-radius: 12px;
	background: #fff4e6;
	color: #7a3f2c;
	font-size: 0.84rem;
	line-height: 1.8;
}

.wcsms-auth-ui-blacklist[hidden] {
	display: none !important;
}

.wcsms-auth-ui-ready.wcsms-auth-ui--sms .wcsms-auth-ui-blacklist {
	display: block;
}

.wcsms-auth-ui-ready.wcsms-auth-ui--email .wcsms-auth-ui-blacklist {
	display: none !important;
}

.wcsms-auth-ui-blacklist p {
	margin: 0;
}

.wcsms-auth-ui-blacklist bdi,
.wcsms-auth-ui-help bdi {
	display: inline-block;
	direction: ltr;
	padding: 0.05rem 0.35rem;
	border-radius: 6px;
	background: #f3e7d6;
	color: #7a3f2c;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.95em;
}

.wcsms-auth-ui-ready.wcsms-auth-ui--sms .wcsms-auth-ui-native {
	display: none !important;
}

.wcsms-auth-ui-ready.wcsms-auth-ui--email .wcsmspro-auth {
	display: none !important;
}

.wcsms-auth-ui-ready.wcsms-auth-ui--sms .wcsmspro-auth {
	margin-top: 0.25rem;
}

#loginform .wcsms-auth-ui-ready .wcsms-auth-ui-top {
	margin-top: 0.35rem;
	margin-bottom: 1.25rem;
}

body.wcsms-auth-ui-sms #nav .wp-login-lost-password {
	display: none !important;
}

/* Page-like help dialog */
.wcsms-auth-ui-help {
	position: fixed;
	inset: 0;
	z-index: 100000;
	box-sizing: border-box;
	width: min(720px, calc(100% - 32px));
	max-height: min(86vh, 820px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 24px;
	background: #fbf6ec;
	color: #332c26;
	direction: rtl;
	text-align: right;
	font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
	box-shadow: 0 30px 80px -30px rgba(35, 28, 22, 0.55);
	overflow: hidden;
}

.wcsms-auth-ui-help:not([open]) {
	display: none;
}

.wcsms-auth-ui-help::backdrop {
	background: rgba(28, 24, 20, 0.58);
	backdrop-filter: blur(3px);
}

.wcsms-auth-ui-help__panel {
	position: relative;
	box-sizing: border-box;
	max-height: inherit;
	padding: clamp(24px, 4vw, 40px);
	overflow: auto;
}

.wcsms-auth-ui-help__close {
	position: absolute;
	top: 14px;
	left: 14px;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #efe4d4;
	color: #4a3d32;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
}

.wcsms-auth-ui-help__close:hover {
	background: #e5d6c1;
}

.wcsms-auth-ui-help__close:focus-visible {
	outline: 2px solid #8a6b45;
	outline-offset: 2px;
}

.wcsms-auth-ui-help__eyebrow {
	margin: 0 0 0.35rem;
	color: #9d4f39;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.wcsms-auth-ui-help__article h2 {
	margin: 0 0 0.75rem;
	color: #2f2a23;
	font-size: clamp(1.35rem, 3vw, 1.8rem);
	line-height: 1.5;
}

.wcsms-auth-ui-help__article p,
.wcsms-auth-ui-help__article li {
	color: #5f554b;
	font-size: 0.92rem;
	line-height: 1.95;
}

.wcsms-auth-ui-help__article p {
	margin: 0.55rem 0;
}

.wcsms-auth-ui-help__section {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(47, 42, 35, 0.12);
	outline: none;
}

.wcsms-auth-ui-help__section h3 {
	margin: 0 0 0.55rem;
	color: #2f2a23;
	font-size: 1.08rem;
	line-height: 1.6;
}

.wcsms-auth-ui-help__article ol {
	margin: 0.4rem 0 0.8rem;
	padding-inline-start: 1.35rem;
}

.wcsms-auth-ui-help__article li {
	margin: 0.35rem 0;
}

@media (max-width: 640px) {
	.wcsms-auth-ui-switch__btn {
		font-size: 0.86rem;
		padding: 0.58rem 0.55rem;
	}

	.wcsms-auth-ui-helpbar {
		font-size: 0.78rem;
	}

	.wcsms-auth-ui-helpbar__dot {
		display: none;
	}

	.wcsms-auth-ui-help {
		width: calc(100% - 20px);
		max-height: 88vh;
		border-radius: 18px;
	}

	.wcsms-auth-ui-help__panel {
		padding: 22px 18px;
	}
}
