/* =========================================================
   FOS7TY PARTNERS — واجهة «شريكي» (RTL-first)
   كل القواعد متقيّدة بـ .fos7ty-partner عشان مفيش تعارض مع الثيم.
   ========================================================= */

.fos7ty-partner {
	--fos7ty-p-primary: var(--fos7ty-primary, #004764);
	--fos7ty-p-secondary: var(--fos7ty-secondary, #007b8a);
	--fos7ty-p-cta: var(--fos7ty-cta, #d32f2f);
	--fos7ty-p-text: var(--fos7ty-text, #111111);
	--fos7ty-p-muted: var(--fos7ty-text-secondary, #555555);
	--fos7ty-p-border: var(--fos7ty-border, #e5e7eb);
	--fos7ty-p-bg: #f8fafb;
	--fos7ty-p-card: #ffffff;
	--fos7ty-p-success: var(--fos7ty-success, #10b981);
	--fos7ty-p-error: var(--fos7ty-error, #ef4444);
	--fos7ty-p-warning: var(--fos7ty-warning, #f59e0b);
	--fos7ty-p-radius: 12px;

	font-family: var(--fos7ty-font-body, inherit);
	color: var(--fos7ty-p-text);
	background: var(--fos7ty-p-bg);
	border: 1px solid var(--fos7ty-p-border);
	border-radius: var(--fos7ty-p-radius);
	padding: 22px;
	margin: 24px 0;
	box-sizing: border-box;
}

.fos7ty-partner *,
.fos7ty-partner *::before,
.fos7ty-partner *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */

.fos7ty-p-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.fos7ty-p-title {
	margin: 0 0 6px;
	font-family: var(--fos7ty-font-headings, inherit);
	font-size: 26px;
	line-height: 1.3;
	color: var(--fos7ty-p-primary);
}

.fos7ty-p-sub {
	margin: 0;
	color: var(--fos7ty-p-muted);
	font-size: 14px;
	line-height: 1.7;
}

.fos7ty-p-head-side {
	flex: 0 0 auto;
}

/* ---------- Notices ---------- */

.fos7ty-p-notice {
	border-radius: 10px;
	padding: 12px 14px;
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.8;
	border: 1px solid transparent;
}

.fos7ty-p-notice.is-success {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}

.fos7ty-p-notice.is-error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.fos7ty-p-inline-form {
	display: inline-block;
	margin-inline-start: 10px;
}

/* ---------- Tabs ---------- */

.fos7ty-p-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	border-bottom: 2px solid var(--fos7ty-p-border);
	margin-bottom: 18px;
}

.fos7ty-p-tab {
	display: inline-block;
	padding: 10px 16px;
	border: 1px solid transparent;
	border-bottom: 0;
	border-radius: 10px 10px 0 0;
	color: var(--fos7ty-p-muted);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.fos7ty-p-tab:hover {
	background: #eef4f7;
	color: var(--fos7ty-p-primary);
}

.fos7ty-p-tab.is-active {
	background: var(--fos7ty-p-card);
	border-color: var(--fos7ty-p-border);
	color: var(--fos7ty-p-primary);
	margin-bottom: -2px;
}

.fos7ty-p-tab-count {
	display: inline-block;
	min-width: 20px;
	padding: 0 6px;
	margin-inline-start: 6px;
	border-radius: 999px;
	background: #eef4f7;
	color: var(--fos7ty-p-primary);
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.fos7ty-p-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}

.fos7ty-p-switch-item {
	padding: 8px 14px;
	border: 1px solid var(--fos7ty-p-border);
	border-radius: 999px;
	background: #fff;
	color: var(--fos7ty-p-muted);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}

.fos7ty-p-switch-item.is-active {
	background: var(--fos7ty-p-primary);
	border-color: var(--fos7ty-p-primary);
	color: #fff;
}

/* ---------- Cards ---------- */

.fos7ty-p-card {
	background: var(--fos7ty-p-card);
	border: 1px solid var(--fos7ty-p-border);
	border-radius: var(--fos7ty-p-radius);
	padding: 20px;
}

.fos7ty-p-card + .fos7ty-p-card {
	margin-top: 16px;
}

.fos7ty-p-card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 14px;
}

.fos7ty-p-card-title {
	margin: 0 0 14px;
	font-family: var(--fos7ty-font-headings, inherit);
	font-size: 20px;
	color: var(--fos7ty-p-primary);
}

.fos7ty-p-card-title-small {
	font-size: 16px;
	margin: 18px 0 10px;
}

.fos7ty-p-sep {
	border: 0;
	border-top: 1px solid var(--fos7ty-p-border);
	margin: 20px 0;
}

.fos7ty-p-grid {
	display: grid;
	gap: 14px;
}

.fos7ty-p-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------- Fields ---------- */

.fos7ty-p-form {
	margin: 0;
}

.fos7ty-p-field {
	margin: 0 0 16px;
	border: 0;
	padding: 0;
	min-width: 0;
}

.fos7ty-p-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 6px;
	color: var(--fos7ty-p-text);
}

.fos7ty-p-input {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--fos7ty-p-text);
	background: #fff;
	border: 1px solid var(--fos7ty-p-border);
	border-radius: 8px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fos7ty-p-input:focus {
	outline: none;
	border-color: var(--fos7ty-p-secondary);
	box-shadow: 0 0 0 3px rgba(0, 123, 138, 0.15);
}

textarea.fos7ty-p-input {
	resize: vertical;
	min-height: 90px;
}

.fos7ty-p-help {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.8;
	color: var(--fos7ty-p-muted);
}

.fos7ty-p-help a {
	color: var(--fos7ty-p-secondary);
}

.fos7ty-p-checks {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
}

.fos7ty-p-checks .fos7ty-p-label {
	width: 100%;
	margin-bottom: 0;
}

.fos7ty-p-checks .fos7ty-p-help {
	width: 100%;
}

.fos7ty-p-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
}

.fos7ty-p-check input {
	margin: 0;
}

/* ---------- Buttons ---------- */

.fos7ty-p-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 18px;
	border-radius: 8px;
	border: 1px solid var(--fos7ty-p-border);
	background: #fff;
	color: var(--fos7ty-p-primary);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	line-height: 1.5;
}

.fos7ty-p-btn:hover {
	border-color: var(--fos7ty-p-secondary);
	color: var(--fos7ty-p-secondary);
}

.fos7ty-p-btn-primary {
	background: var(--fos7ty-p-primary);
	border-color: var(--fos7ty-p-primary);
	color: #fff;
}

.fos7ty-p-btn-primary:hover {
	background: var(--fos7ty-p-secondary);
	border-color: var(--fos7ty-p-secondary);
	color: #fff;
}

.fos7ty-p-btn-ghost {
	background: transparent;
	color: var(--fos7ty-p-muted);
}

.fos7ty-p-btn-danger {
	color: var(--fos7ty-p-error);
	border-color: #fecaca;
	background: #fff5f5;
}

.fos7ty-p-btn-small {
	padding: 6px 12px;
	font-size: 13px;
}

.fos7ty-p-actions {
	margin-top: 8px;
}

/* ---------- List ---------- */

.fos7ty-p-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.fos7ty-p-item {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	border: 1px solid var(--fos7ty-p-border);
	border-radius: 10px;
	padding: 14px;
	background: #fff;
}

.fos7ty-p-item-title {
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 1.5;
}

.fos7ty-p-item-meta {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--fos7ty-p-muted);
}

.fos7ty-p-item-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fos7ty-p-reason {
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	font-size: 13px;
	line-height: 1.8;
}

.fos7ty-p-empty {
	margin: 0;
	padding: 18px;
	text-align: center;
	color: var(--fos7ty-p-muted);
	background: #fbfcfd;
	border: 1px dashed var(--fos7ty-p-border);
	border-radius: 10px;
}

/* ---------- Badges ---------- */

.fos7ty-p-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.7;
	border: 1px solid transparent;
	white-space: nowrap;
}

.fos7ty-p-badge.is-pending {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}

.fos7ty-p-badge.is-approved {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}

.fos7ty-p-badge.is-rejected {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

/* ---------- Images ---------- */

.fos7ty-p-images {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 12px;
}

.fos7ty-p-image {
	display: block;
	width: 130px;
	border: 1px solid var(--fos7ty-p-border);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.fos7ty-p-image img {
	display: block;
	width: 100%;
	height: 90px;
	object-fit: cover;
}

.fos7ty-p-image-keep {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
	font-size: 11px;
	color: var(--fos7ty-p-muted);
	background: #fbfcfd;
	border-top: 1px solid var(--fos7ty-p-border);
}

.fos7ty-p-logo-preview img {
	max-width: 160px;
	height: auto;
	border-radius: 10px;
	border: 1px solid var(--fos7ty-p-border);
	display: block;
	margin-bottom: 10px;
}

/* ---------- Repeater (cars) ---------- */

.fos7ty-p-repeater {
	border: 1px solid var(--fos7ty-p-border);
	border-radius: 10px;
	padding: 12px;
	background: #fbfcfd;
	margin: 0 0 18px;
}

.fos7ty-p-repeater-rows {
	display: grid;
	gap: 10px;
	margin-bottom: 10px;
}

.fos7ty-p-repeater-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.2fr auto;
	gap: 8px;
	align-items: end;
	padding: 10px;
	background: #fff;
	border: 1px solid var(--fos7ty-p-border);
	border-radius: 8px;
}

.fos7ty-p-repeater-row .fos7ty-p-label {
	margin-bottom: 0;
	font-size: 12px;
}

.fos7ty-p-private {
	padding: 12px;
	border: 1px dashed #c7d2fe;
	background: #eef2ff;
	border-radius: 10px;
}

/* ---------- Login form ---------- */

.fos7ty-p-login form p {
	margin: 0 0 12px;
}

.fos7ty-p-login label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 6px;
}

.fos7ty-p-login input[type="text"],
.fos7ty-p-login input[type="password"],
.fos7ty-p-login input[type="email"] {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--fos7ty-p-border);
	border-radius: 8px;
	font-size: 14px;
}

.fos7ty-p-login input[type="submit"] {
	display: inline-flex;
	padding: 10px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--fos7ty-p-primary);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.fos7ty-p-login .login-remember label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
}

/* ---------- Responsive ---------- */

@media (max-width: 782px) {
	.fos7ty-partner {
		padding: 16px;
	}

	.fos7ty-p-grid-2 {
		grid-template-columns: 1fr;
	}

	.fos7ty-p-repeater-row {
		grid-template-columns: 1fr 1fr;
	}

	.fos7ty-p-item {
		flex-direction: column;
	}
}
