/*
 * Aqar Manager - أنماط الواجهة الأمامية.
 * الأنماط بادئتها "aqar-" حصراً لتجنّب أي تعارض مع أنماط القالب أو إضافات أخرى.
 * التصميم يفترض اتجاه RTL (right-to-left) بشكل افتراضي.
 */

.aqar-wrapper {
	direction: rtl;
	text-align: right;
	max-width: 960px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.7;
}

/* ===== تنبيهات ===== */
.aqar-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 20px;
	border: 1px solid transparent;
}
.aqar-notice ul { margin: 0; padding-inline-start: 20px; }
.aqar-notice-error {
	background: #fdecea;
	border-color: #f5c2c0;
	color: #8a1f1a;
}
.aqar-notice-success {
	background: #eafaf0;
	border-color: #b7ebc9;
	color: #14532d;
}

/* ===== نماذج ===== */
.aqar-form-title { margin-bottom: 10px; }
.aqar-form-section { margin-bottom: 28px; }
.aqar-form-section-title {
	font-size: 1.05em;
	margin-bottom: 12px;
	padding-bottom: 6px;
	border-bottom: 1px solid #e5e5e5;
}
.aqar-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}
.aqar-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.aqar-field-wide { grid-column: 1 / -1; }
.aqar-field label { font-weight: 600; font-size: 0.92em; }
.aqar-field input[type="text"],
.aqar-field input[type="email"],
.aqar-field input[type="url"],
.aqar-field input[type="number"],
.aqar-field input[type="password"],
.aqar-field input[type="file"],
.aqar-field select,
.aqar-field textarea {
	padding: 10px 12px;
	border: 1px solid #d5d5d5;
	border-radius: 6px;
	font-size: 1em;
	width: 100%;
	box-sizing: border-box;
}
.aqar-field-checkbox { flex-direction: row; align-items: center; }
.aqar-field-checkbox label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.aqar-field-hint,
.aqar-field-note {
	font-size: 0.85em;
	color: #777;
}
.aqar-form-footnote { margin-top: 14px; font-size: 0.95em; }
.aqar-actions { margin-top: 8px; }

.aqar-btn {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 6px;
	background: #1a7a4c;
	color: #fff;
	text-decoration: none;
	border: none;
	cursor: pointer;
	font-size: 1em;
}
.aqar-btn:hover { background: #15613c; color: #fff; }
.aqar-btn-primary { background: #1a7a4c; }
.aqar-btn-small { padding: 6px 14px; font-size: 0.85em; }
.aqar-btn-danger { background: #c0392b; }
.aqar-btn-danger:hover { background: #992d22; }

/* ===== زر واتساب / رابط تسويق ===== */
.aqar-whatsapp-button,
.aqar-marketing-link-button {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	color: #fff;
}
.aqar-whatsapp-button { background: #25d366; }
.aqar-whatsapp-button:hover { background: #1cb355; color: #fff; }
.aqar-marketing-link-button { background: #1a7a4c; }
.aqar-marketing-link-button:hover { background: #15613c; color: #fff; }

/* ===== صفحة العقار المفردة ===== */
.aqar-single-title { margin-bottom: 14px; }
.aqar-single-thumb img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 16px; }
.aqar-single-info-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.aqar-single-info-table th,
.aqar-single-info-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
	text-align: right;
}
.aqar-single-info-table th { width: 40%; color: #555; font-weight: 600; }
.aqar-single-price { font-size: 1.2em; font-weight: 700; color: #1a7a4c; }
.aqar-single-content { margin-bottom: 20px; }

.aqar-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	margin-bottom: 20px;
}
.aqar-gallery-item img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; }

.aqar-single-whatsapp-cta { text-align: center; margin-top: 20px; }

/* ===== أرشيف/شبكة العقارات ===== */
.aqar-page-title { margin-bottom: 20px; }
.aqar-properties-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}
.aqar-property-card {
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.aqar-card-thumb { position: relative; display: block; }
.aqar-card-thumb img { width: 100%; height: 170px; object-fit: cover; display: block; }
.aqar-card-purpose-badge {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	background: rgba(26, 122, 76, 0.92);
	color: #fff;
	font-size: 0.78em;
	padding: 3px 10px;
	border-radius: 4px;
}
.aqar-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.aqar-card-title { font-size: 1.05em; margin: 0; }
.aqar-card-title a { color: inherit; text-decoration: none; }
.aqar-card-price { font-weight: 700; color: #1a7a4c; margin: 0; }
.aqar-card-city,
.aqar-card-specs { font-size: 0.9em; color: #666; margin: 0; }
.aqar-card-meta {
	display: flex;
	justify-content: space-between;
	font-size: 0.8em;
	color: #999;
	margin-top: 6px;
}
.aqar-no-thumb { display: block; height: 170px; background: #f2f2f2; }

/* حقول تُلحَق تلقائياً بالمحتوى داخل حلقات القالب العامة (المدونة/التصنيفات). */
.aqar-loop-fields { margin-top: 10px; }
.aqar-loop-price { font-weight: 700; color: #1a7a4c; margin: 4px 0; }
.aqar-loop-city { font-size: 0.9em; color: #666; margin: 0 0 6px; }

.aqar-pagination { margin-top: 24px; text-align: center; }
.aqar-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 2px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	color: inherit;
}
.aqar-pagination .page-numbers.current { background: #1a7a4c; color: #fff; border-color: #1a7a4c; }

.aqar-empty { color: #777; padding: 20px 0; }

/* ===== لوحة تحكم العضو ===== */
.aqar-dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}
.aqar-dashboard-subtitle { margin-top: 32px; margin-bottom: 14px; }
.aqar-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 12px;
	margin-bottom: 24px;
}
.aqar-stat-box {
	text-align: center;
	padding: 16px 10px;
	border: 1px solid #eee;
	border-radius: 8px;
}
.aqar-stat-number { display: block; font-size: 1.6em; font-weight: 700; color: #1a7a4c; }
.aqar-stat-label { font-size: 0.85em; color: #777; }

.aqar-dashboard-table { width: 100%; border-collapse: collapse; }
.aqar-dashboard-table th,
.aqar-dashboard-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
	text-align: right;
}
.aqar-dashboard-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.aqar-status-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 0.8em;
}
.aqar-status-publish { background: #eafaf0; color: #14532d; }
.aqar-status-pending { background: #fff8e1; color: #8a6d1a; }
.aqar-status-draft { background: #f0f0f0; color: #555; }

/* استجابة الجدول على الشاشات الصغيرة */
@media (max-width: 640px) {
	.aqar-dashboard-table thead { display: none; }
	.aqar-dashboard-table, .aqar-dashboard-table tbody, .aqar-dashboard-table tr, .aqar-dashboard-table td { display: block; width: 100%; }
	.aqar-dashboard-table tr { margin-bottom: 14px; border: 1px solid #eee; border-radius: 6px; padding: 8px; }
	.aqar-dashboard-table td { border: none; padding: 6px 8px; }
	.aqar-dashboard-table td::before { content: attr(data-label); font-weight: 600; display: block; font-size: 0.8em; color: #999; }
}

.aqar-hp-wrap { position: absolute; left: -9999px; top: -9999px; }
