/*
 * Copyright (c) 2022 Ford Motor Company
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use '../../../../../../Styles/main';

.list-header {
	display: flex;
	flex-direction: row;
	justify-content: center;

	width: 100%;
	margin: 0 auto 1rem;
	padding: 0.5rem;

	background: rgba(main.$asphalt, 0.08);
	border-radius: 6px;

	position: relative;

	.select-all {
		position: absolute;
		left: 1.5rem;
		top: 0.6rem;
	}

	.sort-button {
		padding-right: 0.75rem;

		color: rgba(main.$asphalt, 0.4);
		font-weight: bold;

		&.selected-asc {
			color: main.$asphalt;
		}

		&.selected-asc::after {
			display: inline-block;

			transform: rotate(180deg) translateX(-3px) translateY(-3px);

			content: '▾';
		}

		&.selected-desc {
			color: main.$asphalt;
		}

		&.selected-desc::after {
			display: inline-block;

			transform: translateX(3px);

			content: '▾';
		}
	}
}

@include main.dark-theme {
	.list-header {
		background-color: rgba(main.$black, 0.22);

		.sort-button {
			color: main.$gray-2;
			font-weight: bold;

			&.selected-asc {
				color: main.$off-white;
			}

			&.selected-desc {
				color: main.$off-white;
			}
		}
	}
}
