/* Unit search — design layout; colors via --aus-* (Elementor Style tab) */

.aura-search-widget {
	--aus-accent: var(--arb-bg, #0b1956);
	--aus-text: var(--arb-bg, #0b1956);
	--aus-muted: var(--arb-muted, #64748b);
	--aus-soft: #94a3b8;
	--aus-surface: #ffffff;
	--aus-page-bg: #f1f5f9;
	--aus-input-bg: #f8fafc;
	--aus-border: #e2e8f0;
	--aus-border-hover: #cbd5e1;
	--aus-button-text: var(--arb-text, #ffffff);
	--aus-title-accent: color-mix(in srgb, var(--aus-accent) 72%, var(--aus-muted));
	--aus-badge-bg: color-mix(in srgb, var(--aus-accent) 10%, transparent);
	--aus-glow: color-mix(in srgb, var(--aus-accent) 8%, transparent);
	--aus-focus-ring: color-mix(in srgb, var(--aus-accent) 12%, transparent);
	--aus-button-shadow: color-mix(in srgb, var(--aus-accent) 25%, transparent);
	--aus-button-shadow-hover: color-mix(in srgb, var(--aus-accent) 35%, transparent);
	--aus-button-end: color-mix(in srgb, var(--aus-accent) 88%, #000);

	box-sizing: border-box;
	position: relative;
	width: 100%;
	font-family: var(--arb-font, 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif);
	color: var(--aus-text);
	background: var(--aus-page-bg);
	background-image: radial-gradient(at 50% 0%, var(--aus-glow) 0px, transparent 50%);
	padding: 2rem 1rem;
}

.aura-search-widget *,
.aura-search-widget *::before,
.aura-search-widget *::after {
	box-sizing: border-box;
}

.aura-search-widget .wrapper {
	max-width: 1280px;
	width: 100%;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
	padding: 20px 0;
}

/* Intro text block */
.aura-search-widget .intro-block {
	text-align: center;
	max-width: 100%;
	margin: 0 auto;
}

.aura-search-widget .intro-block .project-title {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.aura-search-widget .intro-block .project-title span {
    font-size: 25px;
    color: var(--arb-bg);
    font-weight: 500;
}

.aura-search-widget .badge {
	display: inline-block;
	background: var(--aus-badge-bg);
	color: var(--aus-accent);
	font-weight: 700;
	font-size: 0.75rem;
	padding: 0.35rem 0.85rem;
	border-radius: 99px;
	letter-spacing: 0.08em;
	margin-bottom: 0.75rem;
}

.aura-search-widget .project-title {
	font-size: clamp(2.5rem, 6.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
    color: var(--arb-bg);
    margin: 0;
    will-change: transform, opacity;
    margin-bottom: 20px;
}

.aura-search-widget .project-title span {
	color: var(--aus-title-accent);
}

.aura-search-widget .description {
	max-width: 980px;
	width: 100%;
    margin: 0 auto;
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
    line-height: 1.7;
    color: 
color-mix(in srgb, var(--arb-bg) 85%, var(--arb-muted));
    will-change: transform, opacity;
}

.aura-search-widget .description p {
	margin: 0 0 0.75rem;
}

.aura-search-widget .description p:last-child {
	margin-bottom: 0;
}

.aura-search-widget .description strong {
	color: var(--aus-text);
}

/* Floating search container */
.aura-search-widget .search-container {
	background: var(--aus-surface);
    padding: 2.25rem;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}

.aura-search-widget .search-header {
	margin-bottom: 1.75rem;
}

.aura-search-widget .search-header h2 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--aus-text);
}

.aura-search-widget .search-header p {
	margin: 0.2rem 0 0;
	font-size: 0.875rem;
	color: var(--aus-soft);
}

/* Responsive grid form */
.aura-search-widget .search-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1.25rem;
	align-items: end;
}

@media (min-width: 1024px) {
	.aura-search-widget .search-grid {
		grid-template-columns: repeat(5, 1fr) 140px;
	}
}

.aura-search-widget .input-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
	position: relative;
}

.aura-search-widget .input-field label {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--aus-muted);
	/* letter-spacing: 0.06em; */
	min-height: 1em;
}

.aura-search-widget .unit-input {
	position: relative;
	display: flex;
	align-items: center;
}

.aura-search-widget .unit-input input {
	width: 100%;
	height: 48px;
	padding: 0 2.5rem 0 1rem;
	font-family: inherit;
	font-size: 0.925rem;
	font-weight: 500;
	color: var(--aus-text);
	background-color: var(--aus-input-bg);
	border: 1.5px solid var(--aus-border);
	border-radius: 12px;
	outline: none;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.aura-search-widget .unit-input .unit {
	position: absolute;
	right: 1rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--aus-soft);
	pointer-events: none;
}

.aura-search-widget .unit-input input:hover {
	background-color: var(--aus-surface);
	border-color: var(--aus-border-hover);
}

.aura-search-widget .unit-input input:focus {
	background-color: var(--aus-surface);
	border-color: var(--aus-accent);
	box-shadow: 0 0 0 4px var(--aus-focus-ring);
}

.aura-search-widget .unit-input input::-webkit-outer-spin-button,
.aura-search-widget .unit-input input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.aura-search-widget .unit-input input[type='number'] {
	-moz-appearance: textfield;
}

.aura-search-widget .select2-container {
	width: 100% !important;
}

.aura-search-widget .select2-container--default .select2-selection--single {
	height: 48px !important;
	background-color: var(--aus-input-bg) !important;
	border: 1.5px solid var(--aus-border) !important;
	border-radius: 5px !important;
	display: flex !important;
	align-items: center !important;
	position: relative !important;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.aura-search-widget .select2-container--default .select2-selection--single:hover {
	background-color: var(--aus-surface) !important;
	border-color: var(--aus-border-hover) !important;
}

.aura-search-widget .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--aus-text) !important;
	font-size: 0.925rem !important;
	font-weight: 500 !important;
	padding-left: 1rem !important;
	padding-right: 4rem !important;
	line-height: 45px !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.aura-search-widget .select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: var(--aus-soft) !important;
}

.aura-search-widget .select2-container--default .select2-selection--single .select2-selection__clear {
	position: absolute !important;
	right: 2rem !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	margin: 0 !important;
	padding: 0 0.35rem !important;
	height: auto !important;
	line-height: 1 !important;
	font-size: 1.1rem !important;
	font-weight: 500 !important;
	color: var(--aus-soft) !important;
	cursor: pointer !important;
	z-index: 2;
}

.aura-search-widget .select2-container--default .select2-selection--single .select2-selection__clear:hover {
	color: var(--aus-text) !important;
}

.aura-search-widget .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 46px !important;
	top: 1px !important;
	right: 8px !important;
	width: 24px !important;
	z-index: 1;
}

.aura-search-widget .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: var(--aus-soft) transparent transparent transparent !important;
	margin-top: -2px !important;
}

.aura-search-widget .select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--aus-accent) !important;
	background-color: var(--aus-surface) !important;
	box-shadow: 0 0 0 4px var(--aus-focus-ring) !important;
}

.aura-search-select2-dropdown.select2-dropdown,
.aura-search-select2-dropdown {
	--aus-accent: var(--arb-bg, #0b1956);
	--aus-text: var(--arb-bg, #0b1956);
	--aus-soft: #94a3b8;
	--aus-surface: #ffffff;
	--aus-border: #e2e8f0;
	--aus-input-bg: #f8fafc;
	--aus-button-text: #ffffff;
	--aus-focus-ring: color-mix(in srgb, var(--aus-accent) 12%, transparent);

	border: 1px solid var(--aus-border) !important;
	border-radius: 5px !important;
	box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.12) !important;
	margin-top: 6px !important;
	padding: 4px !important;
	overflow: hidden !important;
	font-family: var(--arb-font, 'Plus Jakarta Sans', system-ui, sans-serif) !important;
	background: var(--aus-surface) !important;
	z-index: 10050 !important;
	box-sizing: border-box !important;
	max-width: none !important;
}

.aura-search-select2-dropdown .select2-results__options {
	max-height: 220px !important;
	overflow-y: auto !important;
	padding: 0 !important;
	margin: 0 !important;
}

.aura-search-select2-dropdown .select2-results__option {
	padding: 10px 12px !important;
	border-radius: 5px !important;
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	color: var(--aus-text) !important;
	background: transparent !important;
	line-height: 1.35 !important;
}

.aura-search-select2-dropdown .select2-results__option[aria-selected='true'] {
	background-color: var(--aus-input-bg) !important;
	color: var(--aus-text) !important;
}

.aura-search-select2-dropdown .select2-results__option--highlighted[aria-selected],
.aura-search-select2-dropdown .select2-results__option--highlighted {
	background-color: var(--aus-accent) !important;
	color: var(--aus-button-text) !important;
}

.aura-search-select2-dropdown .select2-results__option[aria-disabled='true'] {
	color: var(--aus-soft) !important;
	background: transparent !important;
}

/* Keep shortcode / legacy pages from overriding Aura select2 */
.seach-wrapper-units .aura-search-widget .select2-container--default .select2-selection--single,
.aura-search-widget .select2-container--default .select2-selection--single {
	height: 48px !important;
	background-color: var(--aus-input-bg) !important;
	border: 1.5px solid var(--aus-border) !important;
	border-radius: 5px !important;
}

.seach-wrapper-units .aura-search-widget .select2-container--default .select2-selection--single .select2-selection__rendered,
.aura-search-widget .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 45px !important;
	color: var(--aus-text) !important;
	padding-left: 1rem !important;
	padding-right: 4rem !important;
}

.seach-wrapper-units .aura-search-widget .select2-container--default .select2-selection--single .select2-selection__arrow,
.aura-search-widget .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 46px !important;
}

.aura-search-widget .search-btn {
	width: 100%;
	height: 48px;
	background: linear-gradient(135deg, var(--aus-accent) 0%, var(--aus-button-end) 100%);
	color: var(--aus-button-text);
	font-family: inherit;
	font-weight: 700;
	font-size: 0.875rem;
	letter-spacing: 0.05em;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	box-shadow: 0 4px 12px var(--aus-button-shadow);
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.aura-search-widget .search-btn:hover,
.aura-search-widget .search-btn:focus-visible {
	box-shadow: 0 6px 20px var(--aus-button-shadow-hover);
	transform: translateY(-1px);
}

.aura-search-widget .search-btn:active {
	transform: translateY(0);
}

.aura-search-widget .search-icon {
	flex-shrink: 0;
}

@media (max-width: 640px) {
	.aura-search-widget {
		padding: 2.5rem 5vw;
	}

	.aura-search-widget .project-title {
		font-size: 2rem;
	}

	.aura-search-widget .search-container {
		padding: 1.5rem;
	}

	.aura-search-widget .wrapper {
		gap: 1.75rem;
	}
}

/* Legacy [iun_search] embed — neutralize old .seach-wrapper-units styles */
.seach-wrapper-units {
	width: 100%;
	margin: 2rem 0 0;
	padding: 0;
	background: transparent;
}

.seach-wrapper-units .aura-search-widget {
	border-radius: 10px;
	overflow: visible;
	position: relative;
	z-index: 5;
}

.seach-wrapper-units,
.seach-wrapper-units .aura-search-widget .wrapper,
.seach-wrapper-units .aura-search-widget .search-container,
.seach-wrapper-units .aura-search-widget .search-grid,
.seach-wrapper-units .aura-search-widget .input-field {
	overflow: visible !important;
}

/* Keep the open dropdown above following page sections */
.object-wrapper .seach-wrapper-units,
.floor-wrapper .seach-wrapper-units,
.seach-wrapper-units:has(.select2-container--open) {
	position: relative;
	z-index: 40;
}

.seach-wrapper-units .aura-search-widget form.search-grid {
	display: grid !important;
	flex-wrap: unset;
	gap: 1.25rem !important;
	background: transparent !important;
	padding: 0 !important;
	border-radius: 0 !important;
}

.seach-wrapper-units .aura-search-widget form.search-grid > div {
	width: auto;
	flex: unset;
}

.seach-wrapper-units .aura-search-widget .unit-input input,
.seach-wrapper-units .aura-search-widget .input-field input {
	height: 48px !important;
	line-height: normal !important;
}

.seach-wrapper-units .aura-search-widget .search-btn {
	width: 100%;
}

.floor-wrapper .seach-wrapper-units,
.object-wrapper .seach-wrapper-units {
	margin-bottom: 0;
}

/* Units archive: mobile-only search toggle */
.ue-archive-search__toggle {
  display: none;
}

@media (max-width: 768px) {
  .post-type-archive-units .ue-archive-search,
  .search-results-wrapper .ue-archive-search {
    margin-bottom: 1rem;
  }

  .post-type-archive-units .ue-archive-search__toggle,
  .search-results-wrapper .ue-archive-search__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0 0 12px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--arb-bg, #0b1956) 14%, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    color: var(--arb-bg, #0b1956);
    font-family: var(--arb-font, 'Plus Jakarta Sans', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }

  .post-type-archive-units .ue-archive-search__chevron,
  .search-results-wrapper .ue-archive-search__chevron {
    flex: 0 0 auto;
    transition: transform 0.2s ease;
  }

  .post-type-archive-units .ue-archive-search.is-open .ue-archive-search__chevron,
  .search-results-wrapper .ue-archive-search.is-open .ue-archive-search__chevron {
    transform: rotate(180deg);
  }

  .ue-archive-search:not(.is-open) .ue-archive-search__panel {
    display: none !important;
  }

  .ue-archive-search.is-open .ue-archive-search__panel {
    display: block !important;
  }

  .ue-archive-search__toggle {
    display: inline-flex !important;
  }

  /* Hide intro title block inside the collapsed search on archive mobile */
  .post-type-archive-units .ue-archive-search .aura-search-widget .intro-block,
  .search-results-wrapper .ue-archive-search .aura-search-widget .intro-block {
    display: none;
  }

  .aura-search-widget .intro-block .project-title span {
    font-size: 18px;
}
}
