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

.container {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
}

.buttonRow {
	display: flex;
	gap: 8px;
}

.primaryButton {
	flex: 1;
	padding: 12px 16px;
	border-radius: 8px;
	background-color: var(--background-modifier-hover);
	color: var(--text-primary);
	font-weight: 500;
	transition: background-color 0.2s ease;
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.primaryButton:hover {
		background-color: var(--background-modifier-selected);
	}
}

.dangerButton {
	flex: 1;
	padding: 12px 16px;
	border-radius: 8px;
	background-color: var(--status-danger);
	color: white;
	font-weight: 500;
	transition: background-color 0.2s ease;
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.dangerButton:hover {
		background-color: #dc2626;
	}
}

.brandButton {
	flex: 1;
	padding: 12px 16px;
	border-radius: 8px;
	background-color: var(--brand-primary);
	color: white;
	font-weight: 500;
	transition: background-color 0.2s ease;
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.brandButton:hover {
		background-color: #2563eb;
	}
}

.disconnectIcon {
	margin-right: 8px;
	display: inline-block;
	vertical-align: middle;
}

.actionButtons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100px, 100%), 1fr));
	gap: 12px;
}

.actionButton {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 12px;
	border-radius: 12px;
	background-color: var(--background-secondary-alt);
	transition: background-color 0.2s ease;
	cursor: pointer;
	border: none;
}

.fullWidth {
	width: 100%;
	flex: 1;
}

@media (hover: hover) and (pointer: fine) {
	.actionButton:hover {
		background-color: var(--background-modifier-hover);
	}
}

.iconContainer {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 9999px;
}

.iconContainerBrand {
	background-color: var(--brand-primary);
}

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

.iconContainerTertiary {
	background-color: var(--background-tertiary);
}

.iconContainerSuccess {
	background-color: #22c55e;
}

.actionIcon {
	color: white;
}

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

.actionText {
	font-weight: 500;
	color: var(--text-secondary);
	font-size: 12px;
}

.connectionInfo {
	border-radius: 12px;
	background-color: var(--background-secondary-alt);
	padding: 16px;
}

.connectionHeader {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.connectionStatusInfo {
	flex: 1;
}

.connectionTitle {
	font-weight: 500;
	color: var(--text-primary);
}

.connectionSubtitle {
	font-size: 14px;
	color: var(--text-primary-muted);
}

.connectionStatusDot {
	width: 12px;
	height: 12px;
	border-radius: 9999px;
	background-color: var(--status-online);
	flex-shrink: 0;
}

.statsGrid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	margin-top: 8px;
	color: var(--text-primary-muted);
}

.statRow {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 12px;
}

.statLabel {
	white-space: nowrap;
	font-size: 12px;
	color: var(--text-secondary);
}

.statValue {
	min-width: 0;
	text-align: right;
	font-size: 12px;
}

.statValuePrimary {
	font-weight: 500;
	color: var(--text-primary);
}

.endpointValue {
	display: block;
	font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 12px;
	font-weight: 600;
	color: #22c55e;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.connectionIdValue {
	display: block;
	font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 12px;
	color: var(--text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.maxWidth {
	max-width: 100%;
}
