/**
 * Mattis Property Search - Main Styles
 *
 * @package MattisPropertySearch
 * @version 1.0.0
 */

/* Reset and Base Styles */
.mps *,
.mattis-search-wrapper * {
	box-sizing: border-box;
}

.mps,
.mattis-search-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
		Ubuntu, Cantarell, sans-serif;
	line-height: 1.6;
	color: #333;
}

/* Wrapper */
.mattis-search-wrapper {
	width: 100%;
	margin: 0;
}

/* Property Search Form - Mattis Style */
.mattis-search,
.mps-property-search-form {
	--mps-radius: 38px;
	--mps-border: var(--mattis-border-soft, #eceff4);
	--mps-shadow: 0 24px 60px -32px rgba(16, 22, 34, 0.28);
	position: relative;
	background: #ffffff;
	padding: 10px !important;
	border-radius: 20px;
	border: 1.5px solid var(--mps-border);
	box-shadow: var(--mps-shadow);
	display: flex;
	flex-direction: column;
	gap: clamp(18px, 3vw, 24px);
	font-family: inherit;
	box-sizing: border-box;
	margin-bottom: 2rem;
}

.mattis-search__title,
.mps-search-title {
	margin: 0 0 -6px;
	font-size: 22px;
	font-weight: 600;
	color: #16171d;
	letter-spacing: 0.25px;
	padding: 0 clamp(16px, 3vw, 22px);
}

/* Operation Tabs - Mattis Style */
.mattis-search__tabs,
.mps-operation-tabs,
.mps-tab-buttons {
	position: absolute;
	left: clamp(22px, 5vw, 42px);
	top: -47px;
	display: inline-flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	background: transparent;
	gap: 0px;
	box-shadow: 0 18px 32px -24px rgba(16, 22, 34, 0.28);
}

.mattis-search__tab,
.mps-tab-button {
	min-width: 126px;
	padding: 15px 26px 15px 26px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.22px;
	border-radius: 10px 10px 0 0;
	line-height: 1;
	color: #4a4d56;
	background: #eeeeee;
	cursor: pointer;
	border: 0;
	outline: 0;
	transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease,
		transform 0.25s ease;
}

.mattis-search__tab:hover,
.mps-tab-button:hover {
	background: #f4f5f8;
	color: #1a1b1f;
}

.mattis-search__tab.is-active,
.mps-tab-button.active {
	background: var(--mattis-primary, #db7e2b);
	color: #fff;
	box-shadow: 0 12px 24px -16px rgba(240, 137, 45, 0.5);
	transform: translateY(-1px);
}

/* Form */
.mattis-search__form {
	width: 100%;
	margin: 0;
}

/* Search Bar - Mattis Style */
.mattis-search__bar,
.mps-search-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
	width: 100%;
	box-sizing: border-box;
}

.mattis-search__group {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.mps-search-fields {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
	min-width: 0;
	flex-wrap: nowrap;
}

.mattis-search__item,
.mps-field {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
	position: relative;
	padding: 0 clamp(16px, 3vw, 22px);
	min-height: 56px;
	border-radius: 20px;
	background: #eceff4;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
	border: 1px solid transparent;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	z-index: 1;
}

.mattis-search__item:hover,
.mps-field:hover {
	background: #e9ebf0;
	border-color: rgba(29, 31, 39, 0.06);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.mattis-search__item + .mattis-search__item,
.mps-field + .mps-field {
	margin-left: clamp(2px, 1vw, 6px);
}

.mps-field label {
	display: none;
}

/* Icon for location field */
.mps-location-field::before {
	content: '📍';
	font-size: 18px;
	flex-shrink: 0;
	line-height: 1;
}

.mattis-search__icon {
	width: 18px;
	height: 18px;
	color: #1d1f27;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mattis-search__icon svg,
.mattis-search__icon i {
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 1;
}

.mattis-search__control,
.mps-field select,
.mps-field input[type='text'],
.mps-field input[type='number'],
.mps-field input[type='search'] {
	appearance: none;
	border: 0;
	background: transparent;
	font-size: 15px;
	font-weight: 500;
	color: #1a1b1f;
	outline: none;
	width: 100%;
	font-family: inherit;
	line-height: 1.2;
	padding: 0;
	min-height: 24px;
	cursor: text;
}

.mattis-search__control,
.mps-field select {
	padding-right: 28px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none' stroke='%23e10600' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6.75 9 11.25 14 6.75'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 2px center;
}

.mattis-search__control::placeholder,
.mps-field input::placeholder,
.mps-field select option:first-child {
	color: #6a6b6f;
	opacity: 1;
}

.mattis-search__item:focus-within,
.mps-field:focus-within {
	color: #1a1b1f;
}

.mattis-search__item:focus-within .mattis-search__control,
.mps-field:focus-within select,
.mps-field:focus-within input {
	color: var(--mattis-secondary, #e10600) !important;
}

.mattis-search__item:focus-within::after,
.mps-field:focus-within::after {
	content: '';
	position: absolute;
	inset: -2px;
	border-radius: inherit;
	border: 2px solid rgba(225, 6, 0, 0.35);
	box-shadow: 0 0 0 4px rgba(225, 6, 0, 0.12);
	pointer-events: none;
	z-index: -1;
}

/* Hide the default clear button on search inputs (WebKit) */
input[type='search']::-webkit-search-cancel-button {
	-webkit-appearance: none;
	height: 0;
	width: 0;
	margin: 0;
}

.mps-area-inputs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

.mps-search-actions {
	display: flex;
	gap: 1rem;
	justify-content: flex-start;
}

.mattis-search__submit-button,
.mps-search-button {
	min-width: 152px !important;
	height: 68px !important;
	padding: 0 clamp(30px, 5vw, 44px);
	font-size: 16px;
	font-weight: 600;
	gap: 12px;
	border-radius: 20px;
	box-shadow: 0 18px 44px -20px rgba(240, 137, 45, 0.65);
	border: 1.5px solid transparent;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
		box-shadow 0.25s ease;
	background: var(--mattis-primary, #db7e2b);
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.mattis-search__submit-button:hover,
.mps-search-button:hover {
	background: var(--mattis-primary-hover, #db7e2b);
	color: #ffffff;
	border-color: transparent;
	box-shadow: 0 18px 40px -22px rgba(240, 137, 45, 0.6);
}

.mps-search-icon {
	font-size: 18px;
	line-height: 1;
}

.mps-clear-button {
	background: #ffffff;
	border: 1.5px solid var(--mattis-border-soft, #eceff4);
	color: #1a1b1f;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.2px;
	padding: 15px 28px;
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	transition: border-color 0.25s ease, box-shadow 0.25s ease,
		background 0.25s ease, color 0.25s ease;
	box-shadow: 0 16px 28px -22px rgba(16, 22, 34, 0.28);
	min-height: 48px;
}

.mps-clear-button:hover {
	background: var(--mattis-primary, #db7e2b);
	border-color: var(--mattis-primary, #db7e2b);
	color: #ffffff;
	box-shadow: 0 20px 36px -20px rgba(240, 137, 45, 0.45);
}

/* Buscar por código */
.mps-code-search-link,
.mattis-search__code-wrapper {
	position: absolute;
	right: clamp(20px, 5vw, 42px);
	bottom: -50px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #1a1b1f;
	text-decoration: none;
	transition: color 0.25s ease;
}

.mps-code-search-link:hover,
.mattis-search__code-wrapper:hover {
	color: var(--mattis-primary, #db7e2b);
}

.mps-filters {
	--mpf-accent: var(--mattis-primary, #db7e2b);
	--mpf-bg: #fff;
	--mpf-dark: var(--mattis-dark, #151515);
	--mpf-gray: var(--mattis-gray-7, #666);
	width: 100%;
	background: #fff;
	border-radius: 32px;
	padding: 20px 20px 26px;
	box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.08),
		0 8px 32px -6px rgba(0, 0, 0, 0.06);
	font-size: 14px;
	box-sizing: border-box;
	margin-bottom: 2rem;
}

.mps-filters__inner {
	display: flex;
	flex-direction: column;
	gap: 26px;
	max-height: calc(100vh - 140px);
	overflow: auto;
	padding-right: 4px;
}

.mps-filters__heading {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #151515;
}

.mps-filter-block {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mps-filter-block__title {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #151515;
	opacity: 0.9;
}

/* Range Filters */
.mps-range {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mps-range__inputs {
	display: flex;
	gap: 12px;
}

.mps-range__input {
	flex: 1;
	border: 1px solid #d9d9d9;
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 13px;
	background: #fff;
	outline: none;
	transition: border-color 0.25s;
}

.mps-range__input:focus {
	border-color: var(--mpf-accent);
}

.mps-range__track {
	position: relative;
	height: 34px;
	display: flex;
	align-items: center;
}

.mps-range__selection {
	position: absolute;
	left: 0;
	height: 4px;
	background: var(--mpf-accent);
	border-radius: 4px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.mps-range__slider {
	position: absolute;
	width: 100%;
	left: 0;
	top: 0;
	bottom: 0;
	margin: 0;
	background: transparent;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.mps-range__slider::-webkit-slider-thumb {
	pointer-events: auto;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--mpf-accent);
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	cursor: pointer;
}

.mps-range__slider::-moz-range-thumb {
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--mpf-accent);
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	cursor: pointer;
}

/* Chips Filter */
.mps-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mps-chip {
	background: #d9d9d9;
	color: #151515;
	border: 0;
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.25s, color 0.25s;
}

.mps-chip.is-active,
.mps-chip:hover {
	background: var(--mpf-accent);
	color: #fff;
}

/* Filter Actions */
.mps-filter-actions {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.mps-filter-btn {
	background: var(--mpf-accent);
	color: #fff;
	border: 0;
	border-radius: 24px;
	padding: 12px 26px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.25s;
}

.mps-filter-btn:hover {
	background: var(--mattis-primary-hover, #c36d24);
}

.mps-filter-btn--clear {
	background: var(--mattis-dark, #151515);
}

.mps-filter-btn--clear:hover {
	background: #000;
}

/* Autocomplete Styles - Mattis */
.mps-autocomplete {
	position: relative;
	width: 100%;
}

.mps-autocomplete.is-open .mps-field {
	z-index: 150;
}

.mps-autocomplete__input {
	width: 100%;
	height: 100%;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	padding: 0;
	margin: 0;
}

.mps-autocomplete__input::placeholder {
	color: inherit;
	opacity: 1;
}

.mps-autocomplete__input:focus {
	outline: none;
}

.mps-autocomplete__value {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.mps-autocomplete__panel {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	width: 100%;
	min-width: 280px;
	max-height: 320px;
	background: #ffffff;
	border: 1px solid rgba(219, 126, 43, 0.35);
	border-radius: 18px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.mps-autocomplete__panel[aria-hidden='false'] {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mps-autocomplete__header {
	padding: 18px 22px 14px;
	border-bottom: 1px solid #eeeeee;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.mps-autocomplete__title {
	font-size: 15px;
	font-weight: 600;
	color: #2c2c2c;
	flex: 1;
}

.mps-autocomplete__section {
	padding: 14px 22px 8px;
	background: #fafafa;
}

.mps-autocomplete__section-title {
	font-size: 13px;
	font-weight: 600;
	color: #666666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mps-autocomplete__options {
	max-height: 220px;
	overflow-y: auto;
	padding: 8px 0;
}

.mps-autocomplete__options::-webkit-scrollbar {
	width: 6px;
}

.mps-autocomplete__options::-webkit-scrollbar-track {
	background: transparent;
	margin: 8px 0;
}

.mps-autocomplete__options::-webkit-scrollbar-thumb {
	background: rgba(219, 126, 43, 0.25);
	border-radius: 3px;
}

.mps-autocomplete__options::-webkit-scrollbar-thumb:hover {
	background: rgba(219, 126, 43, 0.4);
}

.mps-autocomplete__option {
	width: 100%;
	padding: 12px 22px;
	display: flex;
	align-items: center;
	gap: 12px;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
	font-family: inherit;
	font-size: 14px;
	color: #2c2c2c;
	text-align: left;
}

.mps-autocomplete__option:hover,
.mps-autocomplete__option:focus,
.mps-autocomplete__option.is-focused {
	background-color: #f9f9f9;
	outline: none;
}

.mps-autocomplete__option.is-selected {
	background-color: rgba(219, 126, 43, 0.08);
}

.mps-autocomplete__option.is-hidden {
	display: none;
}

.mps-autocomplete__option-icon {
	flex-shrink: 0;
	color: #db7e2b;
}

.mps-autocomplete__option-label {
	flex: 1;
	font-weight: 400;
}

/* Dropdown Styles - Mattis */
.mps-dropdown {
	position: relative;
}

.mps-dropdown__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 12px;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
}

.mps-dropdown__label {
	flex: 1;
	font-size: 15px;
	font-weight: 500;
	color: var(--mattis-primary-hover, #db7e2b) !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.2s ease;
}

.mps-dropdown__trigger[aria-expanded='true'] .mps-dropdown__label,
.mps-dropdown.has-selection .mps-dropdown__label {
	color: #1a1b1f;
}

.mps-dropdown__icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	color: #db7e2b;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease, color 0.2s ease;
}

.mps-dropdown__trigger[aria-expanded='true'] .mps-dropdown__icon {
	transform: rotate(180deg);
}

.mps-dropdown__icon svg {
	width: 100%;
	height: 100%;
}

.mps-dropdown__panel {
	position: absolute;
	left: 0;
	top: calc(100% + 8px);
	min-width: 100%;
	width: max-content;
	max-width: 420px;
	background: #ffffff;
	border: 1px solid rgba(219, 126, 43, 0.35);
	border-radius: 18px;
	box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
	z-index: 100;
	overflow: hidden;
}

.mps-dropdown__panel[aria-hidden='false'] {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mps-dropdown__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: #eeeeee;
	border-bottom: 1px solid rgba(219, 126, 43, 0.2);
}

.mps-dropdown__title {
	font-size: 16px;
	font-weight: 600;
	color: #db7e2b;
}

.mps-dropdown__options {
	padding: 12px;
	max-height: 280px;
	overflow-y: auto;
}

.mps-dropdown__options::-webkit-scrollbar {
	width: 6px;
}

.mps-dropdown__options::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 10px;
}

.mps-dropdown__options::-webkit-scrollbar-thumb {
	background: #db7e2b;
	border-radius: 10px;
}

.mps-dropdown__options::-webkit-scrollbar-thumb:hover {
	background: #c66d21;
}

.mps-dropdown__option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	cursor: pointer;
	border-radius: 12px;
	transition: background 0.2s ease;
	user-select: none;
}

.mps-dropdown__option:hover {
	background: #f9f9f9;
}

.mps-dropdown__checkbox {
	appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #db7e2b;
	border-radius: 4px;
	background: #ffffff;
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.mps-dropdown__checkbox:checked {
	background: #db7e2b;
	border-color: #db7e2b;
}

.mps-dropdown__checkbox:checked::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 5px;
	height: 9px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: translate(-50%, -60%) rotate(45deg);
}

.mps-dropdown__option-label {
	font-size: 16px;
	font-weight: 500;
	color: #1b1b1b;
	flex: 1;
}

.mps-dropdown__search-wrapper {
	padding: 12px 16px;
	border-bottom: 1px solid rgba(219, 126, 43, 0.15);
}

.mps-dropdown__search-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid rgba(219, 126, 43, 0.3);
	border-radius: 10px;
	font-size: 15px;
	font-weight: 400;
	color: #1b1b1b;
	background: #ffffff;
	outline: none;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mps-dropdown__search-input:focus {
	border-color: #db7e2b;
	box-shadow: 0 0 0 3px rgba(219, 126, 43, 0.1);
}

.mps-dropdown__search-input::placeholder {
	color: #6a6b6f;
}

.mps-dropdown__section {
	padding: 10px 16px 6px 16px;
	background: #f9f9f9;
	border-bottom: 1px solid rgba(219, 126, 43, 0.15);
}

.mps-dropdown__section-title {
	font-size: 13px;
	font-weight: 600;
	color: #6a6b6f;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mps-dropdown__option-icon {
	width: 16px;
	height: 16px;
	color: #db7e2b;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mps-dropdown__option-icon svg {
	width: 100%;
	height: 100%;
}

.mps-dropdown__option.is-hidden {
	display: none;
}

.mps-dropdown:not(.is-open) .mps-field:hover {
	background: #f4f4f4;
}

.mps-dropdown.is-open .mps-field {
	background: #eeeeee;
	border-color: rgba(219, 126, 43, 0.35);
	z-index: 150;
}

/* Property Results */
.mps-property-results {
	margin-bottom: 2rem;
}

.mps-results-title {
	margin: 0 0 1.5rem 0;
	font-size: 1.75rem;
	font-weight: 600;
	color: #2c3e50;
}

.mps-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.mps-results-count {
	font-size: 1rem;
	color: #666;
}

.mps-results-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.mps-toggle-filters,
.mps-toggle-map {
	background: #f8f9fa;
	border: 1px solid #ddd;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
}

.mps-toggle-filters:hover,
.mps-toggle-map:hover {
	background: #e9ecef;
}

.mps-layout-switcher {
	display: flex;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid #ddd;
}

.mps-layout-button {
	background: #f8f9fa;
	border: none;
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.1rem;
}

.mps-layout-button:hover {
	background: #e9ecef;
}

.mps-layout-button.active {
	background: var(--mattis-primary, #db7e2b);
	color: white;
}

.mps-sort-select {
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9rem;
}

/* Loading States */
.mps-loading {
	text-align: center;
	padding: 3rem 1rem;
}

.mps-loading-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid var(--mattis-primary, #db7e2b);
	border-radius: 50%;
	animation: mps-spin 1s linear infinite;
	margin: 0 auto 1rem;
}

@keyframes mps-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Error and No Results States */
.mps-error,
.mps-no-results {
	text-align: center;
	padding: 3rem 1rem;
}

.mps-error-icon,
.mps-no-results-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
}

.mps-error h3,
.mps-no-results h3 {
	margin: 0 0 1rem 0;
	color: #333;
}

.mps-retry-button,
.mps-clear-filters {
	background: var(--mattis-primary, #db7e2b);
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.mps-retry-button:hover,
.mps-clear-filters:hover {
	background: var(--mattis-primary-hover, #db7e2b);
}

/* Properties Grid */
.mps-properties-grid {
	margin-bottom: 2rem;
}

.mps-properties-grid.grid-layout {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

.mps-properties-grid.list-layout {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Property Cards */
.mps-property-card {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mps-property-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.list-layout .mps-property-card {
	display: flex;
	align-items: stretch;
}

.mps-property-image {
	position: relative;
	overflow: hidden;
}

.grid-layout .mps-property-image {
	height: 200px;
}

.list-layout .mps-property-image {
	width: 250px;
	min-width: 250px;
}

.mps-property-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.mps-property-card:hover .mps-property-image img {
	transform: scale(1.05);
}

.mps-property-actions {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	display: flex;
	gap: 0.5rem;
}

.mps-favorite-btn {
	background: rgba(255, 255, 255, 0.9);
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	font-size: 1.2rem;
}

.mps-favorite-btn:hover {
	background: white;
	transform: scale(1.1);
}

.mps-favorite-btn.active .mps-heart {
	color: #e74c3c;
}

.mps-property-operation {
	position: absolute;
	bottom: 0.75rem;
	left: 0.75rem;
	background: rgba(240, 137, 45, 0.9);
	color: white;
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.8rem;
	font-weight: 500;
	text-transform: uppercase;
}

.mps-property-content {
	padding: 1.25rem;
	flex: 1;
}

.mps-property-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: #2c3e50;
	line-height: 1.4;
}

.mps-property-location {
	color: #666;
	font-size: 0.9rem;
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.mps-property-location:before {
	content: '📍';
	font-size: 0.8rem;
}

.mps-property-price {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--mattis-primary, #db7e2b);
	margin-bottom: 0.75rem;
}

.mps-property-details {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
	font-size: 0.85rem;
	color: #666;
}

.mps-property-details span {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.mps-bedrooms:before {
	content: '🛏️';
}
.mps-bathrooms:before {
	content: '🚿';
}
.mps-area:before {
	content: '📐';
}

.mps-view-details {
	display: inline-block;
	background: var(--mattis-primary, #db7e2b);
	color: white;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: background-color 0.3s ease;
}

.mps-view-details:hover {
	background: var(--mattis-primary-hover, #db7e2b);
	color: white;
}

/* Pagination */
.mps-pagination {
	display: flex;
	justify-content: center;
	margin: 2rem 0;
}

.mps-pagination-inner {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.mps-page-link {
	padding: 0.5rem 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: var(--mattis-primary, #db7e2b);
	text-decoration: none;
	transition: all 0.3s ease;
	font-size: 0.9rem;
}

.mps-page-link:hover {
	background: #f8f9fa;
	border-color: var(--mattis-primary, #db7e2b);
}

.mps-page-link.mps-current {
	background: var(--mattis-primary, #db7e2b);
	color: white;
	border-color: var(--mattis-primary, #db7e2b);
}

.mps-page-dots {
	padding: 0.5rem;
	color: #666;
}

/* Map Container */
.mps-map-container {
	margin: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mps-map-controls {
	background: #f8f9fa;
	padding: 1rem;
	text-align: center;
	border-top: 1px solid #ddd;
}

.mps-hide-map {
	background: #666;
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.mps-hide-map:hover {
	background: #555;
}

/* Responsive Design */
@media (max-width: 1100px) {
	.mps-search-bar {
		flex-wrap: wrap;
		padding-right: 4px;
	}

	.mps-search-fields {
		width: 100%;
		flex-wrap: wrap;
		gap: 4px;
	}

	.mps-field + .mps-field {
		margin-left: 0;
	}

	.mps-field {
		width: 100%;
	}

	.mps-field:focus-within::after {
		inset: -8px -6px;
	}

	.mps-search-button {
		width: 100%;
	}
}

@media (max-width: 900px) {
	.mps-property-search-form {
		padding: 22px 20px 28px;
	}

	.mps-operation-tabs {
		left: 20px;
		top: -42px;
	}

	.mps-search-bar {
		padding-left: 4px;
	}

	.mps-search-fields {
		gap: 14px;
	}

	.mps-field {
		width: 100%;
	}

	.mps-search-button {
		width: 100%;
	}

	.mps-results-header {
		flex-direction: column;
		align-items: stretch;
	}

	.mps-results-controls {
		justify-content: space-between;
	}

	.mps-properties-grid.grid-layout {
		grid-template-columns: 1fr;
	}

	.list-layout .mps-property-card {
		flex-direction: column;
	}

	.list-layout .mps-property-image {
		width: 100%;
		height: 200px;
	}

	/* Filters mobile behavior */
	.mps-filters {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 500;
		transform: translateY(100%);
		transition: transform 0.4s ease;
		padding: 32px 22px 40px;
		border-radius: 0;
		max-width: none;
	}

	.mps-filters.is-open {
		transform: translateY(0);
	}

	.mps-filters__inner {
		max-height: none;
	}
}

@media (max-width: 768px) {
	.mps-search-fields {
		gap: 10px;
	}

	.mps-area-inputs {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.mps-operation-tabs {
		max-width: calc(100% - 40px);
		left: 50%;
		transform: translateX(-50%);
	}

	.mps-tab-button {
		flex: 1;
		min-width: auto;
		padding: 12px 20px;
	}

	.mps-property-details {
		flex-direction: column;
		gap: 0.5rem;
	}

	.mps-pagination-inner {
		flex-wrap: wrap;
		justify-content: center;
	}
}

/* Focus Visible Styles */
.mps button:focus-visible,
.mps a:focus-visible,
.mps input:focus-visible,
.mps select:focus-visible {
	outline: 2px solid var(--mattis-primary, #db7e2b);
	outline-offset: 2px;
}
