/* Hirdetések – Jófogás klón, témailleszkedő */

.hirdetesek-wrapper {
	--hird-bg: var(--3d-panel, var(--wp--preset--color--background, color-mix(in srgb, currentColor 7%, transparent)));
	--hird-border: var(--3d-border, var(--wp--preset--color--border, currentColor));
	--hird-text: var(--3d-text, var(--wp--preset--color--foreground, inherit));
	--hird-muted: var(--3d-muted, var(--wp--preset--color--secondary, inherit));
	--hird-accent: var(--3d-accent, var(--wp--preset--color--primary, #2d5a38));
	--hird-accent-hover: var(--3d-accent-hover, #3a7045);
	--hird-radius: var(--3d-radius, 0.5rem);
	--hird-font: var(--font-body, var(--wp--preset--font-family--body, inherit));
	--hird-max: var(--content-max, min(1320px, 96vw));

	max-width: var(--hird-max);
	margin: 0 auto;
	padding: clamp(1rem, 4vw, 1.5rem);
	font-family: var(--hird-font);
	color: var(--hird-text);
}

.hirdetesek-filters {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--hird-bg);
	border: 1px solid var(--hird-border);
	border-radius: var(--hird-radius);
}

.hirdetesek-filter-form .hirdetesek-filter-row {
	margin-bottom: 0.75rem;
}

.hirdetesek-filter-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.9em;
}

.hirdetesek-filter-form input[type="search"],
.hirdetesek-filter-form input[type="number"],
.hirdetesek-filter-form select {
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--hird-border);
	border-radius: 0.375rem;
	background: color-mix(in srgb, currentColor 8%, transparent);
	color: var(--hird-text);
	font-family: var(--hird-font);
	width: 100%;
	max-width: 200px;
}

.hirdetesek-filter-actions { margin-top: 0.5rem; margin-bottom: 0; }

.hirdetesek-btn {
	display: inline-block;
	padding: 0.5rem 1.25rem;
	background: var(--hird-accent);
	color: #022c22;
	border: none;
	border-radius: 0.375rem;
	font-family: var(--hird-font);
	font-size: 1em;
	cursor: pointer;
}
.hirdetesek-btn:hover { background: var(--hird-accent-hover); }

.hirdetesek-btn-secondary {
	background: transparent;
	color: var(--hird-accent);
	border: 1px solid var(--hird-border);
}
.hirdetesek-btn-secondary:hover {
	background: rgba(148,163,184,0.12);
}

.hirdetesek-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
}

.hirdetesek-card {
	margin: 0;
}

.hirdetesek-card-link {
	display: block;
	background: var(--hird-bg);
	border: 1px solid var(--hird-border);
	border-radius: var(--hird-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.hirdetesek-card-link:hover {
	border-color: var(--hird-accent);
	box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.hirdetesek-card--featured .hirdetesek-card-link {
	border-color: var(--3d-border-strong, var(--hird-accent));
	box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 30px var(--3d-glow, rgba(0,255,128,0.2));
	position: relative;
}

.hirdetesek-card--featured-top .hirdetesek-card-link {
	border-color: #f97316;
	box-shadow: 0 0 0 1px rgba(248,250,252,0.8), 0 14px 40px rgba(249,115,22,0.35);
}

.hirdetesek-badge-featured {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	background: linear-gradient(135deg, var(--hird-accent), #ffd700);
	color: #111;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.hirdetesek-badge-featured-top {
	background: linear-gradient(135deg, #f97316, #facc15);
}

.hirdetesek-card-image {
	display: block;
	padding-top: 75%;
	background: var(--3d-deep, #1a1a1a) center/cover no-repeat;
}

.hirdetesek-card-title {
	display: block;
	padding: 0.75rem 1rem 0;
	font-weight: 600;
	line-height: 1.3;
}

.hirdetesek-card-price {
	display: block;
	padding: 0.35rem 1rem 0;
	font-weight: 600;
	color: var(--hird-accent);
}

.hirdetesek-card-location {
	display: block;
	padding: 0.25rem 1rem 0.75rem;
	font-size: 0.85em;
	color: var(--hird-muted);
}

.hirdetesek-pagination {
	margin-top: 1.5rem;
	text-align: center;
}
.hirdetesek-pagination a,
.hirdetesek-pagination span {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	margin: 0 0.15rem;
	border: 1px solid var(--hird-border);
	border-radius: 0.25rem;
	text-decoration: none;
	color: var(--hird-text);
}
.hirdetesek-pagination a:hover { border-color: var(--hird-accent); background: var(--hird-bg); }
.hirdetesek-pagination .current { background: var(--hird-accent); color: #fff; border-color: var(--hird-accent); }

.hirdetesek-empty { padding: 2rem; text-align: center; color: var(--hird-muted); }

/* Új hirdetés űrlap */
.hirdetesek-form-wrapper .hirdetesek-form {
	background: var(--hird-bg);
	border: 1px solid var(--hird-border);
	border-radius: var(--hird-radius);
	padding: 1.5rem 1.75rem;
	margin-bottom: 1rem;
}

.hirdetesek-field {
	margin-bottom: 1rem;
}
.hirdetesek-field label { display: block; margin-bottom: 0.3rem; }
.hirdetesek-field .required { color: var(--hird-accent); }
.hirdetesek-field input[type="text"],
.hirdetesek-field input[type="email"],
.hirdetesek-field input[type="number"],
.hirdetesek-field input[type="file"],
.hirdetesek-field select,
.hirdetesek-field textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--hird-border);
	border-radius: 0.375rem;
	background: color-mix(in srgb, currentColor 8%, transparent);
	color: var(--hird-text);
	font-family: var(--hird-font);
	box-sizing: border-box;
}
.hirdetesek-field textarea { min-height: 120px; resize: vertical; }
.hirdetesek-submit { margin-top: 1rem; margin-bottom: 0; }
.hirdetesek-msg.hirdetesek-error { padding: 0.75rem; background: color-mix(in srgb, red 15%, transparent); border-radius: 0.375rem; margin-bottom: 1rem; }
.hirdetesek-msg.hirdetesek-ok { padding: 0.75rem; background: color-mix(in srgb, var(--hird-accent, green) 20%, transparent); border-radius: 0.375rem; margin-bottom: 1rem; }
.hirdetesek-actions { margin-bottom: 1rem; }
.hirdetesek-back { margin-bottom: 1rem; }
.hirdetesek-back a { color: var(--hird-accent); text-decoration: none; }
.hirdetesek-back a:hover { text-decoration: underline; }

/* Egy hirdetés oldal */
.hirdetesek-single-main { max-width: var(--hird-max, 800px); margin: 0 auto; padding: clamp(1rem, 4vw, 1.5rem); font-family: var(--hird-font); }
.hirdetesek-single-header { margin-bottom: 1.25rem; }
.hirdetesek-single-title { margin: 0 0 0.5rem; font-size: 1.5rem; }
.hirdetesek-single-cat,
.hirdetesek-single-location { display: inline-block; margin-right: 1rem; font-size: 0.9em; color: var(--hird-muted); }
.hirdetesek-single-price { margin: 0.5rem 0 0; font-size: 1.25rem; font-weight: 600; color: var(--hird-accent); }
.hirdetesek-single-gallery { margin-bottom: 1.5rem; }
.hirdetesek-single-gallery img { max-width: 100%; height: auto; display: block; margin-bottom: 0.5rem; border-radius: var(--hird-radius, 0.5rem); }
.hirdetesek-single-content { margin-bottom: 1.5rem; line-height: 1.6; }
.hirdetesek-single-contact { padding-top: 1rem; border-top: 1px solid var(--hird-border); }
.hirdetesek-single-contact a { color: var(--hird-accent); }

.hirdetesek-footer-credit {
	margin-top: 1.5rem;
	padding-top: 1rem;
	font-size: 0.85em;
	color: var(--hird-muted);
}
.hirdetesek-footer-credit a { color: var(--hird-muted); text-decoration: none; }
.hirdetesek-footer-credit a:hover { color: var(--hird-accent); }

/* Saját fiók */
.hirdetesek-account-wrapper {
	display: block;
}
.hirdetesek-account-summary {
	margin-bottom: 2rem;
	background: var(--hird-bg);
	border-radius: var(--hird-radius);
	border: 1px solid var(--hird-border);
	padding: 1.5rem 1.75rem;
}
.hirdetesek-account-stats {
	list-style: none;
	margin: 0.75rem 0 1rem;
	padding: 0;
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
}
.hirdetesek-account-stats li {
	font-size: 0.95rem;
	color: var(--hird-muted);
}
.hirdetesek-account-tips {
	font-size: 0.85rem;
	color: var(--hird-muted);
	margin: 0 0 1rem;
}
.hirdetesek-account-list h3 {
	margin: 0 0 0.75rem;
}
.hirdetesek-account-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--hird-bg);
	border-radius: var(--hird-radius);
	overflow: hidden;
	font-size: 0.9rem;
}
.hirdetesek-account-table th,
.hirdetesek-account-table td {
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid var(--hird-border);
	vertical-align: top;
}
.hirdetesek-account-table th {
	background: color-mix(in srgb, currentColor 4%, transparent);
	text-align: left;
	font-weight: 600;
}
.hirdetesek-account-table tr:last-child td {
	border-bottom: none;
}
.hirdetesek-account-link {
	font-size: 0.85rem;
	color: var(--hird-accent);
}
.hirdetesek-account-link:hover {
	text-decoration: underline;
}
.hirdetesek-status-ok {
	color: #16a34a;
	font-weight: 600;
}
.hirdetesek-status-pending {
	color: #b45309;
	font-weight: 500;
}
.hirdetesek-status-draft {
	color: var(--hird-muted);
}

/* Üzenet a hirdetőnek panel */
.hirdetesek-msg-panel {
	margin-top: 1rem;
	margin-bottom: 1rem;
	padding: 1rem 1.25rem;
	border-radius: var(--hird-radius-sm);
	background: color-mix(in srgb, currentColor 4%, transparent);
	border: 1px solid var(--hird-border);
}
.hirdetesek-msg-tip {
	font-size: 0.8rem;
	color: var(--hird-muted);
	margin: 0 0 0.75rem;
}
.hirdetesek-msg-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--hird-border);
	border-radius: 0.375rem;
	background: color-mix(in srgb, currentColor 6%, transparent);
	color: var(--hird-text);
	font-family: var(--hird-font);
	box-sizing: border-box;
	resize: vertical;
	min-height: 100px;
}


@media (min-width: 768px) {
	/* Lista oldal: baloldali szűrő + jobb oldali hirdetések */
	.hirdetesek-wrapper {
		display: grid;
		grid-template-columns: 260px minmax(0, 1fr);
		gap: 1.5rem;
		align-items: flex-start;
	}
	.hirdetesek-filters {
		grid-column: 1 / 2;
	}
	.hirdetesek-list {
		grid-column: 2 / -1;
	}
	/* Új hirdetés feladása / űrlap: teljes szélesség, ne legyen bal oldali hasáb */
	.hirdetesek-form-wrapper.hirdetesek-wrapper {
		display: block;
		max-width: var(--hird-max);
	}
}
