/* ==========================================================================
   WP Modal Auth & Cabinet — Styles
   ========================================================================== */

.wmac-trigger-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #111827;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.15s ease;
}

.wmac-trigger-btn:hover {
	opacity: 0.9;
}

.wmac-btn-avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

/* Overlay & Dialog */
.wmac-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, 0.62);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.wmac-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.wmac-dialog {
	position: relative;
	width: 100%;
	max-width: 450px;
	max-height: 92vh;
	overflow-y: auto;
	background: #ffffff;
	color: #111827;
	border-radius: 16px;
	padding: 28px;
	box-sizing: border-box;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	transform: translateY(10px);
	transition: transform 0.2s ease;
}

.wmac-dialog--cabinet {
	max-width: 560px;
}

.wmac-overlay.is-open .wmac-dialog {
	transform: translateY(0);
}

.wmac-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: none;
	background: #f3f4f6;
	color: #4b5563;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wmac-close:hover {
	background: #e5e7eb;
	color: #111827;
}

/* Alerts */
.wmac-alert {
	margin-bottom: 16px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.45;
}

.wmac-alert.is-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.wmac-alert.is-success {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.wmac-alert.is-info {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

/* Tabs */
.wmac-tabs {
	display: flex;
	gap: 16px;
	margin-bottom: 20px;
	border-bottom: 1px solid #e5e7eb;
}

.wmac-tab-btn {
	padding: 10px 2px;
	margin-bottom: -1px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	color: #6b7280;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.wmac-tab-btn:hover {
	color: #111827;
}

.wmac-tab-btn.is-active {
	color: #111827;
	border-bottom-color: #2563eb;
}

.wmac-tab-pane {
	display: none;
}

.wmac-tab-pane.is-active {
	display: block;
}

/* Typography & Forms */
.wmac-subtitle {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: #111827;
}

.wmac-desc {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.5;
	color: #4b5563;
}

.wmac-section-title {
	margin: 18px 0 10px;
	padding-top: 14px;
	border-top: 1px solid #e5e7eb;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b7280;
}

.wmac-field {
	margin-bottom: 14px;
}

.wmac-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
}

.wmac-field input[type="text"],
.wmac-field input[type="email"],
.wmac-field input[type="password"],
.wmac-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	color: #111827;
	background: #ffffff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wmac-field input:focus,
.wmac-field textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wmac-pass-wrap {
	position: relative;
}

.wmac-pass-wrap input {
	padding-right: 84px;
}

.wmac-pass-toggle {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #6b7280;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	padding: 4px 6px;
}

.wmac-pass-toggle:hover {
	color: #111827;
}

.wmac-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.wmac-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	font-size: 13px;
}

.wmac-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	color: #374151;
}

.wmac-link,
.wmac-link-btn {
	color: #2563eb;
	text-decoration: none;
	font-size: 13px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

.wmac-link:hover,
.wmac-link-btn:hover {
	text-decoration: underline;
}

.wmac-link-btn:disabled {
	color: #9ca3af;
	cursor: not-allowed;
	text-decoration: none;
}

.wmac-submit {
	width: 100%;
	padding: 11px 16px;
	background: #2563eb;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.wmac-submit:hover {
	background: #1d4ed8;
}

.wmac-submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

.wmac-footer-link {
	margin-top: 14px;
	text-align: center;
}

/* Yandex SmartCaptcha */
.wmac-captcha-wrap {
	margin-bottom: 16px;
	min-height: 100px;
}

/* Two Factor (2FA) */
.wmac-2fa-methods {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.wmac-2fa-method-btn {
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 999px;
	border: 1px solid #d1d5db;
	background: #f9fafb;
	color: #374151;
	cursor: pointer;
}

.wmac-2fa-method-btn.is-active {
	background: #eff6ff;
	border-color: #2563eb;
	color: #1d4ed8;
}

.wmac-2fa-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
}

/* Cabinet Header */
.wmac-profile-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 18px;
	padding-right: 28px;
}

.wmac-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #e5e7eb;
	flex-shrink: 0;
}

.wmac-profile-head-meta {
	min-width: 0;
}

.wmac-profile-name {
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	word-break: break-word;
}

.wmac-profile-email {
	font-size: 13px;
	color: #6b7280;
	word-break: break-all;
}

.wmac-profile-login {
	font-size: 12px;
	color: #9ca3af;
	margin-top: 2px;
}

/* Cabinet Overview Card */
.wmac-info-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wmac-info-block {
	padding: 12px 14px;
	background: #f9fafb;
	border: 1px solid #f3f4f6;
	border-radius: 10px;
}

.wmac-info-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6b7280;
	margin-bottom: 4px;
}

.wmac-info-value {
	font-size: 14px;
	color: #111827;
	line-height: 1.5;
	word-break: break-word;
}

.wmac-muted {
	font-size: 13px;
	color: #9ca3af;
}

.wmac-socials-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.wmac-social-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 11px;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
	color: #1f2937;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.wmac-social-chip:hover {
	border-color: #2563eb;
	color: #2563eb;
}

.wmac-dates-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.wmac-date-box {
	padding: 12px 14px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

.wmac-date-value {
	font-size: 13px;
	color: #0f172a;
}

/* Avatar Editor */
.wmac-avatar-editor {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	margin-bottom: 16px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}

.wmac-avatar-sm {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.wmac-avatar-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.wmac-btn-secondary {
	display: inline-block;
	padding: 6px 12px;
	background: #ffffff;
	color: #111827;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}

.wmac-btn-secondary:hover {
	background: #f3f4f6;
}

.wmac-btn-danger-ghost {
	padding: 6px 10px;
	background: none;
	color: #dc2626;
	border: 1px solid #fecaca;
	border-radius: 6px;
	font-size: 13px;
	cursor: pointer;
}

.wmac-btn-danger-ghost:hover {
	background: #fef2f2;
}

.wmac-hint {
	width: 100%;
	font-size: 12px;
	color: #6b7280;
}

/* 2FA Status Box in Security tab */
.wmac-status-box {
	padding: 12px 14px;
	border-radius: 10px;
	margin-bottom: 16px;
	font-size: 13px;
}

.wmac-status-box.is-on {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

.wmac-status-box.is-off {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	color: #4b5563;
}

.wmac-status-sub {
	margin-top: 4px;
	font-size: 12px;
	opacity: 0.9;
}

/* Footer */
.wmac-cabinet-footer {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
	text-align: center;
}

.wmac-logout-btn {
	background: none;
	border: none;
	color: #dc2626;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.wmac-logout-btn:hover {
	text-decoration: underline;
}

@media (max-width: 520px) {
	.wmac-dialog {
		padding: 20px;
	}
	.wmac-grid-2,
	.wmac-dates-grid {
		grid-template-columns: 1fr;
	}
}
