@import "variables";
.p-search {}

.p-search-form {
	max-width: 560px;
	margin-bottom: 20px;
	font-size: 16px;
	//color: #9B9B9B;
	.form-group {
		//display: flex;
		padding-top: 4px;
		.form-field {
			flex-grow: 1;
			.form-control {
				@include border-radius(3px 0 0 3px);
			}
		}
		.form-btn {
			.btn {
				padding-left: 16px;
				padding-right: 16px;
				@include border-radius(0 3px 3px 0);
				.fa {
					margin-right: 4px;
				}
			}
		}
	}
}

.p-search-request {
	margin-bottom: 20px;
	font-size: 16px;
	h1 {
		margin: 0;
		font-size: 20px;
		font-weight: normal;
	}
	&.has-error {
		color: $red;
		h1 {
			color: $red;
		}
	}
}

.p-search-panel {
	max-width: 560px;
	margin-bottom: 20px;
	padding: 12px;
	@media(max-width: 767px){
		margin-left: -12px;
		margin-right: -12px;
	}
	.panel__head {
		margin-bottom: 12px;
		font-size: 16px;
		.icobox {
			padding-left: 32px;
		}
	}
	.panel__body {}
	&.panel_gray {
		background: #F6F6F6;
	}
	&.panel_wide {
		max-width: 650px;
	}
}

.p-search-car {
	@media(min-width: 767px){
		margin-left: 32px;
		margin-right: 32px;
	}
	.p-search-car__tile {
		display: flex;
		flex-wrap: wrap;
		margin-left: -4px;
		margin-right: -4px;
		.p-search-car-item {
			width: 33.3333%;
			@media(max-width: 575px){
				width: 50%;
			}
			margin-bottom: 8px;
			padding-left: 4px;
			padding-right: 4px;
			max-width: none;
			.item-body, a.item-body {
				.item-image {
					@media(min-width: 767px){
						min-height: 101px;
					}
				}
			}
		}
		&.hide {
			display: none;
		}
	}
	.p-search-car__footer {
		padding-top: 4px;
		font-size: 16px;
		a {
			border: 0;
			color: #7E93B2;
			text-decoration: none;
		}
	}
	&.in {
		.p-search-car__tile {
			&.hide {
				display: flex !important;
			}
		}
		.p-search-car__footer {
			display: none;
		}
	}
}
.p-search-car-item {
	display: flex;
	max-width: 160px;
	.item-body, a.item-body {
		background: $blue;
		border: 0;
		flex-grow: 1;
		text-decoration: none;
		.item-image {
			img {
				display: block;
				width: 100%;
			}
		}
		.item-content {
			//background: $blue;
			padding: 8px 8px 6px;
			font-size: 12px;
			font-weight: bold;
			line-height: normal;
			color: $white;
		}
		.highlight {
			background: #FFE180;
			padding: 0;
			color: $gray_dark;
		}
		&:hover {
			background: darken($blue, 7%);
			.item-image {
				opacity: .75;
			}
		}
	}
}

.p-search-list {
	margin: 0;
	padding: 0;
	list-style: none;
	& > li {
		&:not(:first-child){
			margin-top: 12px;
		}
	}
}
.p-search-category, a.p-search-category {
	border: 0;
	display: flex;
	align-items: center;
	.item-image {
		position: relative;
		background: $white;
		width: 72px;
		height: 48px;
		min-width: 72px;
		.item-image__bg {
			display: block;
			width: 100%;
		}
		.item-image__img {
			position: absolute; top: 50%; left: 50%;
			display: block;
			max-width: 100%;
			max-height: 100%;
			@include transform(translateX(-50%) translateY(-50%));
		}
	}
	.item-content {
		margin-left: 12px;
	}
	.item-name {
		font-weight: bold;
		font-size: 16px;
		color: $blue;
	}
	.item-description {
		font-weight: bold;
		font-size: 14px;
		color: #9B9B9B;
		text-transform: uppercase;
	}
	.highlight {
		background: #FFE180;
		padding: 0;
	}
	&:hover {
		//background: rgba(0,0,0,.025);
		.item-name {
			text-decoration: underline;
		}
	}
}

.p-search-spare, a.p-search-spare {
	border: 0;
	display: flex;
	font-size: 14px;
	color: #2C2C2C;
	.item-image {
		position: relative;
		background: $white;
		width: 72px;
		min-width: 72px;
		.item-image__bg {
			display: block;
			width: 100%;
		}
		.item-image__img {
			position: absolute; top: 50%; left: 50%;
			display: block;
			max-width: 100%;
			max-height: 100%;
			@include transform(translateX(-50%) translateY(-50%));
		}
	}
	.item-content {
		margin-left: 12px;
		.highlight {
			background: #FFE180;
			padding: 0;
		}
		.light {
			color: $color_gray_40;
		}
	}
	.item-name {
		font-weight: bold;
		color: $blue;
	}
	&:hover {
		.item-name {
			//color: $blue;
			text-decoration: underline;
		}
	}
}

.p-search-popular {
	display: flex;
	flex-wrap: wrap;
	margin: -4px -4px 0;
	padding: 0;
	list-style: none;
	& > li {
		width: 20%;
		padding: 4px 4px 8px;
		@media(max-width: 575px){
			width: 50%;
		}
	}
	.product-preview, a.product-preview {
		color: $blue;
		.product-preview__head {
			.img-aligner {}
		}
		.product-preview__body {
			padding-bottom: 6px;
			.name {
				font-weight: normal;
				line-height: 1.15;
				color: inherit;
				text-align: left;
			}
		}
		&:hover {
			background: $blue;
			color: #fff;
		}
	}
}

.admin-search-list {
	margin-bottom: 20px;
	.admin-search-list__head {
		background: #E9E9E9;
		display: flex;
		color: #9B9B9B;
		@media(max-width: 991px){
			display: none;
		}
		.head-col {
			padding: 4px;
			font-size: 11px;
			font-weight: bold;
			.js-table-sort {
				position: relative;
				overflow: hidden;
				display: block;
				max-width: 100%;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
			&.first {
				flex-grow: 1;
			}
			&:not(.first){
				border-left: 1px solid #d2d2d2;
				width: 120px;
				min-width: 120px;
				text-align: right;
			}
		}
	}
	.admin-search-item {
		border-bottom: 1px solid #E1E1E1;
		display: flex;
		font-size: 14px;
		.item-image {
			background: $white;
			position: relative;
			align-self: flex-start;
			width: 72px;
			height: 54px;
			min-width: 72px;
			margin: 4px 0;
			.item-image__bg {
				display: block;
				width: 100%;
			}
			.item-image__img {
				position: absolute; top: 50%; left: 50%;
				display: block;
				max-width: 100%;
				max-height: 100%;
				@include transform(translateX(-50%) translateY(-50%));
			}
		}
		.item-body {
			display: flex;
			flex-grow: 1;
			@media(max-width: 991px){
				flex-direction: column;
			}
		}
		.item-description, a.item-description {
			border: 0;
			flex-grow: 1;
			padding: 4px 8px;
			color: $gray_dark;
			.light {
				color: $color_gray_40;
			}
			&:hover {
				.item-name {
					color: $blue;
					text-decoration: underline;
				}
			}
		}
		.item-name {
			font-weight: bold;
			color: $blue;
		}
		.item-table {
			display: flex;
			@media(max-width: 991px){
				max-width: 420px;
				padding-left: 4px;
				padding-right: 4px;
			}
			.item-table__col {
				text-align: right;
				font-weight: bold;
				@media(min-width: 992px){
					border-left: 1px solid #E1E1E1;
					width: 120px;
					min-width: 120px;
					padding: 4px;
				}
				@media(max-width: 991px){
					flex-direction: column;
					flex-grow: 1;
					/*&:not(:first-child){
						margin-left: 16px;
					}*/
				}
			}
			.item-table__label {
				font-size: 12px;
				font-weight: normal;
				//text-align: left;
				@media(min-width: 992px){
					display: none;
				}
			}
		}
	}
	.highlight {
		background: #FFE180;
		padding: 0;
	}
}