$loader-width: 20px;
$loader-height: 20px;
$fast-animation: 1.25s;
$animation-delay: 0.25s;
$blobb-first-color: rgb(45, 125, 154);
$blobb-second-color: rgb(0, 153, 188);
// Second blobb
$blobb-third-color: rgb(22, 160, 133);
$blobb-fourth-color: rgb(46, 204, 113);
$zoom-size: 1.2;
$ajax_bg_color: #f5f5f5;

.live-search-results {
	position: absolute;
	min-width: 200px;
	transition: all 0.25s ease;
	&.box-small-width{
		.item-thumb-link{
			width: 60px;
			height: 60px;
		}

		.group-posttype-post_product-items{
			.live-search-item {
				display: flex;

				&.item-has-thumbnail{
					.el-in-right{
						float: none;
					}
				}
			}
		}
	} 
} 
.ajax-result-content {
	width: 100%;
	overflow-y: auto;
	max-height: 420px;
	background: #fff;
	padding: 0;
	margin: 0;
	box-shadow: 0 0 0 1px rgba(39, 44, 48, 0.05),
		0 1px 5px 1px rgba(39, 44, 48, 0.16);
	border-radius: 2px;
	z-index: 99990;
}
.ajax-box-arrow {
	position: relative;
	height: 15px;
	overflow: hidden;
	display: block;
	&::before {
		content: "";
		position: absolute;
		top: 8px;
		left: 20px;
		-webkit-transform: rotate(45deg);
		transform: rotate(45deg);
		display: block;
		height: 15px;
		width: 15px;
		margin-left: -5px;
		background-color: #fff;
		box-shadow: 0 0 0 1px rgba(39, 44, 48, 0.05),
			0 1px 5px 1px rgba(39, 44, 48, 0.16);
		z-index: 99991;
	}
	&.box-down-arrow{
		&::before {
			top: -8px;
		}
	}
	&.accent-bg-color::before {
		background-color: $ajax_bg_color;
	}
}

.ps-ajax-loading {
	text-align: center;
	.ribble {
		display: inline-block;
		min-width: 33.33333%;

		.blobb {
			width: $loader-width;
			display: inline-block;
			height: $loader-height;
			margin-right: 1.5px;
			background-color: $blobb-first-color;
			-webkit-transition: 1s all ease-in-out;
			transition: 1s all ease-in-out;
			&.square {
				border-radius: 0%;
			}
			&.fast {
				-webkit-animation: blobb $fast-animation infinite;
				animation: blobb $fast-animation infinite;
			}
			&:nth-child(2) {
				-webkit-animation-delay: $animation-delay;
				animation-delay: $animation-delay;
			}
			&:nth-child(3) {
				-webkit-animation-delay: $animation-delay * 2;
				animation-delay: $animation-delay * 2;
			}
			&:nth-child(4) {
				-webkit-animation-delay: $animation-delay * 3;
				animation-delay: $animation-delay * 3;
			}
			&:nth-child(5) {
				-webkit-animation-delay: $animation-delay * 4;
				animation-delay: $animation-delay * 4;
			}
		}
	}
}

/* Animation */

@-webkit-keyframes blobb {
	0%,
	25% {
		background: $blobb-first-color;
		-webkit-transform: scale(1);
		transform: scale(1);
	}
	50% {
		background-color: $blobb-second-color;
		-webkit-transform: scale($zoom-size);
		transform: scale($zoom-size);
	}
	100% {
		background-color: $blobb-first-color;
		-webkit-transform: scale(1);
		transform: scale(1);
	}
}

@keyframes blobb {
	0%,
	25% {
		background: $blobb-first-color;
		-webkit-transform: scale(1);
		transform: scale(1);
	}
	50% {
		background-color: $blobb-second-color;
		-webkit-transform: scale($zoom-size);
		transform: scale($zoom-size);
	}
	100% {
		background-color: $blobb-first-color;
		-webkit-transform: scale(1);
		transform: scale(1);
	}
}

.live-search-item {
	padding: 10px;
	border-bottom: 1px solid $ajax_bg_color;
	border-top: 1px solid transparent;
	line-height: 22px;
	&:first-child {
		margin-top: 0;
	}
	&:last-child {
		border-bottom-color: transparent;
	}
	&::after {
		content: "";
		display: table;
		clear: both;
	}
	&:hover,
	&.hightlight {
		background: $ajax_bg_color;
		border-top: 1px solid darken($ajax_bg_color, 10%);
		border-bottom: 1px solid darken($ajax_bg_color, 10%);
	}
	.item-wrap{
		flex-basis: 100%;
	}
	&.item-has-thumbnail{
		display: flex;
		justify-content: flex-start;
		align-items: center;
		.item-thumb{
			margin-right: 10px;
			flex-basis: 60px;
		}
		.item-thumb ~ .item-wrap{
			flex-basis: calc(100% - 60px);
		}
	}
	.item-wrap {
		.item-title {
			display: block;
			margin-bottom: 0.2em;
			margin-top: 0;
			font-size: 14px;
			font-weight: 500;
			text-align: left;
			color: #333;
			.item-title-link {
				text-decoration: none;
				box-shadow: none;
				color: #000;
			}
		}
		.item-excerpt {
			font-size: 13px;
			line-height: 21px;
			color: #32373c;
			word-wrap: break-word;
			text-align: left;
			p {
				margin: 5px 0 !important;
			}
		}
	}
}

.list-suggest-keywords {
	.live-search-item {
		padding: 6px 10px;
		.item-title {
			padding: 0;
		}
	}
}

.suggest-keyword {
	cursor: pointer;
	padding: 10px;
	margin: 0;
	line-height: 22px;
	text-align: left;
}

.ajax-result-content {
	.group-posttype {
		.group-posttype-label {
			box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
			text-transform: uppercase;
			background: $ajax_bg_color;
			text-align: left;
			padding: 5px 10px 4px;
			color: #a0a0a0;
			margin: 0;
			font-size: 12px;
			line-height: 22px;
			.group-label {
				font-size: 13px;
				color: #000;
				font-weight: 600;
			}
			.posttype-results-link{
				float: right;
				font-size: 12px;
				text-transform: capitalize;
				font-weight: 600;
			}
		}
	}
}

.group-posttype {
	&::after {
		content: "";
		display: table;
		clear: both;
	}
}

.ajax-no-result {
	padding: 10px;
	box-shadow: none;
	color: #000;
	font-size: 14px;
	font-weight: 600;
	background-color: #fff;
}
.align-center {
	text-align: center;
}

.nothing-match-result {
	text-align: center;
	color: #000;
	font-size: 14px;
	font-weight: 600;
	padding: 10px;
	margin-bottom: 0!important;
}
.col-loading-picture {
	margin-right: 10px;
}

.item-thumb-link {
	outline: none;
	display: inline-block;
	width: 50px;
	height: 50px;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	text-decoration: none!important;
	box-shadow:none!important;
	&:hover{
		text-decoration: none!important;
		box-shadow: none!important;
	}
}

.ph-item {
	position: relative;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	padding: 10px;
	overflow: hidden;
	background-color: #fff;
	border-bottom: 1px solid #e6e6e6;
	border-radius: 0px;

	&:last-child {
		border-bottom: none;
	}
}
.ph-item,
.ph-item *,
.ph-item ::after,
.ph-item ::before {
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}
.ph-item::before {
	content: " ";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 50%;
	z-index: 1;
	width: 500%;
	margin-left: -250%;
	-webkit-animation: phAnimation 0.8s linear infinite;
	animation: phAnimation 0.8s linear infinite;
	background: -webkit-gradient(
			linear,
			left top,
			right top,
			color-stop(46%, rgba(255, 255, 255, 0)),
			color-stop(50%, rgba(255, 255, 255, 0.35)),
			color-stop(54%, rgba(255, 255, 255, 0))
		)
		50% 50%;
	background: linear-gradient(
			to right,
			rgba(255, 255, 255, 0) 46%,
			rgba(255, 255, 255, 0.35) 50%,
			rgba(255, 255, 255, 0) 54%
		)
		50% 50%;
}
.ph-item > * {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-ms-flex-flow: column;
	flex-flow: column;
	padding-right: 0;
	padding-left: 0;
}

.ph-row {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	margin-bottom: 7.5px;
	justify-content: center;
}
.ph-row div {
	height: 10px;
	margin-bottom: 7.5px;
	background-color: #ced4da;
}
.ph-row .big,
.ph-row.big div {
	height: 20px;
	margin-bottom: 15px;
}
.ph-row .empty {
	background-color: rgba(255, 255, 255, 0);
}

.ph-col-2 {
	-webkit-box-flex: 0;
	-ms-flex: 0 0 16.66667%;
	flex: 0 0 16.66667%;
}

.ph-col-4 {
	-webkit-box-flex: 0;
	-ms-flex: 0 0 33.33333%;
	flex: 0 0 33.33333%;
	&.col-loading-picture {
		-ms-flex: 0 0 75px;
		flex: 0 0 75px;
	}
}

.ph-col-6 {
	-webkit-box-flex: 0;
	-ms-flex: 0 0 50%;
	flex: 0 0 50%;
}

.ph-col-8 {
	-webkit-box-flex: 0;
	-ms-flex: 0 0 66.66667%;
	flex: 0 0 66.66667%;
}

.ph-col-10 {
	-webkit-box-flex: 0;
	-ms-flex: 0 0 83.33333%;
	flex: 0 0 83.33333%;
}

.ph-col-12 {
	-webkit-box-flex: 0;
	-ms-flex: 0 0 100%;
	flex: 0 0 100%;
}

.ph-avatar {
	position: relative;
	width: 100%;
	min-width: 60px;
	background-color: #ced4da;
	margin-bottom: 15px;
	border-radius: 50%;
	overflow: hidden;
}
.ph-avatar::before {
	content: " ";
	display: block;
	padding-top: 100%;
}

.ph-picture {
	width: 75px;
	height: 75px;
	background-color: #ced4da;
	margin-bottom: 15px;
}

@-webkit-keyframes phAnimation {
	0% {
		-webkit-transform: translate3d(-30%, 0, 0);
		transform: translate3d(-30%, 0, 0);
	}
	100% {
		-webkit-transform: translate3d(30%, 0, 0);
		transform: translate3d(30%, 0, 0);
	}
}

@keyframes phAnimation {
	0% {
		-webkit-transform: translate3d(-30%, 0, 0);
		transform: translate3d(-30%, 0, 0);
	}
	100% {
		-webkit-transform: translate3d(30%, 0, 0);
		transform: translate3d(30%, 0, 0);
	}
}

.loading-picture {
	margin-bottom: 0;
}

.search-box-triagle {
	position: absolute;
	top: -15px;
	left: 20px;
	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
	display: block;
	height: 10px;
	width: 10px;
	margin-left: -5px;
	background-color: $ajax_bg_color;
	box-shadow: 0 0 0 1px rgba(39, 44, 48, 0.05),
		0 1px 5px 1px rgba(39, 44, 48, 0.16);
}

.see-all-results {
	background: $ajax_bg_color;
	border-top: 1px solid darken( $ajax_bg_color, 10% );
	text-align: center;
	padding: 6px;
	.all-results-link {
		color: #333;
		font-size: 13px;
		font-weight: 600;
		text-decoration: none!important;
		box-shadow: none!important;
		line-height: 22px;
		&:hover{
			text-decoration: none!important;
			box-shadow: none!important;
		}
	}
}


body.rtl{
	.ajax-box-arrow{
		&::before {
			left: auto;
			right: 20px;
		}
	}
	.ajax-result-content {
		.group-posttype {
			.group-posttype-label{
				text-align: right;
				.posttype-results-link{
					float: left;
				}
			}
		}
		.live-search-item {
			.item-wrap {
				.item-title {
					text-align: right;
				}
			}
			&.item-has-thumbnail {
				.item-thumb {
					margin-right: 0;
					margin-left: 10px;
				}
			}
		}
	}
}

.ps-display-none{
	display: none!important;
}

.el-in-right {
	float: right;
	font-size: 13px;
}

.live-search-item[data-href],
.live-search-item[data-href] .item-title {
	cursor: pointer !important;
}


