/**
 *
 * Copyright (c) 2024 Analog Devices, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * 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 '@common/styles/colors';
@use '@common/styles/fonts';

.table {
	--foreground: #{colors.$default-foreground};
	--font-family: #{fonts.$default-font-family};
	--border-width: 10;
	--design-unit: 0;
	--type-ramp-base-font-size: #{fonts.$font-size-m};
	--type-ramp-base-line-height: 14px;
	--list-active-selection-background: transparent;
	--list-active-selection-foreground: #{colors.$default-foreground};
	--list-hover-background: #{colors.$table-row-hover};
	--contrast-active-border: #{colors.$active-cta};
	--focus-border: transparent;

	border-top: 1px solid colors.$default-border;

	& > * {
		border-bottom: 1px solid colors.$default-border;
	}

	svg {
		path {
			fill: colors.$default-foreground;
		}
	}

	.sortable-title {
		display: flex;
		gap: 8px;
		align-items: center;
		cursor: pointer;
	}

	.asc,
	.desc {
		font-weight: bolder;
	}

	.desc {
		svg {
			transform: rotate(180deg);
		}
	}
}

.name {
	display: flex;
	align-items: center;
	color: colors.$active-cta;
	cursor: pointer;

	& div:first-child {
		color: colors.$default-foreground;
		position: absolute;
		left: -10px;
	}
}
