.search_container {
	display: inline-block;
	.x-form-field-trigger-wrap,
	.x-form-field-wrap {
		display: inline-block;
	}
	.x-form-field-trigger-wrap input {
		padding-top: 0 !important;
	}
	.x-btn-icon {
		.x-btn-icon-small-left {
			position: relative;
			top: 2px;
			left: -1px;
			border-left: none;
			height: 22px;
		}
	}
	/* search button */
	button.icon_magnifier {
		background-color: transparent;
		width: $button-small-height;
		height: $button-small-height !important;
	}
}

.k-searchcenterpanel {
	margin-left: $padding-small;
}

/* The search results grid */
.zarafa-searchgrid {
	.x-grid3-hd-row {
		td:first-child:active .x-grid3-hd-inner {
			background: inherit;
		}

		td:first-child:hover .x-grid3-hd-inner {
			border-color: #ffffff;
		}

		.zarafa-search-suggestion {
			font-style: italic;
			text-decoration: underline;
			color: $kopano-blue;
			cursor: pointer;
		}
		.x-grid3-td-name {
			width: 0 !important;
		}
		.x-grid3-hd.x-grid3-cell.x-grid3-td-column_icon.x-grid3-cell-first {
			width: 100% !important;
		}
	}

	span.body{
		opacity: 0.5;
	}

	span.subject {
		/* some padding to have some space between the fields */
		padding-right: $padding-extra-large;
	}

	.x-grid3-row-body-tr {
		.zarafa-grid-body-container {
			overflow: hidden;
			word-wrap: break-word;

			.grid_compact {
				line-height: $font-line-height-mail-grid-compact;
				min-height: $font-line-height-mail-grid-compact; /* we need this for when there is no title set */
				max-height: $font-line-height-mail-grid-compact; /* added 1px because letters get cut off at the bottom otherwise */
				padding-bottom: 1px;
				padding-top: $padding-small + 1px;
			}

			.grid_compact_left {
				padding-left: 36px;
			}

			.grid_compact_body {
				color: $grid-subject-color;
				overflow: hidden;
				font-weight: normal;
			}

			.grid_compact_subject {
				max-height: $font-line-height-mail-grid-compact;
				overflow: hidden;
			}

			.k-folder-location-container {
				@extend .k-category-container;
				text-align: left !important;
			}

			.k-folder-location {
				float: right;
				width: 130px;
			}

			.k-folder-name {
				padding: 0 $padding-medium;
				line-height: $font-default-size + 2px;
				margin-right: $padding-small;
				margin-bottom: $padding-small;
				display: inline-block;
				font-weight: bold;
			}

			.k-category-container {
				padding-top: $padding-medium;
			}
		}
	}

	.x-grid3-row {
		border-left: none;
		border-right: none;
	}

	.x-grid3-row.mail_unread {
		td {
			font-weight: bold;
		}
	}

	.with-no-subject {
		.grid_compact_body {
			max-height: 2 * $font-line-height-mail-grid-compact !important;
		}

		.k-category {
			float: right;
			display: flex;
			flex-direction: row-reverse;
			.k-category-container {
				max-width: none !important;
			}
		}

		.k-right-column {
			float: right;
			display: flex;
			flex-direction: column;
			max-width: 50%;
		}

		.k-folder-location-row{
			float: right;
		}
	}
}

/* The toolbox */
.zarafa-search-toolbox {
	border-top: 1px solid $grey;
	border-right: 1px solid $grey;
	padding: 0 0 $padding-large $padding-large;
	background-color: $background-color-main;

	.zarafa-search-toolbox-favoritesbutton-container {
		padding-right: 9px;
    	.x-btn.search-toolbox-favorites-button {
			display: block;
			.x-btn-small {
				em,button{
					width: 100%;
				}
			}
		}
	}

	.x-btn.x-btn-noicon, .x-btn.x-btn-text-icon {
		.x-btn-small {
			width: 100% !important;
			button {
				span {
					display: inline-block;
					padding-right: 25px;
				}
			}
		}
	}
	.x-plain-header {
		line-height: $font-default-line-height;
		box-sizing: border-box;
		height: $header-height - 1px; /* subtract the border */
		padding-top: ($header-height - $font-default-line-height)/2;

		img.x-panel-inline-icon.advance_search {
			width: 16px;
			height: 16px;
			vertical-align: middle;
			margin-right: $padding-medium;
			margin-top: -1px;
			margin-bottom: -1px;
		}
	}

	.x-fieldset {
		border: none;
		border: none;
		padding: 0 0 $padding-large;

		legend {
			padding-bottom: $padding-medium;
			font-weight: bold;
		}
	}
}

.zarafa-search-previewpanel-toolbar {
	margin-left: $padding-small + 2;
}

/* Input field loading mask */
.zarafa-searchfield.zarafa-tbar-loading {
	background-image: url(../images/loading.gif);
	background-repeat: no-repeat;
	background-position: right;
}

/* FIXME: fix in ExtJS JavaScript */
.zarafa-dateperiodfield-itemsCls .x-form-element
{
	padding-left: 10px !important;
}

.zarafa-searchfield-folders {
	width : 80px;
	padding-top: 0px !important;
	border-left : none;
}

.k-search-combobox-menu-sep-parent {
	margin: 3px 0;

	.k-search-combobox-menu-sep {
		margin: 0 !important;
		height: 0 !important;
		background-color: $grey !important;
		border-bottom-color: $grey !important;
	}
}

.k-search-node-owner {
	font-weight: normal;
	color: $grey6 !important;
}

.k-create-search-folder-panel {
	.x-form-item-label {
		font-weight: bold;
	}
}
