/* ============================================================
   PLAIN-LANGUAGE OVERVIEW (for future editing, by anyone)
   ============================================================
   This file controls ALL visual styling for the filter and results
   grid: colors, spacing, fonts, card shape. It does NOT control
   what shows or the filter logic — that's in veiklos-filter.php.

   BRAND COLORS USED BELOW (for quick reference):
   #000000 = black          #F7F5F2 = warm off-white
   #FEF74D = primary yellow #590B1D = deep burgundy
   #FFFDAB = soft yellow, used only for card/dropdown shadows
   #EFEDE8 = light border grey (not an official brand color,
             used only for subtle dividing lines)

   WANT SQUARE VS ROUNDED CARDS?
   Look for "border-radius: 0;" under ".vf-card" below.
   Change to e.g. "border-radius: 8px;" for rounded corners.
   ============================================================ */

.vf-filter-wrap {
	font-family: 'Figtree', sans-serif;
}

.vf-filter-wrap * {
	font-family: 'Figtree', sans-serif;
}

/* Top row: search box + all filter dropdowns, sitting side by side */
.vf-filter-top-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 40px;
}

.vf-search-group {
	position: relative;
	flex: 1 1 220px;
	min-width: 200px;
}

.vf-search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 40px 12px 16px;
	border: 1px solid #EFEDE8;
	border-radius: 4px;
	background: #FFFFFF;
	font-size: 14px;
	font-family: inherit;
	color: #000000;
	outline: none;
	box-shadow: none;
}

.vf-search-input:hover {
	border-color: #590B1D;
}

.vf-search-input:focus {
	outline: none;
	border: 1px solid #590B1D;
	box-shadow: none;
}

/* "x" button that clears the search box, only shown once text is typed */
.vf-search-clear {
	display: none;
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	border: none;
	background: transparent;
	color: #590B1D;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.vf-search-clear:hover {
	color: #000000;
}

.vf-search-group.vf-has-text .vf-search-clear {
	display: block;
}

/* --- Dropdown filter (one per taxonomy, e.g. Vieta, Trukme) --- */

.vf-dropdown {
	position: relative;
}

.vf-dropdown-toggle {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	border: 1px solid #EFEDE8;
	border-radius: 4px;
	background: #F7F5F2;
	cursor: pointer;
	font-size: 14px;
	font-family: inherit;
	color: #000000;
	white-space: nowrap;
}

.vf-dropdown-toggle:hover {
	border-color: #590B1D;
}

/* Highlighted state when at least one option is checked inside this dropdown */
.vf-dropdown.vf-has-selection .vf-dropdown-toggle {
	border-color: #590B1D;
	background: #F7F5F2;
}

/* Small round number badge showing how many options are selected */
.vf-dropdown-count {
	display: none; /* Positioned over the arrow: never affects button width. */
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	box-sizing: border-box;
	pointer-events: none;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #590B1D;
	color: #F7F5F2;
	font-size: 11px;
	font-weight: 600;
}

.vf-dropdown-arrow {
	font-size: 11px;
	margin-left: 2px;
}

/* The panel of checkboxes that appears below the dropdown button when opened */
.vf-dropdown-panel {
	display: none; /* JS switches this to "flex" when the dropdown is open */
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 20;
	min-width: 220px;
	max-height: 280px;
	overflow-y: auto;
	padding: 12px;
	background: #FFFFFF;
	border: 1px solid #EFEDE8;
	border-radius: 4px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.vf-dropdown.vf-dropdown-open .vf-dropdown-panel {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.vf-filter-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
}

.vf-filter-option:hover {
	background: #F7F5F2;
}

.vf-filter-option input[type="checkbox"] {
	accent-color: #590B1D;
	width: 14px;
	height: 14px;
	margin: 0;
	flex-shrink: 0;
}

/* Reset link: looks like plain text with an icon, not a button.
   Sits inline with the search box and dropdowns. */
.vf-reset-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 12px 4px;
	border: none;
	background: transparent;
	color: #590B1D;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	white-space: nowrap;
}

.vf-reset-link:hover {
	color: #000000;
	text-decoration: underline;
}

.vf-reset-icon {
	font-size: 15px;
	line-height: 1;
}

/* --- Results grid (the activity cards) --- */

.vf-results {
	transition: opacity 0.15s ease;
}

/* Dims the grid slightly while a new filter/search request is loading */
.vf-results.vf-loading {
	opacity: 0.4;
}

.vf-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.vf-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 0; /* squared corners — change this value for rounded corners */
	overflow: hidden;
	background: #FFFFFF;
	border: 1px solid #EFEDE8;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vf-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px #FFFDAB;
}

.vf-card-image {
	aspect-ratio: 4 / 3;
	background: #EFEDE8;
	overflow: hidden;
}

.vf-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vf-card-body {
	padding: 16px;
}

.vf-card-title {
	font-weight: 600;
	font-size: 16px;
	color: #000000;
	margin-bottom: 6px;
}

/* The one-sentence description, pulled from each activity's Excerpt field */
.vf-card-excerpt {
	font-size: 14px;
	line-height: 1.4;
	color: #000000;
}

.vf-no-results {
	padding: 40px 0;
	text-align: center;
	color: #000000;
}

/* "Rodoma X iš Y veiklų" (Showing X of Y activities) counter, sits
   directly above the results grid. */
.vf-results-count {
	margin: 0 0 16px 0;
	font-size: 14px;
	color: #000000;
}

/* "Rodyti daugiau" (Load more) button, shown below the grid when there
   are more activities than fit in the current batch. Matches the same
   border/hover treatment as the filter dropdown buttons for consistency. */
.vf-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

.vf-load-more {
	padding: 12px 32px;
	border: 1px solid #EFEDE8;
	border-radius: 4px;
	background: #F7F5F2;
	color: #000000;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
}

.vf-load-more:hover {
	border-color: #590B1D;
}

/* Keep the original arrow slot in the layout when a count replaces it. */
.vf-has-selection .vf-dropdown-arrow { visibility: hidden; }
.vf-error { color: #590B1D; margin: 0 0 16px; }
.vf-error button { margin-left: 12px; }
.vf-load-more:disabled { opacity: .5; cursor: wait; }

/* Theme overrides: one brand border in every search state. */
.vf-filter-wrap input.vf-search-input,
.vf-filter-wrap input.vf-search-input:hover,
.vf-filter-wrap input.vf-search-input:focus,
.vf-filter-wrap input.vf-search-input:focus-visible,
.vf-filter-wrap input.vf-search-input:active {
 border: 1px solid #590B1D !important;
 box-shadow: none !important;
 outline: none !important;
}
/* Inset focus indication preserves the same border colour and dimensions. */
.vf-filter-wrap input.vf-search-input:focus-visible {
 box-shadow: inset 0 0 0 1px #590B1D !important;
}
.vf-sr-only {
 position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
 overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
