/* آگهی‌یار - استایل عمومی */
.wdl-form, .wdl-archive, .wdl-my-listings, .wdl-single {
	direction: rtl;
	text-align: right;
	font-family: inherit;
}

/* ---------- فرم ثبت آگهی ---------- */
.wdl-form { max-width: 720px; margin: 0 auto; }
.wdl-field { margin-bottom: 16px; }
.wdl-field label { display: block; margin-bottom: 6px; font-weight: 600; }
.wdl-field input[type="text"],
.wdl-field input[type="number"],
.wdl-field input[type="file"],
.wdl-field select,
.wdl-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d7d7d7;
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
	background: #fff;
}
.wdl-field textarea { resize: vertical; }
.wdl-field-row { display: flex; gap: 16px; }
.wdl-field-row .wdl-field { flex: 1; }
.wdl-field-checkbox { display: flex; align-items: center; }
.wdl-field-checkbox label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin-top: 24px; }

.wdl-btn {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.wdl-btn-primary { background: #1a73e8; color: #fff; }
.wdl-btn-primary:hover { background: #1558b0; color: #fff; }
.wdl-btn-call { background: #2ecc71; color: #fff; margin-right: 8px; }

.wdl-notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.wdl-notice-warning { background: #fff8e1; border: 1px solid #ffe082; }
.wdl-note { color: #888; font-size: 13px; }

.wdl-phones-wrap { display: flex; flex-direction: column; gap: 8px; }
.wdl-phone-item { display: flex; align-items: center; gap: 8px; }
.wdl-phone-item .wdl-phone-input { flex: 1; }
.wdl-remove-phone {
	width: 24px; height: 24px; min-width: 24px; border-radius: 50%;
	background: #f1f1f1; color: #c0392b; display: flex; align-items: center; justify-content: center;
	cursor: pointer; font-size: 16px; line-height: 1;
}
.wdl-btn-add-phone {
	background: none; border: 1px dashed #1a73e8; color: #1a73e8;
	margin-top: 8px; padding: 6px 14px; font-size: 13px;
}
.wdl-btn-add-phone:hover { background: #f0f6ff; }

.wdl-location-row { display: flex; gap: 16px; flex: 1; }
.wdl-location-row select { flex: 1; }
.wdl-filters .wdl-location-row { display: contents; }

.wdl-website-link { color: #1a73e8; text-decoration: underline; }

.wdl-image-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.wdl-image-item { position: relative; width: 80px; height: 80px; }
.wdl-image-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.wdl-remove-image {
	position: absolute; top: -6px; left: -6px;
	background: #e74c3c; color: #fff; border-radius: 50%;
	width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
	cursor: pointer; font-size: 14px; line-height: 1;
}

/* ---------- لیست آگهی‌ها ---------- */
.wdl-filters {
	display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
	background: #f7f7f8; padding: 14px; border-radius: 10px;
}
.wdl-filters input, .wdl-filters select {
	padding: 8px 10px; border-radius: 6px; border: 1px solid #ddd; font-size: 13px;
}
.wdl-filters input[type="text"] { flex: 1; min-width: 180px; }

.wdl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
}
.wdl-card {
	display: block; text-decoration: none; color: inherit;
	border: 1px solid #ececec; border-radius: 10px; overflow: hidden;
	transition: box-shadow .2s, transform .2s;
	background: #fff;
}
.wdl-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.wdl-card-img { height: 150px; background-size: cover; background-position: center; background-color: #f0f0f0; }
.wdl-card-body { padding: 12px 14px; }
.wdl-card-title { font-size: 15px; margin: 0 0 8px; font-weight: 600; line-height: 1.4; }
.wdl-card-price { color: #1a73e8; font-weight: 700; margin: 0 0 6px; }
.wdl-card-meta { font-size: 12px; color: #888; margin: 0; }
.wdl-empty { grid-column: 1 / -1; text-align: center; padding: 40px; color: #999; }

.wdl-pagination { margin-top: 24px; display: flex; gap: 6px; justify-content: center; }
.wdl-pagination .page-numbers {
	padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; text-decoration: none; color: #333;
}
.wdl-pagination .page-numbers.current { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* ---------- صفحه تک‌آگهی ---------- */
.wdl-single { margin-top: 24px; }
.wdl-single-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.wdl-single-gallery img { width: 160px; height: 120px; object-fit: cover; border-radius: 8px; }
.wdl-single-info { background: #f7f7f8; padding: 16px; border-radius: 10px; }
.wdl-single-price { font-size: 20px; font-weight: 700; color: #1a73e8; margin-bottom: 10px; }
.wdl-contact { margin-top: 12px; }

/* ---------- پنل آگهی‌های من ---------- */
.wdl-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.wdl-table th, .wdl-table td { padding: 10px; border-bottom: 1px solid #eee; text-align: right; font-size: 14px; }
.wdl-status { padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.wdl-status-publish { background: #e3f8e6; color: #1e8e3e; }
.wdl-status-pending { background: #fff4d6; color: #b7830a; }
.wdl-status-wdl_rejected { background: #fde3e3; color: #c0392b; }
.wdl-status-wdl_expired { background: #ececec; color: #777; }

@media (max-width: 600px) {
	.wdl-field-row { flex-direction: column; }
	.wdl-filters { flex-direction: column; }
}
