/**
 * HD Estatik Search module
 * Recreates the Portal-theme + estatik-custom search module look, standalone.
 * Accent color: #16add0 (Portal theme accent).
 */

/* ------------------------------------------------------------------
 * Scoped mini-grid (the old markup relied on Portal's Bootstrap grid)
 * ------------------------------------------------------------------ */
.hd-estatik-search .form-row {
	display: flex;
	flex-wrap: wrap;
	margin-right: -5px;
	margin-left: -5px;
}
.hd-estatik-search .col {
	position: relative;
	flex-basis: 0;
	flex-grow: 1;
	max-width: 100%;
	min-width: 0;
	padding-right: 5px;
	padding-left: 5px;
}
.hd-estatik-search .col-auto {
	position: relative;
	flex: 0 0 auto;
	width: auto;
	max-width: 100%;
	padding-right: 5px;
	padding-left: 5px;
}
.hd-estatik-search .col-sm-4 {
	position: relative;
	width: 100%;
	min-width: 0;
	padding-right: 5px;
	padding-left: 5px;
	flex: 0 0 100%;
	max-width: 100%;
}
@media (min-width: 576px) {
	.hd-estatik-search .col-sm-4 {
		flex: 0 0 33.33333%;
		max-width: 33.33333%;
	}
}
.hd-estatik-search .hidden {
	display: none;
}

/* ------------------------------------------------------------------
 * Fields (ported from Portal _advanced-search.scss)
 * ------------------------------------------------------------------ */
.hd-estatik-search .ept-field,
.hd-estatik-search .ept-btn__wrap {
	padding: 5px;
}
.hd-estatik-search .ept-field input[type=text],
.hd-estatik-search .ept-field input[type=number],
.hd-estatik-search .ept-field select:not([multiple]) {
	border-radius: 3px;
	background-color: #fff;
	width: 100%;
	height: 33px !important;
	border: 0;
	padding: 6px 9px;
	box-shadow: none;
}
.hd-estatik-search .ept-field input[type=text]:focus,
.hd-estatik-search .ept-field input[type=number]:focus,
.hd-estatik-search .ept-field select:focus {
	outline: none;
	box-shadow: none;
}
.hd-estatik-search .ept-field option,
.hd-estatik-search .ept-field input[type=text],
.hd-estatik-search .ept-field input[type=number],
.hd-estatik-search .ept-field select:not([multiple]) {
	letter-spacing: -0.3px;
	color: #888;
	font-size: 14px;
}
.hd-estatik-search .es-autocomplete-wrap {
	position: relative;
}
.hd-estatik-search .es-autocomplete-result {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 1000;
}

/* select2 inside the form */
.hd-estatik-search .ept-field .select2 {
	width: 100% !important;
}
.hd-estatik-search .ept-field .select2-container {
	min-height: 33px;
}
.hd-estatik-search .ept-field .select2-container--default .select2-selection {
	border: 0;
	border-radius: 3px;
	min-height: 33px;
}
.hd-estatik-search .ept-field .select2-container--default .select2-selection--single {
	height: 33px;
}
.hd-estatik-search .ept-field .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 33px;
	color: #888;
	font-size: 14px;
	letter-spacing: -0.3px;
}
.hd-estatik-search .ept-field .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 33px;
}
.hd-estatik-search .ept-field .select2-container--default .select2-selection--multiple {
	border: 0;
	padding: 2px !important;
}
.hd-estatik-search .ept-field .select2-container--default .select2-selection--multiple .select2-selection__rendered {
	padding: 0;
}
.hd-estatik-search .ept-field .select2-selection__choice {
	border-radius: 3px;
	border: 0;
	background: #16add0;
	color: #fff;
	font-size: 13px;
	padding: 4px;
	margin: 3px 2px 2px 3px;
}
.hd-estatik-search .ept-field .select2-selection__choice__remove {
	color: #fff;
	margin-right: 4px;
}
.hd-estatik-search .ept-field .select2-search__field {
	background-color: #fff;
	letter-spacing: -0.3px;
	font-size: 14px !important;
	color: #888;
	margin-top: 6px !important;
	margin-left: 4px;
	width: auto;
}
.es-search-dropdown {
	border: 0 !important;
	border-bottom-right-radius: 3px;
	border-bottom-left-radius: 3px;
	z-index: 10510;
}
.es-search-dropdown .select2-results__option,
.es-search-dropdown .select2-results__option[aria-selected] {
	background: #fff !important;
	font-size: 15px;
	color: #757575 !important;
	padding: 5px 12px !important;
}
.es-search-dropdown .select2-results__option--highlighted,
.es-search-dropdown .select2-results__option--highlighted[aria-selected] {
	background: #f2f2f2 !important;
}

/* ------------------------------------------------------------------
 * Buttons (Portal look: teal primary, ghost secondary)
 * ------------------------------------------------------------------ */
.hd-estatik-search .btn {
	display: inline-block;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	border-radius: 3px;
	font-size: 14px;
	line-height: 1.2;
	width: 100%;
	transition: all .2s ease;
}
.hd-estatik-search .ept-btn-primary,
.hd-estatik-search .ept-btn-primary:focus {
	background: #16add0;
	color: #fff;
	border: 1px solid transparent;
	height: 33px;
}
.hd-estatik-search .ept-btn-secondary,
.hd-estatik-search .ept-btn-secondary:focus {
	background: transparent;
	color: #fff;
	border: 1px solid #fff;
	height: 33px;
}

/* ------------------------------------------------------------------
 * Price row + "More Options" toggle (ported)
 * ------------------------------------------------------------------ */
.hd-estatik-search .ept-search__price-row {
	margin-top: 32px;
	position: relative;
	align-items: center;
}
.hd-estatik-search .ept-search__price-row a {
	color: #fff;
	text-decoration: none;
	font-size: 15px;
}
.hd-estatik-search .ept-search__price-row .ept-more-opt {
	margin-left: 15px;
	text-align: right;
	min-width: 130px;
}
.hd-estatik-search .js-toggle-container:before {
	content: '-';
	margin-right: 10px;
	font-size: 22px;
	font-weight: 100;
	line-height: 0;
	position: relative;
	top: 2px;
}
.hd-estatik-search .js-toggle-container.el-hidden:before {
	content: '+';
}
.hd-estatik-search .amount {
	margin-bottom: 10px;
	color: #fff;
	position: absolute;
	top: -20px;
	left: 5px;
	font-size: 15px;
}

/* ------------------------------------------------------------------
 * Dual-range slider (ported look from esc.css / jQuery-UI skin)
 * ------------------------------------------------------------------ */
.hd-estatik-search .ept-price-container {
	padding: 6px 10px 0 10px;
}
.hd-estatik-search .hd-slider {
	position: relative;
	height: 15px;
	margin-top: 13px;
	cursor: pointer;
}
.hd-estatik-search .hd-slider__track {
	position: absolute;
	top: 6px;
	left: 0;
	right: 0;
	height: 2px;
	background: #fff;
	border: 0.2px solid #fff;
	border-radius: 25px;
	box-shadow: 1px 1px 1px #fff, 0 0 1px #fff;
}
.hd-estatik-search .hd-slider__fill {
	position: absolute;
	top: 6px;
	height: 2px;
	background: #16add0;
	box-shadow: 1px 1px 1px #16add0, 0 0 1px #16add0;
}
.hd-estatik-search .hd-slider__handle {
	position: absolute;
	top: -1px;
	height: 15px;
	width: 15px;
	margin-left: -7px;
	border-radius: 15px;
	background: #16add0;
	box-shadow: 1px 1px 1px #16add0, 0 0 1px #16add0;
	cursor: pointer;
	touch-action: none;
	transition: transform .1s ease;
}
.hd-estatik-search .hd-slider__handle:hover,
.hd-estatik-search .hd-slider__handle:focus-visible {
	transform: scale(1.2);
	box-shadow: 0 0 3px 0 rgb(22, 173, 208);
	outline: none;
}

/* ------------------------------------------------------------------
 * Mobile tweaks
 * ------------------------------------------------------------------ */
@media (max-width: 575px) {
	.hd-estatik-search .ept-search__price-row {
		flex-wrap: wrap;
	}
	.hd-estatik-search .ept-search__price-row .col-auto {
		margin-top: 12px;
		margin-left: auto;
	}
}
