.dropdown_categories,
.dropdown_subcategories {
	background: white;
	border: 0;
	display: none;
	position: absolute !important;
	top: 100%;
	left: 0;
	right: 0;
	width: 100%;
	padding: 0;
	li {
		float: none;
		border: 0;
		border-top: 1px solid @color-gray-9;
	}
	a {
		text-align: left;
		display: block;
		position: relative;
		.typography-rule(1);
		.typography-lineheight(20px);
		.generate-spacing-rule(1,padding,all);
		.link--accessory;
		&:hover {
			border: 0;
		}
		p {
			color: @color-gray-7;
			float: right;
			padding: 0;
			.typography-rule(0);
			.typography-lineheight(20px);
			.generate-spacing-rule(2,padding,left);
		}
	}
}

.focus,
.open {
	border-radius: @custom-select-focus-radius;
	& + .custom-select__arrow,
	.custom-select__arrow {
		transform: rotate(90deg) scale(-1,1);
	}
	& + .multiselect-filter {
		display: block;
		& + .custom-select__arrow {
			transform: rotate(90deg) scale(-1,1);
		}
	}
	.select {
		border-radius: @global-radius @global-radius 0 0;
	}
	.options {
		display: block;
	}
}

.select {
	border-radius: @custom-select-border-radius;
}

.options {
	display: none;
}

//This is temporarily coded like this, until multiselect is placed everywhere

.custom-select__arrow {
	display: flex;
	align-items: center;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 40px;
	transform: rotate(90deg) scale(1);
	.transition(all 0.5s);
	.generate-spacing-rule(1,padding,all);
	svg {
		stroke: @color-gray-3;
		margin: 0 auto;
		cursor: pointer;
	}
}

.custom-select {
	background: white;
	position: relative;
	&.active {
		z-index: 7;
	}
	&.open {
		z-index: 20;
	}
	&.error {
		.select {
			color: @color-error;
			border: 1px solid @color-error;
		}
	}
	&.opposite {
		.select {
			&.focus {
				border-radius: 0 0 @global-radius @global-radius;
			}
		}
		.options {
			top: auto;
			bottom: 100%;
			border: 1px solid @color-gray-9;
			border-bottom: 0;
			border-radius: @custom-options-border-radius-opposite;
		}
	}
	.select {
		color: @color-gray-3;
		border: 1px solid @color-gray-9;
		display: flex;
		align-items: center;
		min-height: 50px;
		position: relative;
		cursor: pointer;
		z-index: 1;
		.typography-rule(1);
		.generate-spacing-rule(1,padding,all);
		.generate-spacing-rule(5,padding,right,15px);
		&:before {
			content: "";
			background: rgba(255,255,255,0);
			display: block;
			position: absolute;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
			border: 0;
		}
		a {
			display: block;
			cursor: pointer;
			padding: 0;
			border: 0;
			text-overflow: ellipsis;
			text-transform: none;
			overflow-y: hidden;
			.typography-rule(1);
			.link--accessory;
			&:hover {
				border: 0;
			}
			svg {
				display: none;
			}
		}
	}
	.multiselect-filter {
		input {
			border: 0;
			padding: 0;
			height: auto;
		}
		& ~ .options {
			border-top: 1px solid @color-gray-9;
			ul {
				li {
					border: 0;
					border-bottom: 1px solid @color-gray-9;
					&:last-of-type {
						border-bottom: 0;
					}
				}
			}
		}
	}
	.options {
		background: white;
		border: 1px solid @color-gray-9;
		border-top: 0;
		border-radius: @custom-options-border-radius;
		position: absolute;
	  	top: 100%;
		width: 100%;
		max-height: 400px;
		overflow-y: auto;
		li {
			border-top: 1px solid @color-gray-9;
			float: none !important;
			&:first-of-type {
				border: 0;
			}
			&.multiselect-item--header {
				background: @color-gray-9;
				> label {
					.generate-spacing-rule(1,padding,top);
					.generate-spacing-rule(1,padding,bottom);
					.generate-spacing-rule(1,padding,left);
					.generate-spacing-rule(1,padding,right);
					margin:0;
				}
			}
			&.active {
				background: @color_main;
				&:hover {
					background: @color_main;
				}
				a,
				label {
					color: white;
				}
			}
			> a {
				white-space: normal;
				display: block;
				cursor: pointer;
				.link--inherit;
				.generate-spacing-rule(1,padding,all);
				label {
					.element--nomargin;
					.element--nopadding;
					font-size: inherit;
					input[type="radio"],
					input[type="checkbox"] {
						display: none !important;
					}
				}
			}
		}
	}
}

.dropdown_categories_holder {
	background: @categories-holder-background;
	position: fixed;
	top: @categories-holder-top;
	width: @categories-holder-width;
	max-width: @categories-max-width;
	z-index: 30;
	&.dropdown_categories_holder--active {
		.mobile_list_holder {
			border-radius: @mobile-list-border-radius 0 0 @mobile-list-border-radius;
		}
		.dropdown_categories {
			border-radius: 0 0 0 @mobile-list-border-radius;
		}
		.mobile_list_holder {
			.navigation--tabs--categories {
				li {
					&:last-of-type {
						border-radius: 0;
						&.active {
							a {
								border-radius: 0;
							}
						}
					}
				}
			}
		}
	}
	.slider__arrow {
		display: none;
		svg {
			stroke: @color-error;
		}
	}
	@media only screen and (max-width: @categories-media-max-width) {
		background: white;
		display: block !important;
		position: fixed;
		top: 0 !important;
		left: 0 !important;
		width: 100%;
		max-width: 100%;
		height: 100%; //Resetting the one from above
		.translate(100%,0);
		overflow: hidden;
		z-index: 9999;
		.generate-spacing-rule(2,padding,bottom);
		.slider__arrow {
			display: none;
		}
	}
	.mobile_list_holder {
		background: @mobile-list-background;
		border: 1px solid @color-gray-9;
		border-top: 0;
		border-radius: @mobile-list-border-radius;
		position: relative;
		min-width: 300px;
		transform-style: preserve-3d;
		transition: transform 0.6s ease;
		@media only screen and (max-width: @categories-media-max-width) {
			border: 0;
			.box-shadow(none);
			border-radius: 0;
		}

		.navigation--tabs--categories {
			border-bottom: 1px solid @color-gray-9;
			@media only screen and (min-width: @categories-media-min-width) {
				li {
					border-radius: @mobile-list-border-radius 0 0 0;
					a {
						border-radius: @mobile-list-border-radius 0 0 0;
					}

					&:last-of-type {
						border-radius: 0 @mobile-list-border-radius 0 0;
						a {
							border-radius: 0 @mobile-list-border-radius 0 0;
						}
					}
				}
			}
			@media only screen and (max-width: @categories-media-max-width) {
				a {
					border-radius: 0;
					.generate-spacing-rule(4,padding,top,3px);
					.generate-spacing-rule(4,padding,bottom,3px);
				}
			}
		}
	}
}

.dropdown_subcategories {
	background-color: white;
	background-position: right bottom;
	border: @categories-sub-border;
	border-top: @subcategories-border-top;
	border-radius: @subcategories-border-radius;
	display: none;
	top: 0;
	min-height: calc(~"100% + 1px");
	.translate3d(300px,0,0);
	li,
	.dropdown_subcategories__list__item {
		&:first-of-type {
			border-top: 0;
		}
	}
	a {
		padding: 0;
		&:hover {
			text-decoration: none;
		}
		svg {
			display: none;
		}
	}
	img {
		display: block;
		position: @subcategories-cover-position;
		right: 0;
		bottom: 0;
		@media only screen and (max-width: @categories-media-max-width) {
			display: none;
		}
	}
	@media only screen and (min-width: @categories-media-min-width) {
		position: @subcategories-position;
		max-width: @subcategories-max-width;
		padding: @subcategories-padding;
		margin: 0 auto;
		&.dropdown_subcategories__double {
			width: @subcategories-double-width;
			> .dropdown_subcategories__list {
				.content-columns(2,20px);
				.clear_fix;
				.typography-rule(0);
				> .dropdown_subcategories__list__item,
				li {
					-webkit-column-break-inside: avoid;
					page-break-inside: avoid;
					break-inside: avoid-column;
				}
				> .dropdown_link_title {
					vertical-align: baseline;
				}
			}
		}
		&.dropdown_subcategories_cover {
			background-position: right bottom;
			background-repeat: no-repeat;
		}
		> .dropdown_subcategories__list {
			display: block !important;
			height: 100%; //Keeps each subcategory correctly positioned in all browsers
		}
		.slick-list {
			max-width: 990px; // This should be moved for antelope's only
		}
		.dropdown_subcategories__list__item,
		li {
			border-top: 0;
			margin: @subcategories-list-margin;
			&:first-of-type,
			&:nth-of-type(2) {
				border: 0;
			}
			&:last-of-type {
				margin: 0;
			}
			&.dropdown_link_title {
				float: @subcategories-list-title-float;
				position: relative;
				width: @subcategories-list-title-width;
				padding: @subcategories-list-title-item-padding;
				margin: 0;
				&:before {
					content: "";
					border-bottom: 1px solid @color_main; //This should be moved to Antelope project as custom
					display: none;
					position: absolute;
					left: 0;
					bottom: 0;
					right: 0;
				}
				&.dropdown_link_title--empty {
					> a {
						.generate-spacing-rule(2,padding,right,20px);
						p {
							display: block;
						}
					}
				}
				&:hover {
					&:before {
						display: @subcategories-list-title-item-before;
					}
				}
				> ul {
					ul {
						.generate-spacing-rule(1,padding,top);
						.generate-spacing-rule(1,padding,left);
						> li {
							&:last-of-type {
								margin: 0;
							}
							> a {
								.generate-spacing-rule(2,padding,right,30px);
								&:hover {
									color: @color_main;
									background: transparent;
									border-color: transparent;
									text-decoration: none;
									p {
										color: @color_main;
									}
								}
							}
						}
					}
				}
				> a {
					border: 0;
					text-align: @subcategories-list-title-align;
					display: @subcategories-list-title-display;
					align-items: center;
					.typography-rule(1,bold);
					& + ul {
						margin: 0;
						.generate-spacing-rule(1,padding,top);
						.generate-spacing-rule(1,padding,left);
					}
					&:hover {
						background: transparent;
						border: 0;
					}
					img {
						display: @subcategories-list-title-img-display;
						margin: 0 auto;
					}
					> p {
						display: none;
					}
				}
			}
		}
		a {
			color: @color-gray-3;
			position: relative;
			display: flex;
			align-items: center;
			.typography-rule(1);
			.generate-spacing-rule(2,padding,right,30px);
			p {
				color: @color-gray-7;
				position: absolute;
				top: 50%;
				right: 0;
				.translate(0,-50%);
				.typography-rule(0);
			}
		}
	}
	@media only screen and (max-width: @categories-media-max-width) {
		background: none;
		border: 0;
		display: none;
		top: 0;
		left: 5px;
		height: auto;
		.translate(105%,0);
		> .dropdown_subcategories__list {
			border-bottom: 1px solid @color-gray-9;
		}
		.dropdown_subcategories__list__item,
		li {
			border-top: 0;
			border-bottom: 1px solid @color-gray-9;
			&:last-of-type {
				border-bottom: 0;
			}
			a {
				display: flex;
				align-items: center;
				.typography-lineheight(24px);
				.link--inherit;
				.generate-spacing-rule(4,padding,top);
				.generate-spacing-rule(4,padding,bottom);
				.generate-spacing-rule(2,padding,left);
				.generate-spacing-rule(2,padding,right);
				img {
					display: none;
				}
				p {
					.typography-lineheight(24px);
					.generate-spacing-rule(1,padding,right);
				}
				.dropdown_link_title__text {
					flex: 1 0;
					.generate-spacing-rule(2,padding,right);
				}
				.dropdown_link_title__icon {
					float: right;
					svg {
						stroke: @color-gray-3;
						display: block;
					}
				}
			}
			ul {
				border-top: 0;
				border-bottom: 1px solid @color-gray-9;
				display: none;
				position: fixed;
				top: 0;
				left: 0;
				right: 0;
				.translate(104%, 0);
				.transition(all 0.5s);
				li {
					position: relative;
					&:last-of-type {
						border-bottom: 0;
					}
				}
				ul {
					position: absolute;
				}
			}
			.dropdown_link_title__content {
				display: flex;
				align-items: center;
				.dropdown_link_title__content__text {
					flex: 1 0;
					.generate-spacing-rule(2,padding,right);
				}
				.dropdown_link_title__content__icon {
					.generate-spacing-rule(2,padding,right);
					svg {
						stroke: @color-gray-3;
						display: block;
					}
				}
			}
		}
	}
}
.dropdown_categories {
	background: white;
	display: block;
	position: relative !important;
	top: auto;
	&.scroller-active {
		.scroller-content {
			width: calc(~"100% + 10px");
		}
	}
	&[data-list-show="producers"] {
		display: none;
	}
	.dropdown__list {
		.generate-spacing-rule(4,padding,top);
		.generate-spacing-rule(4,padding,bottom);
		> li {
			border-top: 0;
			> a {
				display: block;
				padding: 0;
				.typography-rule(1);
				.dropdown__list__icon {
					display: none;
					float: right;
				}
				svg {
					stroke: @color-gray-3;
					display: block;
				}
			}
			@media only screen and (min-width: @categories-media-min-width) {
				.generate-spacing-rule(4,padding,left);
				.generate-spacing-rule(4,padding,right);
				.generate-spacing-rule(1,padding,bottom);
				&:last-of-type {
					padding-bottom: 0;
				}
				&:hover,
				&.hovered {
					> a {
						svg {
							stroke: @color-gray-7;
						}
						p {
							color: @color-gray-7;
						}
					}
				}
				> a {
					display: flex;
					align-items: center;
					.link--accessory;
					.dropdown__list__text {
						display: flex;
						flex: 1 auto;
					}
				}
			}
		}
	}
	@media only screen and (min-width: @categories-media-min-width) {
		border-radius: 0 0 @mobile-list-border-radius @mobile-list-border-radius;
		display: @dropdown-categories-display;
		min-width: 300px;
		min-height: 350px; //This is set so that it doesn't break the style when there are only a few categories set
	}
	@media only screen and (max-width: @categories-media-max-width) {
		border: 0;
		margin: 0;
		overflow-y: auto;
		.dropdown__list {
			padding: 0;
			> li {
				border-bottom: 1px solid @color-gray-9;
				> a {
					.typography-lineheight(24px);
					.generate-spacing-rule(4,padding,top);
					.generate-spacing-rule(4,padding,bottom);
					.generate-spacing-rule(2,padding,left);
					.generate-spacing-rule(2,padding,right);
					.dropdown__list__icon {
						display: block;
					}
					p {
						.typography-lineheight(24px);
						.generate-spacing-rule(1,margin,right);
					}
				}
			}
		}
	}
}