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

.spinnerContainer {
	display: flex;
	justify-content: center;
	padding: 4rem 0;
}

.actionRow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.allowanceText {
	font-size: 0.875rem;
	color: var(--text-primary-muted);
}

.subsection {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.subsectionTitle {
	font-weight: 600;
	font-size: 0.875rem;
}

.listContainer {
	display: flex;
	flex-direction: column;
}

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

.emptyState {
	padding: 1.5rem 0;
	text-align: center;
	color: var(--text-primary-muted);
}

.listHeader {
	display: none;
	grid-template-columns: 200px minmax(150px, 1fr) 130px;
	gap: 0.75rem;
	padding: 0 0.75rem 0.5rem;
}

@media (min-width: 768px) {
	.listHeader {
		display: grid;
	}
}

.listHeaderColumn {
	font-weight: 600;
	color: var(--text-primary-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
}

.listItemMobile {
	position: relative;
	display: flex;
	width: 100%;
	cursor: pointer;
	flex-direction: column;
	gap: 0.5rem;
	border-radius: 0.375rem;
	border: 1px solid var(--background-header-secondary);
	background-color: var(--background-secondary);
	padding: 0.75rem;
	text-align: left;
}

.listItemMobile:active {
	opacity: 0.8;
}

.codeRow {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	overflow: hidden;
}

.labelMobile {
	font-weight: 600;
	color: var(--text-primary-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
}

@media (min-width: 768px) {
	.labelMobile {
		display: none;
	}
}

.code {
	user-select: text;
	-webkit-user-select: text;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: monospace;
	font-size: 0.875rem;
}

.redeemerRow {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	overflow: hidden;
}

.redeemerInfo {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	overflow: hidden;
}

.redeemerName {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.875rem;
}

.redeemerDate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--text-primary-muted);
	font-size: 0.75rem;
}

.unclaimedIcon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	background-color: var(--background-tertiary);
	width: 32px;
	height: 32px;
}

.unclaimedIconSvg {
	height: 1.25rem;
	width: 1.25rem;
	color: var(--text-primary-muted);
}

.unclaimedText {
	font-size: 0.875rem;
	color: var(--text-primary-muted);
}

.createdRow {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.createdLabel {
	flex-shrink: 0;
	font-weight: 600;
	color: var(--text-primary-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
}

@media (min-width: 768px) {
	.createdLabel {
		display: none;
	}
}

.createdDate {
	font-size: 0.875rem;
}

.revokeButton {
	position: absolute;
	top: -0.5rem;
	right: -0.5rem;
	border-radius: 9999px;
	border: 1px solid var(--background-header-secondary);
	background-color: var(--background-primary);
	padding: 0.5rem;
	color: var(--text-primary-muted);
	opacity: 1;
	box-shadow:
		0 4px 6px -1px rgb(0 0 0 / 0.1),
		0 2px 4px -2px rgb(0 0 0 / 0.1);
	transition-property: border-color, background-color, color;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
	cursor: pointer;
}

.revokeButton:hover {
	border-color: var(--status-danger);
	background-color: var(--status-danger);
	color: white;
}

.revokeButtonIcon {
	height: 0.75rem;
	width: 0.75rem;
}

.listItemDesktop {
	position: relative;
	display: grid;
	grid-template-columns: 200px minmax(150px, 1fr) 130px;
	align-items: center;
	gap: 0.75rem;
	border-radius: 0.375rem;
	border: 1px solid var(--background-header-secondary);
	background-color: var(--background-secondary);
	padding: 0.75rem;
}

.copyButton {
	flex-shrink: 0;
	border-radius: 0.25rem;
	padding: 0.25rem;
	color: var(--text-primary-muted);
	transition-property: background-color, color, opacity;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
	cursor: pointer;
}

.copyButton:hover {
	background-color: var(--background-header-secondary);
	color: var(--text-primary);
}

.copyButtonHidden {
	opacity: 0;
}

.copyButtonVisible {
	opacity: 1;
}

.copyButtonIcon {
	height: 1rem;
	width: 1rem;
}

.revokeButtonDesktop {
	position: absolute;
	top: -0.5rem;
	right: -0.5rem;
	border-radius: 9999px;
	border: 1px solid var(--background-header-secondary);
	background-color: var(--background-primary);
	padding: 0.5rem;
	color: var(--text-primary-muted);
	box-shadow:
		0 4px 6px -1px rgb(0 0 0 / 0.1),
		0 2px 4px -2px rgb(0 0 0 / 0.1);
	transition-property: border-color, background-color, color, opacity;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	transition-duration: 150ms;
	cursor: pointer;
}

.revokeButtonDesktop:hover {
	border-color: var(--status-danger);
	background-color: var(--status-danger);
	color: white;
}

.revokeButtonDesktopHidden {
	opacity: 0;
}

@media (min-width: 768px) {
	.revokeButtonDesktopHidden {
		opacity: 0;
	}
	.listItemDesktop:hover .revokeButtonDesktopHidden {
		opacity: 1;
	}
}

.revokeButtonDesktopVisible {
	opacity: 1;
}

.avatarNoShrink {
	flex-shrink: 0;
}
