/**
 * Brighton Filter Listing – front-end styles.
 */

:root {
	--bfl-accent: #4adeb3;
	--bfl-accent-dark: #3bc9a0;
	--bfl-text: #111111;
	--bfl-muted: #6b6b6b;
	--bfl-border: #d9d9d9;
	--bfl-radius: 999px;
	--bfl-card-radius: 12px;
	--bfl-filter-font: Georgia, "Times New Roman", Times, serif;
}

.bfl-filters,
.bfl-tags,
.bfl-listings,
.bfl-header {
	color: var(--bfl-text);
	font-family: inherit;
}

.bfl-filters,
.bfl-tags {
	font-family: var(--bfl-filter-font);
}

/* Category sidebar */
.bfl-filters__more {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 12px 20px;
	border: 1px solid var(--bfl-accent);
	border-radius: var(--bfl-radius);
	background: #fff;
	color: var(--bfl-text);
	cursor: pointer;
	margin-bottom: 28px;
	font: inherit;
	font-family: var(--bfl-filter-font);
	font-size: 16px;
	line-height: 1.2;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bfl-filters__more:hover {
	background: rgba(74, 222, 179, 0.08);
}

.bfl-filters__more-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--bfl-text);
}

.bfl-filters__groups {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.bfl-filters__group {
	border-bottom: 1px solid #eeeeee;
}

.bfl-filters__group:last-child {
	border-bottom: 0;
}

.bfl-filters__group-toggle {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 18px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	font: inherit;
	font-family: var(--bfl-filter-font);
	font-size: 17px;
	font-weight: 700;
	text-align: left;
	color: var(--bfl-text);
}

.bfl-filters__cat-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	flex-shrink: 0;
}

.bfl-filters__cat-img {
	display: block;
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.bfl-filters__cat-fa {
	font-size: 20px;
	line-height: 1;
	width: 24px;
	text-align: center;
}

.bfl-filters__cat-fallback {
	display: block;
	width: 18px;
	height: 18px;
	border: 1.5px solid #bdbdbd;
	border-radius: 50%;
}

.bfl-filters__group-label {
	flex: 1;
	line-height: 1.25;
}

.bfl-filters__group-toggle-icon {
	position: relative;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.bfl-filters__group-toggle-icon::before,
.bfl-filters__group-toggle-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: var(--bfl-text);
	transform: translate(-50%, -50%);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.bfl-filters__group-toggle-icon::before {
	width: 14px;
	height: 1.5px;
}

.bfl-filters__group-toggle-icon::after {
	width: 1.5px;
	height: 14px;
}

.bfl-filters__group.is-open .bfl-filters__group-toggle-icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
	opacity: 0;
}

.bfl-filters__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.bfl-filters__group.is-open .bfl-filters__panel {
	grid-template-rows: 1fr;
}

.bfl-filters__options {
	overflow: hidden;
	min-height: 0;
	list-style: none;
	margin: 0;
	padding: 0 0 18px 42px;
	background: #fff;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.bfl-filters__group.is-open .bfl-filters__options {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.bfl-filters__panel,
	.bfl-filters__options,
	.bfl-filters__group-toggle-icon::before,
	.bfl-filters__group-toggle-icon::after {
		transition: none;
	}
}

.bfl-filters__option {
	margin: 0;
	padding: 0;
}

.bfl-filters__option-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 7px 0;
	cursor: pointer;
	font-size: 16px;
	line-height: 1.35;
	color: var(--bfl-text);
	transition: color 0.15s ease;
}

.bfl-filters__option-label:hover {
	color: var(--bfl-accent-dark);
}

/* Hide native checkbox; use custom square */
.bfl-filters__checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.bfl-filters__check {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	border: 1px solid #bdbdbd;
	border-radius: 2px;
	background: #fff;
	position: relative;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bfl-filters__check::after {
	content: "";
	position: absolute;
	top: 1px;
	left: 4px;
	width: 5px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform 0.15s ease;
}

.bfl-filters__checkbox:checked + .bfl-filters__check {
	background: var(--bfl-accent);
	border-color: var(--bfl-accent);
}

.bfl-filters__checkbox:checked + .bfl-filters__check::after {
	transform: rotate(45deg) scale(1);
}

.bfl-filters__checkbox:checked ~ .bfl-filters__label,
.bfl-filters__option.is-active .bfl-filters__label {
	color: var(--bfl-accent-dark);
}

.bfl-filters__label {
	flex: 1;
}

.bfl-filters__search {
	margin-top: 28px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.bfl-filters__search-field {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 20px;
	border: 1px solid var(--bfl-border);
	border-radius: var(--bfl-radius);
	background: #fff;
	min-height: 52px;
}

.bfl-filters__search-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 18px;
	color: var(--bfl-muted);
	font-size: 22px;
	font-weight: 300;
	line-height: 1;
}

.bfl-filters__search-input {
	flex: 1;
	width: 100%;
	border: 0;
	background: transparent;
	color: var(--bfl-text);
	font: inherit;
	font-family: var(--bfl-filter-font);
	font-size: 16px;
	line-height: 1.2;
	padding: 14px 0;
	outline: none;
}

.bfl-filters__search-input::placeholder {
	color: #9a9a9a;
	opacity: 1;
}

.bfl-filters__search-button {
	display: block;
	width: 100%;
	padding: 16px 24px;
	border: 0;
	border-radius: 16px;
	background: var(--bfl-accent);
	color: var(--bfl-text);
	cursor: pointer;
	font: inherit;
	font-family: var(--bfl-filter-font);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.bfl-filters__search-button:hover {
	background: var(--bfl-accent-dark);
}

.bfl-filters__search-button:focus-visible {
	outline: 2px solid var(--bfl-text);
	outline-offset: 2px;
}

/* Mobile parent / child category dropdowns */
.bfl-filters__dropdowns {
	display: none;
}

.bfl-filters__select {
	position: relative;
	width: 100%;
}

.bfl-filters__select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 20px;
	width: 12px;
	height: 8px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23111111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	transform: translateY(-50%);
	pointer-events: none;
}

.bfl-filters__select-control {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 12px 44px 12px 20px;
	border: 1px solid var(--bfl-accent);
	border-radius: var(--bfl-radius);
	background: #fff;
	color: var(--bfl-text);
	font: inherit;
	font-family: var(--bfl-filter-font);
	font-size: 16px;
	line-height: 1.2;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.bfl-filters__select-control:disabled {
	color: var(--bfl-muted);
	border-color: var(--bfl-border);
	cursor: default;
	opacity: 1;
}

.bfl-filters__select:has(.bfl-filters__select-control:disabled)::after {
	opacity: 0.45;
}

.bfl-filters__select-control:focus-visible {
	outline: 2px solid var(--bfl-text);
	outline-offset: 2px;
}

/* Tag filter pills */
.bfl-tags[hidden] {
	display: none !important;
}

.bfl-tags__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 28px;
}

button.bfl-tags__pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	border: 1px solid var(--bfl-accent);
	border-radius: 65px !important;
	background: #fff;
	color: var(--bfl-text);
	cursor: pointer;
	font-family: var(--bfl-filter-font);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: 0;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

button.bfl-tags__pill:hover {
	border: 1px solid #3fdfaf !important;
	background: #3fdfaf;
}

button.bfl-tags__pill.is-active {
	background: var(--bfl-accent);
	border-color: var(--bfl-accent);
	color: var(--bfl-text);
	font-weight: 600;
}

button.bfl-tags__pill:focus-visible {
	outline: 2px solid var(--bfl-text);
	outline-offset: 2px;
}

/* Active category filter chips */
.bfl-active-filters {
	margin-bottom: 24px;
}

.bfl-active-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.bfl-active-filters__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px 8px 16px;
	border: 1px solid var(--bfl-accent);
	border-radius: var(--bfl-radius);
	background: rgba(74, 222, 179, 0.12);
	color: var(--bfl-text);
	font-size: 14px;
	line-height: 1.2;
}

.bfl-active-filters__chip-label {
	font-weight: 600;
}

.bfl-active-filters__chip-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--bfl-accent);
	color: var(--bfl-text);
	cursor: pointer;
	font: inherit;
	line-height: 1;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bfl-active-filters__chip-remove-icon {
	display: block;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
}

.bfl-active-filters__chip-remove:hover {
	background: var(--bfl-accent-dark);
	color: #fff;
	transform: scale(1.05);
}

.bfl-section__grid .geodir-info {
	width: 100%;
}

/* Header */
.bfl-header {
	margin-bottom: 28px;
}

.bfl-header__title {
	margin: 0 0 14px;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.bfl-header__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
}

.bfl-header__meta-spacer {
	flex: 1;
}

.bfl-section__meta-spacer {
	flex: 1;
}

.bfl-header__count {
	margin: 0;
	color: var(--bfl-muted);
	font-size: 15px;
	line-height: 1.4;
}

.bfl-sort {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	min-height: 24px;
}

.bfl-sort__label {
	position: relative;
	padding-right: 18px;
	font-size: 15px;
	color: var(--bfl-text);
	white-space: nowrap;
	pointer-events: none;
}

.bfl-sort__label::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 0;
	width: 12px;
	height: 8px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23111111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	transform: translateY(-50%);
}

.bfl-sort__select {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0.01;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	font-size: 16px;
}

.bfl-listings__header-wrap,
.bfl-listings__content,
.bfl-section__head,
.bfl-section__grid {
	width: 100%;
	max-width: 100%;
}

/* Sections */
.bfl-section + .bfl-section {
	margin-top: 48px;
}

.bfl-section__head {
	margin-bottom: 24px;
}

.bfl-section__title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 600;
}

.bfl-section__title--hero {
	margin: 0 0 14px;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-weight: 700;
}

.bfl-section__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
}

.bfl-section__count {
	margin: 0;
	color: var(--bfl-muted);
	font-size: 15px;
	line-height: 1.4;
}

.bfl-section__grid .geodir-listings {
	margin-bottom: 0;
}

/* Spotlight listing cards (Elementor skin grid) */
.bfl-section__grid .geodir_locations {
	width: 100%;
	margin: 0;
	padding: 0;
}

.bfl-section__grid .elementor-posts-container {
	width: 100%;
	display: grid !important;
}

.bfl-section__grid .elementor-posts-container.elementor-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.bfl-section__grid .elementor-posts-container.elementor-grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.bfl-section__grid .elementor-posts-container.elementor-grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.bfl-section__grid .elementor-post.elementor-grid-item {
	align-self: stretch;
	height: 100%;
}

.bfl-section__grid .elementor-post .e-con.e-parent {
	border-radius: var(--bfl-card-radius) !important;
	border: 1px solid #eeeeee !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
	overflow: hidden !important;
	background: #fff !important;
	height: 100%;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.bfl-section__grid .elementor-post:hover .e-con.e-parent {
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1) !important;
}

.bfl-section__grid .elementor-post .elementor-widget-theme-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0 !important;
}

.bfl-section__grid .geodir-field-neighbourhood,
.bfl-section__grid .geodir-field-neighbourhood_1,
.bfl-section__grid .geodir-field-city,
.bfl-section__grid .geodir-field-neighbourhood a,
.bfl-section__grid .geodir-field-neighbourhood_1 a,
.bfl-section__grid .geodir-field-city a {
	font-size: 13px;
	color: var(--bfl-accent-dark) !important;
}

.bfl-section__grid .fa-location-dot,
.bfl-section__grid .fa-map-marker-alt {
	color: var(--bfl-accent) !important;
}

.bfl-section__grid .elementor-widget-theme-post-title .elementor-heading-title {
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: var(--bfl-text) !important;
}

.bfl-section__grid .elementor-widget-theme-post-title .elementor-heading-title a {
	color: inherit;
	text-decoration: none;
}

.bfl-section__grid .elementor-widget-theme-post-title .elementor-heading-title a:hover {
	color: var(--bfl-accent-dark) !important;
}

.bfl-section__grid .geodir-field-post_category,
.bfl-section__grid .geodir-field-post_category a,
.bfl-section__grid .geodir-field-default_category,
.bfl-section__grid .geodir-field-default_category a {
	font-size: 13px !important;
	font-weight: 500 !important;
	color: var(--bfl-accent-dark) !important;
	text-transform: none !important;
}

.bfl-section__grid .bfl-listing-hidden {
	display: none !important;
}

.bfl-section__footer[hidden] {
	display: none !important;
}

.bfl-section__empty {
	padding: 24px 0;
	color: var(--bfl-muted);
	font-size: 15px;
}

.bfl-section__footer {
	margin-top: 20px;
	text-align: center;
}

.bfl-section__view-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 140px;
	padding: 12px 24px;
	border: 1px solid var(--bfl-text);
	border-radius: var(--bfl-radius);
	background: transparent;
	color: var(--bfl-text);
	text-decoration: none;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.bfl-section__view-all:hover,
.bfl-section__view-all:focus {
	background: var(--bfl-text);
	color: #fff;
}

.bfl-section__load-more-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: bfl-spin 0.7s linear infinite;
}

.bfl-section.is-loading-more .bfl-section__grid {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.bfl-section.is-loading-more .bfl-section__load-more {
	pointer-events: none;
}

.bfl-section.is-loading-more .bfl-section__load-more-spinner {
	display: inline-block;
}

.bfl-empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--bfl-muted);
}

.bfl-listings {
	position: relative;
	min-height: 120px;
}

.bfl-listings.is-loading {
	pointer-events: none;
}

.bfl-listings.is-loading .bfl-listings__content,
.bfl-listings.is-loading .bfl-listings__tags,
.bfl-listings.is-loading .bfl-active-filters,
.bfl-listings.is-loading .bfl-listings__header-wrap {
	opacity: 0.4;
	transition: opacity 0.2s ease;
}

.bfl-listings__loader {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	background: rgba(255, 255, 255, 0.72);
}

.bfl-listings.is-loading > .bfl-listings__loader {
	display: flex;
}

.bfl-listings__loader-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.bfl-listings__spinner {
	display: block;
	width: 40px;
	height: 40px;
	border: 3px solid rgba(74, 222, 179, 0.28);
	border-top-color: var(--bfl-accent);
	border-radius: 50%;
	animation: bfl-spin 0.7s linear infinite;
}

.bfl-listings__loader-text {
	color: var(--bfl-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

@keyframes bfl-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bfl-listings__spinner,
	.bfl-section__load-more-spinner {
		animation: none;
		border-top-color: var(--bfl-accent);
		border-right-color: var(--bfl-accent);
	}

	.bfl-listings.is-loading .bfl-listings__content,
	.bfl-listings.is-loading .bfl-listings__tags,
	.bfl-listings.is-loading .bfl-active-filters,
	.bfl-listings.is-loading .bfl-listings__header-wrap,
	.bfl-section.is-loading-more .bfl-section__grid {
		transition: none;
	}
}

@media (max-width: 1024px) {
	.bfl-section__grid .elementor-posts-container.elementor-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	.filter-showing-archive {
		display: none !important;
	}

	.elementor-widget-bfl_category_filters,
	.main-filter-archive {
		display: block !important;
	}

	.bfl-filters__more,
	.bfl-filters__groups,
	.bfl-filters__search {
		display: none !important;
	}

	.bfl-filters__dropdowns {
		display: flex;
		flex-direction: column;
		gap: 12px;
		margin-bottom: 16px;
	}
}

@media (max-width: 640px) {
	.bfl-header__meta,
	.bfl-section__meta {
		flex-wrap: nowrap;
	}

	.bfl-section__grid .elementor-posts-container.elementor-grid-4,
	.bfl-section__grid .elementor-posts-container.elementor-grid-tablet-2,
	.bfl-section__grid .elementor-posts-container {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}
