/**
Styles, specific to the companies section in the companies page will go here.
This file is *only* loaded in it's respective template file (section-companies-companies.php)
Yes, I know the filename is dumb, shut up.
 */

.section-companies .inner .title-orderby-wrap {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 50px;
}

.section-companies .inner .title-orderby-wrap .section-title {
	font-size: 30px;
	color: #231F20;
	font-weight: 600;
}

.section-companies .inner .title-orderby-wrap .star-icon {
	display: inline;
	margin-left: 5px;
	vertical-align: sub;
}

.section-companies .inner .title-orderby-wrap .order-buttons {
	display: flex;
	column-gap: 40px;
}

.section-companies .inner .title-orderby-wrap .reorder-button {
	font-size: 18px;
	font-weight: 400;
	color: var(--color-text);
}

.section-companies .reorder-button::before {
	content: '';
	display: inline-block;
	width: 16px;
	height: 14px;
	margin-right: 5px;
	background-size: contain;
	background-repeat: no-repeat;
	vertical-align: middle;
}

.section-companies .reorder-button.reorder-random::before {
	background-image: url( './../../../images/icon-random-grey.svg' );
}

.section-companies .reorder-button.reorder-random.active::before,
.section-companies .reorder-button.reorder-random:hover::before {
	background-image: url( './../../../images/icon-random-blue.svg' );
}

.section-companies .reorder-button.reorder-name::before {
	background-image: url( './../../../images/icon-orderby-name-grey.svg' );
}

.section-companies .reorder-button.reorder-name.active::before,
.section-companies .reorder-button.reorder-name:hover::before {
	background-image: url( './../../../images/icon-orderby-name-blue.svg' );
}

.section-companies .reorder-button.reorder-date::before {
	background-image: url( './../../../images/icon-orderby-date-grey.svg' );
}

.section-companies .reorder-button.reorder-date.active::before,
.section-companies .reorder-button.reorder-date:hover::before {
	background-image: url( './../../../images/icon-orderby-date-blue.svg' );
}

.section-companies .inner .title-orderby-wrap .reorder-button:hover,
.section-companies .inner .title-orderby-wrap .reorder-button.active {
	color: var(--color-primary);
	text-decoration: underline;
}

.section-companies .inner .companies-wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	column-gap: 30px;
	row-gap: 30px;
}

/* Medium & down */
@media screen and (max-width: 1200px) {
	.section-companies .inner .companies-wrap {
		grid-template-columns: 1fr 1fr;
	}
}

/* Small */
@media screen and (max-width: 950px) {
	.section-companies .inner .title-orderby-wrap {
		display: flex;
		position: relative;
		column-gap: 15px;
		align-items: flex-start;
		margin-bottom: 40px;
	}

	.section-companies .inner .title-orderby-wrap .section-title {
		/*max-width: 44%;*/
		font-size: 16px;
		line-height: 16px;
		margin-bottom: 0;
	}

	.section-companies .inner .title-orderby-wrap .star-icon {
		width: 16px;
		height: 16px;
		transform: translatex(-35px);
	}

	.section-companies .mobile-order-switch {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		transition: all 0.2s ease-in-out;
		min-width: 115px;
	}

	.section-companies .mobile-order-switch.active {
		width: 100%;
		max-width: 161px;
		background-color: #fff;
		box-shadow: 0 0 25px #0000001A;
		border-radius: 10px;
		z-index: 5;
	}

	.section-companies .mobile-order-switch .order-toggle {
		display: block;
		width: 100%;
		font-size: 10px;
		color: var(--color-text);
		padding: 3px 10px;
		border: 1px solid #595959;
		border-radius: 15px;
		transition: all 0.2s ease-in-out;
		text-align: center;
	}

	.section-companies .mobile-order-switch.active .order-toggle {
		padding: 10px;
	}

	.section-companies .mobile-order-switch .mobile-reorder-button {
		display: none;
	}

	.section-companies .mobile-order-switch .mobile-reorder-button > img {
		width: 10px;
		height: 10px;
		margin-right: 5px;
	}

	.section-companies .mobile-order-switch.active .mobile-reorder-button {
		display: block;
		text-align: right;
		padding: 10px;
		font-size: 10px;
		color: var(--color-text);
	}

	.section-companies .mobile-order-switch .mobile-reorder-button.active {
		font-weight: 400;
	}

	.section-companies .mobile-order-switch.active .order-toggle {
		display: block;
		width: 100%;
		border: none;
		border-bottom: 1px solid #595959;
		border-radius: 0;
		text-align: right;
	}

	.section-companies .inner .companies-wrap {
		grid-template-columns: 100%; /* TODO this is questionable, look into it later */
	}
}