/* ==========================================================================
   VDA Realtor — Filter & Apartment Cards
   ========================================================================== */

/* Layout wrapper — brand palette derived from base #A4B222 + soft #A4B221 @ 45% */
.vda-filter-wrap {
	--vda-primary: #a4b222;
	--vda-primary-soft: rgba(164, 178, 33, 0.45);
	--vda-primary-ink: #2c330d;
	--vda-primary-faint: rgba(164, 178, 34, 0.08);
	--vda-primary-hover: rgba(164, 178, 34, 0.2);
	--vda-primary-wash: rgba(164, 178, 33, 0.14);
	/* Sale status badges — PROSTO / PRODANO / ZASEDENO */
	--vda-status-prodano: rgba(180, 114, 103, 0.75);
	--vda-status-zasedeno: #6b5a4a;

	display: flex;
	gap: 32px;
	align-items: flex-start;
}

/* -----------------------------------------------------------------------
   Sidebar
----------------------------------------------------------------------- */
.vda-filter-sidebar {
	--vda-filter-reset-bg: #fff;
	--vda-filter-reset-bg-hover: #f5f5f5;
	--vda-filter-reset-bg-active: #ebebeb;
	--vda-filter-reset-fg: #333;
	flex: 0 0 240px;
	background: var(--vda-primary);
	border-radius: 0;
	padding: 24px 20px 20px;
	position: sticky;
	top: 124px;
	font-family: 'Roboto', sans-serif;
	font-weight: 400;
}

.vda-filter-sidebar__title {
	color: #fff;
	font-size: 32px;
	line-height: 1.15;
	font-weight: 400;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, .3);
}

.vda-filter-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	align-items: stretch;
}

.vda-filter-field label {
	display: block;
	color: #fff;
	font-size: 16px;
	line-height: 1.25;
	font-weight: 400;
	margin-bottom: 8px;
	letter-spacing: 0;
}

.vda-filter-field select {
	width: 100%;
	box-sizing: border-box;
	min-height: 38px;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 0;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 400;
	color: #333;
	cursor: pointer;
	appearance: auto;
}

.vda-filter-field select:focus {
	outline: 2px solid var(--vda-primary-ink);
	outline-offset: 1px;
}

.vda-filter-reset {
	align-self: center;
	width: auto;
	min-width: min(100%, 12rem);
	margin-top: 10px;
	padding: 9px 32px;
	border: none;
	border-radius: 9999px;
	background-color: var(--vda-filter-reset-bg);
	color: #333 !important;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.25;
	font-weight: 400;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	transition:
		background-color .15s ease,
		box-shadow .15s ease,
		transform .1s ease;
}

.vda-filter-reset:hover {
	background-color: var(--vda-filter-reset-bg-hover);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

.vda-filter-reset:active {
	background-color: var(--vda-filter-reset-bg-active);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
	transform: translateY(1px);
}

.vda-filter-reset:focus:not(:focus-visible) {
	outline: none;
}

.vda-filter-reset:focus-visible {
	outline: 2px solid rgba(255, 255, 255, .8);
	outline-offset: 2px;
}

.vda-filter-reset:disabled {
	opacity: .5;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

/* -----------------------------------------------------------------------
   Results area
----------------------------------------------------------------------- */
.vda-filter-results {
	flex: 1;
	min-width: 0;
}

.vda-apartments-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
}

.vda-no-results {
	color: #666;
	font-size: 15px;
	padding: 40px 0;
}

/* -----------------------------------------------------------------------
   Apartment card
----------------------------------------------------------------------- */
.vda-apt-card {
	--vda-card-status-prosto: #abbc41;
	--vda-card-tag-bg: #e3ebc8;
	--vda-card-tag-ink: #2c330d;
	--vda-card-media-bg: #f5f5e9;
	/* Light wash matching PRODANO chip (same hue as rgb(180, 114, 103) / --vda-status-prodano) */
	--vda-card-media-bg-prodano: #f3e8e7;
	--vda-card-media-bg-prodano: color-mix(in srgb, rgb(180, 114, 103) 16%, #fff);

	background: #fff;
	border: 1px solid #ccc;
	border-radius: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
	display: flex;
	flex-direction: column;
	font-family: 'Roboto', sans-serif;
	font-weight: 400;
}

.vda-apt-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
	transform: translateY(-2px);
}

.vda-apt-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	color: inherit;
	text-decoration: none;
}

.vda-apt-card__link:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px var(--vda-primary);
}

.vda-apt-card__media {
	display: block;
	background: var(--vda-card-media-bg);
	padding: 12px;
	box-sizing: border-box;
}

.vda-apt-card__media--prodano {
	background: var(--vda-card-media-bg-prodano);
}

.vda-apt-card__media img {
	width: 100%;
	height: 200px;
	object-fit: contain;
	display: block;
}

.vda-apt-card__image-placeholder {
	width: 100%;
	height: 200px;
	background: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #bbb;
	font-size: 13px;
}

.vda-apt-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.vda-apt-card__head {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}

/* Status badge */
.vda-apt-card__status {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	margin: 0;
	text-align: center;
	white-space: nowrap;
}

.vda-apt-card .vda-status--prosto {
	background: var(--vda-card-status-prosto);
	color: #fff;
}

.vda-status--prosto {
	background: var(--vda-primary);
	color: #fff;
}

.vda-status--prodano {
	background: var(--vda-status-prodano);
	color: #fff;
}

.vda-status--zasedeno,
.vda-status--rezervirano {
	background: var(--vda-status-zasedeno);
	color: #fff;
}

/* Title */
.vda-apt-card__title {
	font-size: 1.35rem;
	font-weight: 400;
	margin: 0;
	line-height: 1.2;
	color: #222;
	flex: 1;
	min-width: 0;
	padding-right: 4px;
}

.vda-apt-card:hover .vda-apt-card__title {
	color: #111;
}

/* Tags */
.vda-apt-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.vda-apt-card__tag {
	background: var(--vda-card-tag-bg);
	color: var(--vda-card-tag-ink);
	border-radius: 9999px;
	padding: 5px 12px;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.35;
}

/* Area */
.vda-apt-card__area {
	font-size: 1.05rem;
	font-weight: 400;
	color: #222;
	margin: 0;
}

/* -----------------------------------------------------------------------
   Loading state
----------------------------------------------------------------------- */
.vda-filter-results.is-loading .vda-apartments-grid {
	opacity: .4;
	pointer-events: none;
	transition: opacity .2s;
}

/* -----------------------------------------------------------------------
   Responsive
----------------------------------------------------------------------- */
@media (max-width: 768px) {
	.vda-filter-wrap {
		flex-direction: column;
	}

	.vda-filter-sidebar {
		flex: none;
		width: 100%;
		position: static;
	}

	.vda-filter-form {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.vda-filter-reset {
		grid-column: 1 / -1;
	}
}

@media (max-width: 480px) {
	.vda-filter-form {
		grid-template-columns: 1fr;
	}
}
