/*
 * Copyright (C) 2026 Fluxer Contributors
 *
 * This file is part of Fluxer.
 *
 * Fluxer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Fluxer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
 */

.toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-3);
	padding: var(--spacing-2) var(--spacing-3);
	margin-bottom: var(--spacing-3);
	border-radius: var(--radius-lg);
	background-color: var(--background-overlay);
}

.overrideCount {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--text-primary);
}

.limitList {
	display: flex;
	flex-direction: column;
	margin: calc(-1 * var(--spacing-2)) 0;
}

.row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-3);
	min-height: 48px;
	padding: var(--spacing-2) 0;
	border-bottom: 1px solid var(--background-modifier-accent);
}

.row:last-child {
	border-bottom: none;
}

.rowActive {
	background-color: var(--background-modifier-hover);
	margin: 0 calc(-1 * var(--spacing-3));
	padding-left: var(--spacing-3);
	padding-right: var(--spacing-3);
	border-radius: var(--radius-md);
	border-bottom-color: transparent;
}

.rowLabel {
	display: flex;
	align-items: center;
	gap: var(--spacing-2);
	flex: 1;
	min-width: 0;
}

.label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.scope {
	font-size: 0.6875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-tertiary);
	flex-shrink: 0;
}

.rowControls {
	display: flex;
	align-items: center;
	gap: var(--spacing-2);
	flex-shrink: 0;
}

.value {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-secondary);
	min-width: 40px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.valueOverridden {
	color: var(--brand-accent);
}

.input {
	width: 80px;
	height: 32px;
	padding: 0 var(--spacing-2);
	border-radius: var(--radius-md);
	border: 1px solid var(--background-modifier-accent);
	background-color: var(--background-body);
	color: var(--text-primary);
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.input::placeholder {
	color: var(--text-tertiary);
	font-size: 0.75rem;
}

.clearButton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: none;
	border-radius: var(--radius-full);
	background-color: transparent;
	color: var(--text-tertiary);
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		color 0.15s ease;
}

.clearButton:hover {
	background-color: var(--background-modifier-hover);
	color: var(--text-primary);
}
