/* Falconix - Central Panel | Frontend Styles */

.fcp-wrapper {
	--fcp-primary: #4f46e5;
	--fcp-primary-dark: #4338ca;
	--fcp-danger: #dc2626;
	--fcp-bg: #f8fafc;
	--fcp-card-bg: #ffffff;
	--fcp-border: #e2e8f0;
	--fcp-text: #1e293b;
	--fcp-text-muted: #64748b;
	--fcp-radius: 14px;
	font-family: inherit;
	color: var(--fcp-text);
	direction: rtl;
	max-width: 1100px;
	margin: 0 auto;
	padding: 24px 16px 60px;
}

.fcp-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 4px;
}

.fcp-subtitle {
	color: var(--fcp-text-muted);
	margin: 0;
	font-size: 14px;
}

/* ===== Alerts ===== */
.fcp-alert {
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 16px;
	font-size: 14px;
}
.fcp-alert-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}
.fcp-alert-success {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

/* ===== Buttons ===== */
.fcp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 20px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s ease;
}
.fcp-btn-primary {
	background: var(--fcp-primary);
	color: #fff;
}
.fcp-btn-primary:hover {
	background: var(--fcp-primary-dark);
	color: #fff;
}
.fcp-btn-outline {
	background: transparent;
	border: 1px solid var(--fcp-border);
	color: var(--fcp-text);
}
.fcp-btn-outline:hover {
	background: var(--fcp-bg);
	color: var(--fcp-text);
}
.fcp-btn-danger {
	background: #fef2f2;
	color: var(--fcp-danger);
}
.fcp-btn-danger:hover {
	background: #fee2e2;
	color: var(--fcp-danger);
}
.fcp-btn-block {
	width: 100%;
}

/* ===== Login ===== */
.fcp-login-wrapper {
	max-width: 420px;
	padding-top: 60px;
	padding-bottom: 80px;
}
.fcp-login-box {
	background: var(--fcp-card-bg);
	border: 1px solid var(--fcp-border);
	border-radius: var(--fcp-radius);
	padding: 32px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.fcp-login-box .fcp-title {
	text-align: center;
	margin-bottom: 24px;
}

/* ===== دکمه‌های ورود و لینک جادویی (کنار هم، هم‌اندازه، با فاصله) ===== */
.fcp-login-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 22px;
}
.fcp-login-actions-top {
	margin-top: 0;
	margin-bottom: 20px;
}
.fcp-login-actions-secondary {
	margin-top: 10px;
}
.fcp-pill-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 24px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	transition: all 0.15s ease;
}
.fcp-pill-btn-primary,
.fcp-pill-btn-secondary,
.fcp-pill-btn-tertiary {
	background: var(--fcp-tertiary, #eef0f3);
	border-color: var(--fcp-tertiary, #eef0f3);
	color: var(--fcp-tertiary-text, #334155);
}
.fcp-pill-btn-primary:hover,
.fcp-pill-btn-secondary:hover,
.fcp-pill-btn-tertiary:hover {
	filter: brightness(0.96);
}
.fcp-tab-content {
	display: none;
}
.fcp-tab-content.active {
	display: block;
}

/* ===== سوییچ کانال ایمیل/پیامک ===== */
.fcp-channel-switch {
	display: flex;
	gap: 18px;
	margin-bottom: 16px;
	font-size: 13px;
	font-weight: 600;
}
.fcp-channel-switch label {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-weight: 500;
}
.fcp-magic-note {
	text-align: center;
	margin-top: 10px !important;
}

.fcp-form .fcp-field {
	margin-bottom: 16px;
}
.fcp-form .fcp-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.fcp-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--fcp-text);
}
.fcp-form input[type="text"],
.fcp-form input[type="email"],
.fcp-form input[type="password"],
.fcp-form input[type="file"],
.fcp-form textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--fcp-border);
	border-radius: 10px;
	font-size: 14px;
	box-sizing: border-box;
	background: #fff;
	color: var(--fcp-text);
}
.fcp-form input:focus,
.fcp-form textarea:focus {
	outline: none;
	border-color: var(--fcp-primary);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.fcp-form input:disabled {
	background: var(--fcp-bg);
	color: var(--fcp-text-muted);
}
.fcp-field-inline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
}
.fcp-link {
	color: var(--fcp-primary);
	text-decoration: none;
}
.description {
	display: block;
	font-size: 12px;
	color: var(--fcp-text-muted);
	margin-top: 4px;
}
.fcp-optional {
	font-weight: 400;
	color: var(--fcp-text-muted);
	font-size: 12px;
}

/* ===== Dashboard header ===== */
.fcp-dashboard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--fcp-border);
}
.fcp-user-mini {
	display: flex;
	align-items: center;
	gap: 14px;
}
.fcp-user-mini img {
	border-radius: 50%;
	object-fit: cover;
}
.fcp-header-actions {
	display: flex;
	gap: 10px;
}

/* ===== Widgets grid ===== */
.fcp-wrapper {
	--fcp-gap: 18px;
}
.fcp-widgets-grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fcp-gap);
}
.fcp-widget-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--fcp-card-bg);
	border: 1px solid var(--fcp-border);
	border-radius: var(--fcp-radius);
	padding: 18px;
	text-decoration: none;
	color: var(--fcp-text);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	box-sizing: border-box;
}

/* ===== سیستم عرض دستی ویجت‌ها (مشترک بین کارت‌های لینکی و ویجت‌های شورت‌کدی) ===== */
.fcp-w-auto {
	flex: 1 1 240px;
}
.fcp-w-full {
	flex: 1 1 100%;
	width: 100%;
}
.fcp-w-two_third {
	flex: 1 1 calc(66.666% - (var(--fcp-gap) / 3));
	max-width: calc(66.666% - (var(--fcp-gap) / 3));
}
.fcp-w-half {
	flex: 1 1 calc(50% - (var(--fcp-gap) / 2));
	max-width: calc(50% - (var(--fcp-gap) / 2));
}
.fcp-w-third {
	flex: 1 1 calc(33.333% - (var(--fcp-gap) * 2 / 3));
	max-width: calc(33.333% - (var(--fcp-gap) * 2 / 3));
}

.fcp-widget-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
	border-color: var(--fcp-primary);
	color: var(--fcp-text);
}
.fcp-widget-icon {
	width: 48px;
	height: 48px;
	min-width: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	overflow: hidden;
}
.fcp-widget-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
}
.fcp-widget-body h3 {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
}
.fcp-widget-body p {
	margin: 0;
	font-size: 13px;
	color: var(--fcp-text-muted);
	line-height: 1.5;
}
.fcp-widget-arrow {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--fcp-text-muted);
	opacity: 0;
	transition: opacity 0.15s ease;
}
.fcp-widget-card:hover .fcp-widget-arrow {
	opacity: 1;
}

/* ===== Shortcode widgets (separate area below the grid) ===== */
.fcp-shortcode-section {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fcp-gap);
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid var(--fcp-border);
}
.fcp-shortcode-widget {
	background: var(--fcp-card-bg);
	border: 1px solid var(--fcp-border);
	border-radius: var(--fcp-radius);
	padding: 22px;
	box-sizing: border-box;
	min-width: 0; /* از سرریز شدن محتوای شورت‌کد (مثل جدول یا فرم) در حالت نیمه/یک‌سومِ عرض جلوگیری می‌کند */
}
.fcp-shortcode-widget-title {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 700;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--fcp-border);
}
.fcp-shortcode-widget-content {
	font-size: 14px;
	line-height: 1.8;
	overflow-x: auto;
}
.fcp-shortcode-widget-content img,
.fcp-shortcode-widget-content iframe,
.fcp-shortcode-widget-content video {
	max-width: 100%;
	height: auto;
}
.fcp-shortcode-widget-content table {
	width: 100%;
}

.fcp-empty-state {
	flex: 1 1 100%;
	text-align: center;
	padding: 60px 20px;
	color: var(--fcp-text-muted);
	background: var(--fcp-card-bg);
	border: 1px dashed var(--fcp-border);
	border-radius: var(--fcp-radius);
}
.fcp-empty-state .dashicons {
	font-size: 36px;
	width: 36px;
	height: 36px;
	margin-bottom: 10px;
	color: var(--fcp-primary);
}

/* ===== Profile ===== */
.fcp-profile-grid {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 20px;
}
.fcp-card {
	background: var(--fcp-card-bg);
	border: 1px solid var(--fcp-border);
	border-radius: var(--fcp-radius);
	padding: 24px;
}
.fcp-card h3 {
	margin-top: 0;
	margin-bottom: 18px;
	font-size: 16px;
}
.fcp-info-card,
.fcp-password-card {
	grid-column: 2;
}
.fcp-avatar-card {
	grid-row: span 2;
}
.fcp-avatar-preview {
	text-align: center;
	margin-bottom: 18px;
}
.fcp-avatar-preview img {
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid var(--fcp-bg);
}

/* =========================================================
   ریسپانسیو
   ========================================================= */

/* تبلت: ویجت‌های یک‌سوم/دوسوم به نیمه تبدیل می‌شوند تا فضای کافی داشته باشند */
@media (max-width: 900px) {
	.fcp-wrapper {
		--fcp-gap: 16px;
	}
	.fcp-w-third,
	.fcp-w-two_third {
		flex: 1 1 calc(50% - (var(--fcp-gap) / 2));
		max-width: calc(50% - (var(--fcp-gap) / 2));
	}
	.fcp-profile-grid {
		grid-template-columns: 1fr;
	}
	.fcp-info-card,
	.fcp-password-card,
	.fcp-avatar-card {
		grid-column: 1;
		grid-row: auto;
	}
}

/* موبایل: صرف‌نظر از تنظیم عرض در ادمین، همه ویجت‌ها تمام‌عرض و تک‌ستونه می‌شوند */
@media (max-width: 640px) {
	.fcp-wrapper {
		--fcp-gap: 14px;
		padding: 16px 12px 40px;
	}

	.fcp-w-auto,
	.fcp-w-full,
	.fcp-w-two_third,
	.fcp-w-half,
	.fcp-w-third {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}

	.fcp-dashboard-header {
		flex-direction: column;
		align-items: stretch;
	}
	.fcp-header-actions {
		width: 100%;
	}
	.fcp-header-actions .fcp-btn {
		flex: 1;
	}

	.fcp-widget-card {
		padding: 14px;
	}
	.fcp-widget-icon {
		width: 42px;
		height: 42px;
		min-width: 42px;
		font-size: 18px;
	}

	.fcp-login-wrapper {
		padding-top: 24px;
		padding-bottom: 50px;
	}
	.fcp-login-box {
		padding: 22px;
	}

	.fcp-form .fcp-field-row {
		grid-template-columns: 1fr;
	}
}

/* موبایل کوچک */
@media (max-width: 380px) {
	.fcp-user-mini {
		flex-wrap: wrap;
	}
	.fcp-widget-body h3 {
		font-size: 14px;
	}
	.fcp-widget-arrow {
		display: none;
	}
}
