/**
 * SummitAvto Live Cars — plugin stylesheet.
 *
 * This is the right place to add any extra custom CSS for the plugin's pages (the archive
 * at /rabljena-vozila/celotna-ponudba/ and the single car pages) — just add your own rules
 * at the bottom. It's enqueued on both pages via wp_enqueue_style() in render-archive.php
 * and render-single.php.
 */

/*
 * The theme's real "Filter Everything" widget (aside#secondary) still renders on these
 * pages because get_header() pulls in the theme header/sidebar registration regardless of
 * what's being shown — but since this plugin bypasses WordPress's normal archive query,
 * that widget has no real query to read taxonomy terms from and shows an empty/broken
 * "There are no terms yet" state. Our own filter bar (.savc-filters-bar, built from the
 * live API data) fully replaces it, so we hide the broken one rather than let it show.
 */
aside#secondary {
	visibility: hidden !important;
	height: 0px !important;
	pointer-events: none !important;
	margin: 0 !important;
	overflow: hidden !important;
}

/*
 * Filter bar styling — written entirely from scratch, on our own "savc-" classes.
 *
 * An earlier version reused the real Filter Everything plugin's own classes
 * (wpc-filters-widget-select, wpc-filters-submit-button, ...) to get its button/select
 * styling for free. That backfired: Filter Everything is still active site-wide, and its
 * own JS binds to elements by those same class names wherever they appear on the page, not
 * just inside its own widget instance. That meant choosing a brand in our dropdown could
 * get intercepted by Filter Everything's own handler — which expects ITS numeric term IDs,
 * not our plain "BMW"/"Ford" strings — and sent to a broken "...undefined" URL instead of
 * running our filtering (found live 2026-09-18). Every class/ID in this plugin's markup is
 * now unique to it (the "savc-" prefix), so nothing else on the site can attach to it.
 */
.savc-filters-bar {
	margin: 20px 0 30px;
}
.savc-filters-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.savc-filter-field {
	flex: 0 1 auto;
}
.savc-select {
	min-width: 200px;
	padding: 10px 14px;
	border: 1px solid #d7dbe0;
	border-radius: 2px;
	background: #fff;
	font-size: 15px;
	color: #1b2733;
}
.savc-filter-actions {
	display: flex;
	gap: 10px;
	margin-left: auto;
}
.savc-btn {
	display: inline-block;
	padding: 12px 22px;
	border: none;
	border-radius: 2px;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	text-decoration: none;
	cursor: pointer;
	text-align: center;
}
/* #68C8C6 matches the teal already used elsewhere on the site (e.g. the "kot_novo" /
   PRODANO ribbon color in render-card.php), so these buttons look native rather than
   introducing a new accent color. */
.savc-btn--primary {
	background: #68c8c6;
	color: #fff;
}
.savc-btn--primary:hover {
	background: #56b6b4;
	color: #fff;
}
.savc-btn--secondary {
	background: #1b2733;
	color: #fff;
}
.savc-btn--secondary:hover {
	background: #0e161e;
	color: #fff;
}
.savc-post-count {
	display: block;
	margin: 0 0 16px;
}

/*
 * The theme's own .page-header collapses to 0 height on every page (its H1 is
 * position:absolute, so it never contributes height to its parent) — that's normal and
 * harmless on the real archive page because the real Filter Everything widget sits
 * further up the DOM, outside #primary, and pushes everything below it down before this
 * collapse ever matters. Our filter bar lives right after .page-header instead (so it's
 * visually "on top", as asked), which means without this rule it would render starting at
 * the exact same y-position as the (absolutely positioned) title text and overlap it.
 * This just reserves the vertical space the title actually occupies so our bar lands
 * cleanly below it, matching the real page's visual result even though the DOM path here
 * is different.
 */
header.page-header {
	min-height: 120px;
}

/* Add your own custom overrides below this line. */
