/**
 * استایل ساختاری ویجت «پنل کاربری» (Elementor User Panel).
 *
 * - رنگ‌ها/تایپ‌ها/حالت‌ها توسط کنترل‌های المنتور تولید می‌شوند و با
 *   اختصاص‌گری بالاتر روی این قواعد می‌نشینند.
 * - این فایل فقط ساختار، مقادیر پیش‌فرض و ریزحالات (focus/scrollbar) را می‌دهد.
 * - قواعد :hover اینجا تعمداً نیستند تا روی تنظیمات کاربر غلبه نکنند؛
 *   حالت‌های هاور از مقادیر پیش‌فرض کنترل‌های رنگ تولید می‌شوند.
 */

.eup,
.eup * {
	box-sizing: border-box;
}

.eup {
	--eup-primary: #0d6efd;
	--eup-text: #495057;
	--eup-border: #e9ecef;

	display: flex;
	flex-direction: column;
	min-width: 0;
	max-width: 100%;
	font-family: inherit;
	color: var(--eup-text);
	background: #ffffff;
	border: 1px solid var(--eup-border);
	border-radius: 12px;
	overflow: hidden;
}

/* ------------------------------ هدر ------------------------------ */

.eup-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	padding: 20px;
	margin-bottom: 0;
}

.eup-header-user {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.eup-user-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	text-align: start;
}

.eup-user-name {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: #212529;
}

.eup-user-email,
.eup-user-phone {
	font-size: 13px;
	line-height: 1.4;
	color: #6c757d;
	overflow-wrap: anywhere;
}

.eup-user-phone {
	unicode-bidi: plaintext;
}


.eup-avatar {
	display: inline-flex;
	flex: 0 0 auto;
	overflow: hidden;
	line-height: 0;
	width: 64px;
	height: 64px;
	border-radius: 50%;
}

.eup-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
}

.eup-logout-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #dc3545;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.eup-logout-icon {
	display: inline-flex;
	font-size: 16px;
	line-height: 1;
}

/* --------------------------- ناوبری/تب‌ها --------------------------- */

.eup-nav-wrap {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.eup-toggle {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #e9ecef;
	border-radius: 12px;
	background: #f1f3f5;
	color: #212529;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.eup-toggle-main {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.eup-toggle-caret {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1;
	transition: transform 0.3s ease;
}

.eup-toggle-caret i {
	line-height: 1;
}

.eup-open .eup-toggle-caret {
	transform: rotate(180deg);
}

.eup-toggle-icon {
	display: inline-flex;
	font-size: 18px;
	line-height: 1;
}

.eup-toggle-text {
	line-height: 1;
}

.eup-nav {
	min-width: 0;
}

.eup-nav-list {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
	scrollbar-width: thin;
	scrollbar-color: #ced4da transparent;
}

.eup-nav-list::-webkit-scrollbar {
	height: 6px;
}

.eup-nav-list::-webkit-scrollbar-track {
	background: transparent;
}

.eup-nav-list::-webkit-scrollbar-thumb {
	background: #ced4da;
	border-radius: 999px;
}

/* پایهٔ واحد همهٔ تب‌ها (اصلی و زیرتب): تنها تفاوت بصری، حالت فعال است. */
.eup-tab,
.eup-subtab {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #495057;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	appearance: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.eup-toggle-icon svg,
.eup-toggle-caret svg,
.eup-tab-icon svg,
.eup-logout-icon svg {
	width: 1em;
	height: 1em;
}

/* آیکون‌های SVG از fill hardcode شدهٔ داخل خود SVG می‌آیند و color ارثی را
   نادیده می‌گیرند؛ این قاعده آن‌ها را به رنگ متن تب (و کنترل‌های رنگ آیکون)
   گره می‌زند. */
.eup-tab-icon svg {
	fill: currentColor;
}

/* حالت فعال — تنها تفاوت بصری تب‌ها؛ پیش‌فرضِ سندِ بدون CSSِ تولیدیِ المنتور. */
.eup-tab.is-active,
.eup-subtab.is-active {
	background-color: #f1f3f5;
	color: #0d6efd;
}

/* آیکون ابتدای هر تب (اختیاری — از کنترل «آیکون تب» در ریپیتر). */
.eup-tab-icon {
	display: inline-flex;
	align-items: center;
	font-size: 16px;
	line-height: 1;
}

.eup-tab-label {
	line-height: 1.4;
}

.eup-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f1f3f5;
	color: #495057;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

/* --------------------- زیرتب‌ها (ناوبری تو در تو) --------------------- */

.eup-item {
	display: block;
	min-width: 0;
}

.eup-subbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	min-width: 0;
}

.eup-subbar[hidden] {
	display: none !important;
}

/* استایل تب‌ها: به بلوک واحدِ .eup-tab, .eup-subtab در بخش ناوبری (بالاتر) مراجعه شود. */

/* ---------------------------- ناحیه محتوا ---------------------------- */

.eup-content {
	padding: 16px 20px 20px;
	min-height: 200px;
	color: #495057;
	font-size: 15px;
	line-height: 1.7;
}

.eup-panel {
	display: block;
}

.eup-panel[hidden] {
	display: none;
}

/* انیمیشن سوییچ تب: ورود نرم محتوا و زیرمنو هنگام نمایش (display:none → block) */
@keyframes eup-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.eup-panel:not([hidden]) {
	animation: eup-in 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eup-subbar:not([hidden]) {
	animation: eup-in 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
	.eup-panel:not([hidden]),
	.eup-subbar:not([hidden]) {
		animation: none;
	}
}

.eup-panel > *:first-child {
	margin-top: 0;
}

.eup-panel > *:last-child {
	margin-bottom: 0;
}

/* یادداشت پنل‌های بدون محتوای متنی (تب خروج/لینک) — فقط راهنمای ویرایشگر. */
.eup-panel-empty-note {
	margin: 0;
	color: #6c757d;
	font-size: 13px;
	line-height: 1.8;
}

/* کانتینرهای تو در تو (ویجت‌های رهاشده در تب) تمام عرض پنل باشند. */
.eup-panel > .elementor-element {
	width: 100%;
}

/* --------------------------- کارت مهمان/ورود --------------------------- */

.eup-guest {
	padding: 24px;
	color: #495057;
	text-align: center;
}

.eup-guest-message {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.7;
}

.eup-guest-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.eup-guest-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border: 0;
	border-radius: 8px;
	background: #0d6efd;
	color: #ffffff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.eup-guest-link {
	color: #0d6efd;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.eup-guest-link:hover {
	text-decoration: underline;
}

.eup-empty {
	padding: 20px;
	color: #868e96;
	font-size: 14px;
	text-align: center;
}

/* --------------------------- ریزحالات/دسترس‌پذیری --------------------------- */

.eup-tab:focus-visible,
.eup-subtab:focus-visible,
.eup-toggle:focus-visible,
.eup-logout-btn:focus-visible,
.eup-guest-btn:focus-visible,
.eup-guest-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* در حالت‌های عمودی/چینش، عنوان بلند بتواند شکسته شود؛
   این قواعد توسط CSS چیدمان ناوبری (تولیدشده در PHP) افزوده می‌شوند. */

/* --------------------------- خنثی‌ساز رنگ قرمز پوسته ---------------------------
   ریستِ بعضی پوسته‌ها (مثل Hello Elementor) روی همهٔ دکمه‌ها border و color با
   #c36 می‌گذارد و روی :hover/:focus پس‌زمینهٔ قرمز می‌سازد؛ به‌روزرسانی پوسته این
   قواعد را برمی‌گرداند. این بلوک با تخصصیت «body + عنصر + کلاس» (0-1-2):
   - بالاتر از حداکثر تخصصیتِ ریستِ تم (0-1-1) → قرمزی در هیچ حالتی برنمی‌گردد؛
   - پایین‌تر از رنگ‌های سفارشی المنتور ({{WRAPPER}} .eup-x با 0-2-0) → رنگ دلخواه
     کاربر همچنان مقدم می‌ماند؛
   - پایین‌تر از قواعد حالت خودِ همین فایل (مثل :hover/:focus با 0-2-0) → تغییر
     رنگ عادی هاور/فوکوسِ خودِ ویجت دست‌نخورده می‌ماند.
   مقادیر، عینِ قواعد پایهٔ همان کلاس در همین فایل است؛ پس ظاهر امروز تغییری نمی‌کند. */
body button.eup-toggle {
	border: 1px solid #e9ecef;
	background-color: #f1f3f5;
	color: #212529;
}

body a.eup-tab,
body button.eup-tab,
body a.eup-subtab,
body button.eup-subtab {
	border: 0;
	background-color: transparent;
	color: #495057;
}

body a.eup-logout-btn {
	border: 0;
	background-color: transparent;
	color: #dc3545;
}

body a.eup-guest-btn,
body button.eup-guest-btn {
	border: 0;
	background-color: #0d6efd;
	color: #ffffff;
}

body a.eup-guest-link {
	color: #0d6efd;
}

/* --------------------- پاپ آپ تایید خروج ---------------------
   جایگزین confirm مرورگر؛ ساختار/انیمیشن عین پاپ آپ تکمیل پروفایل
   (profile-edit.css) است تا ظاهر سایت یکدست بماند. همه قاعده‌ها
   با `body` سلکتور-پایه می‌گیرند (اولویت ۰-۱-۱/۰-۲-۱) تا حتی با
   بازگشتِ رنگ‌های قرمز پوسته، رنگ دکمه‌ها خنثی بماند. */

html.eup-confirm-lock body {
	overflow: hidden !important;
}

body .eup-confirm {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

body .eup-confirm[hidden] {
	display: none;
}

body .eup-confirm-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(2px);
	animation: eup-confirm-fade 0.2s ease;
}

body .eup-confirm-card {
	position: relative;
	box-sizing: border-box;
	width: min(400px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 24px 22px 20px;
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
	text-align: center;
	animation: eup-confirm-in 0.24s ease;
}

body .eup-confirm-title {
	margin: 0 0 8px;
	color: #212529;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.7;
}

body .eup-confirm-msg {
	margin: 0 0 20px;
	color: #6c757d;
	font-size: 14px;
	line-height: 1.9;
}

body .eup-confirm-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
}

body .eup-confirm-btn {
	flex: 1 1 0;
	min-height: 46px;
	padding: 11px 16px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	border-radius: 12px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
		filter 0.15s ease;
}

body .eup-confirm-cancel {
	color: #6c757d;
	background: #f1f3f5;
	border: 1px solid #dee2e6;
}

body .eup-confirm-cancel:hover,
body .eup-confirm-cancel:focus {
	color: #0d6efd;
	border-color: #0d6efd;
	filter: brightness(0.96);
}

body .eup-confirm-ok {
	color: #ffffff;
	background: #dc3545;
	border: 1px solid #dc3545;
}

body .eup-confirm-ok:hover,
body .eup-confirm-ok:focus {
	color: #ffffff;
	background: #bb2d3b;
	border-color: #bb2d3b;
}

body .eup-confirm-btn:focus-visible {
	outline: 2px solid #0d6efd;
	outline-offset: 2px;
}

body .eup-confirm-ok:focus-visible {
	outline-color: #dc3545;
}

@keyframes eup-confirm-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes eup-confirm-in {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 480px) {
	body .eup-confirm-actions {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	body .eup-confirm-backdrop,
	body .eup-confirm-card {
		animation: none;
	}
}
