Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp
2.6 KB
Raw Blame
/* SPDX-License-Identifier: AGPL-3.0-or-later */

.container {
	display: flex;
	align-items: center;
	gap: var(--spacing-2);
	padding: var(--spacing-1) var(--spacing-2);
	border-radius: var(--radius-2xl);
	background-color: var(--background-secondary);
	border: 0.0625rem solid var(--background-modifier-accent);
	max-width: 18.75rem;
	min-width: 12.5rem;
}

.containerActive .waveformBar {
	background-color: color-mix(in srgb, var(--text-on-brand-primary) 30%, transparent);
}

.containerActive .waveformBarPast {
	background-color: var(--text-on-brand-primary);
}

.playButton {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.875rem;
	height: 1.875rem;
	flex-shrink: 0;
	border: none;
	border-radius: var(--radius-full);
	background-color: var(--brand-primary);
	color: var(--text-on-brand-primary);
	cursor: pointer;
}

.playButtonIcon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.loadingSpinner {
	position: absolute;
	inset: -0.1875rem;
	border-radius: var(--radius-full);
	border: 0.125rem solid transparent;
	border-top-color: var(--brand-primary-foreground);
	animation: spin 0.8s linear infinite;
	pointer-events: none;
}

.containerActive .loadingSpinner {
	border-top-color: var(--text-on-brand-primary);
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.waveformContainer {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.0625rem;
	height: 1.25rem;
	cursor: pointer;
	overflow: hidden;
	min-width: 0;
}

.waveformBar {
	flex: 1;
	min-width: 0.09375rem;
	background-color: var(--text-tertiary);
	border-radius: var(--radius-sm);
	transition: background-color 0.15s ease;
}

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

:global(.theme-light) .waveformBarPast {
	background-color: var(--brand-primary-foreground);
}

.timestamp {
	flex-shrink: 0;
	font-size: 0.6875rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: var(--text-secondary);
	text-align: right;
}

.speedControl {
	flex-shrink: 0;
}

.containerActive .speedControl {
	color: color-mix(in srgb, var(--text-on-brand-primary) 90%, transparent);
}

.containerActive .speedControl:hover {
	background-color: color-mix(in srgb, var(--text-on-brand-primary) 15%, transparent);
}

.volumeControl {
	flex-shrink: 0;
}

.containerActive .volumeControl button {
	color: color-mix(in srgb, var(--text-on-brand-primary) 70%, transparent);
}

.containerActive .volumeControl button:hover {
	color: var(--text-on-brand-primary);
	background-color: color-mix(in srgb, var(--text-on-brand-primary) 15%, transparent);
}