// search.scss

// Defensive reset: some builders/themes apply a universal input reset in
// their layout scope (e.g. Divi `#et-boc .et-l input { border:none }`) that
// strips our search inputs. `all: revert` restores the browser default. Scoped
// to `.gv-themed` so only themed Views reset — Legacy Views keep the site
// theme's inherited styling, exactly as in 2.x.
.gv-themed .gv-widget-search {
	input[type="search"],
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="number"],
	input[type="tel"],
	input[type="date"],
	input[type="datetime-local"],
	input[type="time"],
	input[type="month"],
	input[type="week"],
	input[type="submit"],
	input[type="button"],
	input[type="reset"],
	input[type="checkbox"],
	input[type="radio"],
	select,
	textarea,
	button,
	a.button,
	.button {
		all: revert;
	}

	// Browsers have no built-in button styling for anchors, so link-as-buttons
	// (Clear, pagination) need affordances restored after the reset.
	a.button {
		display: inline-block;
		padding: 0.4em 1em;
		line-height: 1.4;
		text-decoration: none;
		cursor: pointer;
		vertical-align: middle;
	}
}

.gv-search-horizontal {

	// Get vertical centering
	display: table;

	width: 100%;

	.gv-search-box {
		#{$padding-right}: .5em;

		// Get vertical centering
		display: table-cell;
		height: 100%;
		vertical-align: top;

		p {
			display: block;
		}

		input,
		select {
			display: block;
		}

		select {
			width: 100%;
			max-width: 15em;
		}

		&.gv-search-date {

			max-width: 10em;

			input {
				width: 48%;
				float: $left;
				#{$margin-right}: 2%;
			}
		}

		&.gv-search-date {
			input {
				display: inline-block;
			}
		}

		&.gv-search-box-submit {
			vertical-align: middle;

		  	.gv-search-clear {
			  	float: $left;
			  	#{$margin-right}: 5px;
			}

		}

	}

}

.gv-widget-search {

	label.gv-check-radio {
		display: inline-block;
		margin-right: 1em;
		input {
			display: inline;
		}
	}

	&.gv-search-vertical {

		label.gv-check-radio {
			display: block;
			margin-bottom: 1em;
		}
	}

	.gv-search-box-links .active {
		font-weight: bold;
	}
}

.gv-search-clear {
  display: none;

  .gv-is-search & {
	display: inline-block;
  }
}