/* AMTR Directories search controls. Loaded only where the teacher search form is available. */
.drts-search-form.drts-search-error:before {
	content:				"Select an instrument.\A Select a region and/or enter a location.";
	white-space: 			pre-line;
	padding:				8px 12px;
	float: 					left;
	margin-bottom: 			5px;
	background:				var(--orange);
	font-weight:			600;
}

.drts-search-form.drts-error-no-instrument-keyword-too-short:before {
	content:				"Select an instrument.\A Location must have 2 or more characters.";
}

.drts-search-form.drts-error-no-instrument:before {
	content:				"Select an instrument.";
}

.drts-search-form.drts-error-no-region:before {
	content:				"Select a suburb or region.";
}

.drts-search-form.drts-error-keyword-too-short:before {
	content:				"Location must have 3 or more characters.";
}

.drts-search-form.drts-error-no-instrument-mode:before {
	content:				"Select an instrument.\A Select a teaching mode.";
}

.drts-search-form.drts-error-no-mode:before {
	content:				"Select a teaching mode.";
}

.drts-search-form.drts-error-no-instrument-suburb:before {
	content:				"Select an instrument.\A Select a suburb for this search.";
}

.drts-search-form.drts-error-no-suburb:before {
	content:				"Select a suburb for this search.";
}

form.drts-search-form {
	background-color:		transparent				!important;
	text-shadow: 			none;
	padding:				0						!important;
	overflow:				visible;
}

form.drts-search-form select {
	opacity:				0;
}

form.drts-search-form select.amtr-search-mode {
	display:				block;
	width:					100%;
	height:				50px;
	min-height:			50px;
	opacity:				1;
	border:					1px solid var(--black) !important;
	box-shadow:			none;
	background-color:	#fff;
	color:					var(--black);
	cursor:					pointer;
	font-family:			inherit;
	font-size:				1rem;
}

form.drts-search-form select.amtr-search-mode-placeholder {
	color:					var(--green);
}

form.drts-search-form select.amtr-search-mode:focus-visible {
	outline:				3px solid var(--yellow);
	outline-offset:		2px;
}

.drts-search-keyword-text::-webkit-input-placeholder {
	color: 					var(--green)			!important;
}

.drts-search-keyword-text::-moz-placeholder {
	color: 					var(--green)			!important;
}

.drts-search-keyword-text:-ms-input-placeholder {
	color: 					var(--green)			!important;
}

.drts-search-keyword-text::placeholder {
	color: 					var(--green)			!important;
}

.drts-search-form-field .select2-container .select2-selection--single .select2-selection__rendered > * {
	position: 			absolute;
	top: 				calc(50% + .5px);
	transform: 			translateY(-50%);
}

.drts-search-form-field .drts-form-type-textfield input[type="text"],
.drts-search-form-field .select2-container .select2-selection--single {
	border: 			1px solid var(--black)	!important;
	box-shadow: 		none;
}

.drts-search-form-buttons {
	width: 					100%;
}

.drts-search-form .drts-search-form-field {
	margin-bottom:			5px					!important;
}

.drts-bs-btn-group .drts-search-form-submit.drts-bs-btn {
	height: 				50px 							!important;
	margin-right: 			0 ;
}

form.drts-search-form > div {
    width:					100%;
	display: 				grid;
	grid-column-gap:		2px;
	grid-row-gap:			0;
}

@media (max-width:799.98px) {
form.drts-search-form > div {
		grid-row-gap:		10px;
	}
}

@media (min-width:800px) and (max-width:1099.98px) {
form.drts-search-form > div {
		grid-template-columns:	1fr 1fr 90px;
		column-gap:			12px;
		row-gap:			12px;
	}

form.drts-search-form.amtr-mode-search > div {
		grid-template-columns:	minmax(220px, 1.25fr) minmax(170px, .8fr);
}

form.drts-search-form.amtr-mode-search .drts-search-form-field-buttons {
		grid-column:			1 / -1;
	}

form.drts-search-form.amtr-mode-search .drts-search-form-buttons .drts-bs-btn-group,
form.drts-search-form.amtr-mode-search .drts-search-form-buttons,
form.drts-search-form.amtr-mode-search .drts-search-form-submit {
		width:				100% !important;
	}

}

@media (min-width:1100px) {
form.drts-search-form > div {
		grid-template-columns: 	1fr 1fr 90px;
	}

form.drts-search-form.amtr-mode-search > div {
		grid-template-columns:	minmax(250px, 1.35fr) minmax(180px, .8fr) 90px;
}

form.drts-search-form.amtr-mode-search.amtr-mode-in-person > div {
		grid-template-columns:	minmax(260px, 1.25fr) minmax(185px, .85fr) minmax(270px, 1.4fr) 155px 90px;
	}

form.drts-search-form.amtr-mode-search.amtr-mode-in-person .drts-search-form-field-buttons {
		grid-column:			5;
		grid-row:			1;
	}

}

/* Mode/radius have few choices: keep Select2 styling without a search row. */
.amtr-search-form-field-mode .select2-search--dropdown,
.amtr-search-form-field-radius .select2-search--dropdown {
	display: none !important;
}

.amtr-search-form-field-radius {
	display: none;
}

form.drts-search-form .drts-view-filter-field-label {
	margin-bottom: 			5px						!important;
}

form.drts-search-form .drts-search-form-field-keyword .drts-clear {
	display:				none					!important;
}

form.drts-search-form .drts-bs-form-text {
	margin-top: 			0						!important;
}

#vp.amtr-hero #vp-form .drts-search-form-submit {
	border-color: #08775f !important;
	background: #08775f !important;
	color: #fff !important;
}

#vp.amtr-hero #vp-form .drts-search-form-submit:hover,
#vp.amtr-hero #vp-form .drts-search-form-submit:focus-visible {
	border-color: #06634f !important;
	background: #06634f !important;
}

/* Keep Select2's clear action and dropdown arrow in separate hit areas. */
.drts-search-form .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding-right: 82px !important;
}

.drts-search-form .select2-container--default .select2-selection--single .select2-selection__clear {
	position: absolute;
	top: 50%;
	right: 43px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--surface-soft);
	color: var(--blue);
	font-size: 21px !important;
	line-height: 1;
	text-indent: 0;
	transform: translateY(-50%);
	z-index: 2 !important;
}

.drts-search-form .select2-container--default .select2-selection--single .select2-selection__clear:hover,
.drts-search-form .select2-container--default .select2-selection--single .select2-selection__clear:focus-visible {
	background: var(--surface-soft-hover);
	color: var(--green);
}

.drts-search-form .select2-container--default .select2-selection--single .select2-selection__clear::after {
	content: none !important;
}

.drts-search-form .select2-container--default .select2-selection--single .select2-selection__arrow {
	right: 7px !important;
	width: 30px;
}

/* These fixed-choice fields have no clear button; keep only arrow spacing. */
form.drts-search-form .amtr-search-form-field-mode .select2-selection--single .select2-selection__rendered,
form.drts-search-form .amtr-search-form-field-radius .select2-selection--single .select2-selection__rendered {
	padding-right: 42px !important;
}
