// BP Directory Search elements
// @since 3.0.0
// @version 7.0.0

.buddypress-wrap { // the ID is required to add weight to rules

	@include clearfix-element(".bp-dir-search-form, .bp-messages-search-form");

	form.bp-dir-search-form,
	form.bp-messages-search-form,
	form[data-bp-search].bp-invites-search-form,
	form#group-members-search {
		border: 1px solid $bp-border-color;

		width: 100%;

		label {
			margin: 0;
		}

		input[type="search"],
		input[type="text"],
		button[type="submit"] {
			background: none;
			border: 0;

			@include border-radius(0);
		}

		input[type="search"],
		input[type="text"] {
			float: left;
			line-height: 2;
			padding: 3px 10px;
			width: 78%;
		}

		button[type="submit"] {
			float: right;
			font-size: inherit;
			font-weight: 400;
			line-height: 1.5;
			padding: 3px 0.7em;
			text-align: center;
			text-transform: none;
			width: 20%;

			span {
				font-family: dashicons;

				@include font-size(18);
				line-height: 1.6;
			}
		}

		button[type="submit"].bp-show {

			@include show();
		}

		input[type="search"]::-webkit-search-cancel-button {
			-webkit-appearance: searchfield-cancel-button;
		}

		input[type="search"]::-webkit-search-results-button,
		input[type="search"]::-webkit-search-results-decoration {
			display: none;
		}

	} // close form

	form#group-members-search {

		&:hover {
			border: 1px solid darken($bp-border-color, 10%);
			box-shadow: inset 0 0 3px #eee;
		}
	}

	// this block needs to be moved really.
	ul.filters {

		li {

			form {

				label {

					input {
						line-height: 1.4;
						padding: 0.1em 0.7em;
					}
				}
			}
		}
	}

	.current-member-type,
	.current-group-type {
		font-style: italic;
	}

	.dir-form {
		clear: both;
	}

} // close .buddypress-wrap

// If js disabled ensure we show the submit overriding earlier rule
// @todo the whole show/hide could be wrapped in a :not(.no-js)
.budypress.no-js {

	form.bp-dir-search-form {

		button[type="submit"] {

			@include show();
		}
	}
}

// Try and apply correct tweaks for group/user screens search

.bp-user {

	[data-bp-search] {

		form {

			input[type="search"],
			input[type="text"] {
				padding: 6px 10px 7px;
			}

		}
	}
}

