/*
 * 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/>.
 */

.stateButtonsContainer {
	display: flex;
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 0.375rem;
	border: 1px solid var(--background-header-secondary);
}

.stateButton {
	display: flex;
	height: 1.625rem;
	width: 1.875rem;
	align-items: center;
	justify-content: center;
	transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
}

.stateButtonDisabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.stateButtonEnabled {
	cursor: pointer;
}

.stateButtonDeny {
	background-color: var(--status-danger);
	color: white;
}

.stateButtonNeutral {
	background-color: var(--background-modifier-selected);
	color: var(--text-primary);
}

.stateButtonAllow {
	background-color: var(--status-online);
	color: white;
}

.stateButtonInactive {
	background-color: var(--background-secondary);
	color: var(--text-primary);
	cursor: pointer;
}

.stateButtonInactive:hover {
	background-color: var(--background-modifier-hover);
}

.stateDivider {
	width: 1px;
	background-color: var(--background-header-secondary);
}

.overwriteToggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding-top: 0.375rem;
	padding-bottom: 0.375rem;
}

.overwriteToggleDense {
	padding-top: 0.125rem;
	padding-bottom: 0.125rem;
	gap: 0.5rem;
}

.overwriteToggleContent {
	display: flex;
	flex: 1 1 0%;
	flex-direction: column;
	gap: 0.125rem;
}

.overwriteToggleTitle {
	font-weight: 500;
	font-size: 0.875rem;
	line-height: 1.25;
}

.overwriteToggleTitleEnabled {
	color: var(--text-primary);
}

.overwriteToggleTitleDisabled {
	color: var(--text-primary-muted);
}

.overwriteToggleDescription {
	font-size: 0.75rem;
	line-height: 1.3;
	color: var(--text-primary-muted);
}

.overwriteToggleActions {
	flex-shrink: 0;
}

.categoryContainer {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.categoryDivider {
	height: 1px;
	background-color: var(--background-modifier-accent);
}

.categoryTitle {
	margin-top: 0.125rem;
	margin-bottom: 0.125rem;
	font-weight: 600;
	font-size: 0.6875rem;
	color: var(--text-tertiary);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.categoryPermissions {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.categoryPermissionsDense {
	gap: 0;
}

.categoryPermissionsGrid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.25rem 0.75rem;
}

.roleToggle {
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
}

.roleToggleDense {
	padding-top: 0;
	padding-bottom: 0;
}

.roleCategoryContainer {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.roleCategoryDivider {
	height: 1px;
	background-color: var(--background-modifier-accent);
}

.roleCategoryTitle {
	margin-top: 0.25rem;
	margin-bottom: 0.125rem;
	font-weight: 600;
	font-size: 0.6875rem;
	color: var(--text-tertiary);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.roleCategoryPermissions {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.roleCategoryPermissionsDense {
	gap: 0;
}

.roleCategoryPermissionsGrid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 0.75rem;
}

.permissionWarning {
	margin-top: 0.25rem;
}
