Skip to content

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

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

.root[class] {
	--picker-viewport-gap: clamp(2rem, 4vw, 4rem);
	--picker-pad: clamp(0.625rem, 1.6vw, 1.25rem);
	--picker-gap: clamp(0.5rem, 1.4vw, 1.125rem);
	--picker-source-card-bg: #000;
	--picker-source-card-border: rgb(255 255 255 / 0.14);
	--picker-source-card-border-hover: rgb(255 255 255 / 0.26);
	--picker-source-card-muted: rgb(244 246 248 / 0.72);

	box-sizing: border-box;
	width: min(73.75rem, calc(100dvw - var(--picker-viewport-gap)));
	max-width: min(73.75rem, 100%);
	height: min(47.5rem, calc(100dvh - var(--picker-viewport-gap)));
	max-height: min(47.5rem, calc(100dvh - var(--picker-viewport-gap)));
	min-height: min(32.5rem, calc(100dvh - 1rem));
	border-radius: 1rem;
	background-color: var(--background-secondary);
	box-shadow: none;
}

.topBar {
	flex: 0 0 auto;
	padding: var(--picker-pad) var(--picker-pad) 0;
	background: transparent;
}

.tabs {
	display: flex;
	gap: 0.25rem;
	width: 100%;
	min-width: 0;
	padding: 0.25rem;
	border: 0;
	border-radius: 0.875rem;
	background: var(--background-tertiary);
	overflow: hidden;
}

.tabs > button {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	min-width: 0;
	margin: 0;
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: 0.625rem;
	background: transparent;
	color: var(--text-secondary);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.25rem;
	transition:
		background-color 0.14s ease,
		color 0.14s ease;
}

.tabs > button:hover {
	color: var(--text-primary);
}

.tabs > button[aria-selected='true'] {
	border: 0;
	background: var(--background-secondary);
	color: var(--text-primary);
}

.tabLabel {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-width: 0;
}

.tabIcon {
	flex: 0 0 auto;
	width: 1.125rem;
	height: 1.125rem;
}

.content {
	background: transparent;
}

.grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--picker-gap);
	padding: var(--picker-pad);
	align-content: start;
}

.card {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--text-primary);
	text-align: start;
	cursor: pointer;
}

.card:hover:not(:disabled) {
	background: transparent;
}

.card:disabled {
	cursor: default;
	opacity: 0.7;
}

.cardPending {
	opacity: 0.55;
}

.preview {
	position: relative;
	box-sizing: border-box;
	aspect-ratio: 16 / 9;
	padding: 0.25rem;
	border: 0.125rem solid var(--picker-source-card-border);
	border-radius: 0.75rem;
	background: var(--picker-source-card-bg);
	overflow: hidden;
	transition:
		border-color 0.14s ease,
		box-shadow 0.14s ease;
}

.previewDevice {
	padding: 0;
}

.card:hover:not(:disabled) .preview {
	border-color: var(--picker-source-card-border-hover);
}

.cardSelected .preview {
	border-color: var(--brand-primary-light);
	box-shadow: 0 0 0 0.125rem color-mix(in srgb, var(--brand-primary-light) 42%, transparent);
}

.previewImage {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	border-radius: 0.4375rem;
	background: var(--picker-source-card-bg);
}

.devicePreviewVideo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: var(--picker-source-card-bg);
}

.previewPlaceholder {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--picker-source-card-bg);
	overflow: hidden;
}

.devicePreviewPlaceholder::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--picker-source-card-bg);
	opacity: 0.68;
	z-index: 0;
}

.previewIcon {
	position: relative;
	z-index: 1;
	color: var(--picker-source-card-muted);
	width: 2.625rem;
	height: 2.625rem;
}

.devicePreviewPlaceholder .previewIcon {
	display: none;
}

.previewOverlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.625rem;
	background: rgb(0 0 0 / 0.52);
	opacity: 0;
	transition: opacity 0.14s ease;
	pointer-events: none;
}

.card:hover:not(:disabled) .previewOverlay,
.card:focus-visible .previewOverlay {
	opacity: 1;
}

.previewAction {
	padding: 0.75rem 1.5rem;
	border-radius: 0.625rem;
	background: #fff;
	box-shadow: 0 0.25rem 0.875rem rgb(0 0 0 / 0.28);
	color: #111;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.25rem;
}

.cardBody {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	padding: 0.625rem 0.25rem 0;
	background: transparent;
}

.cardSourceIcon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	color: var(--text-secondary);
}

.cardSourceIcon > svg,
.cardSourceIconImage {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.cardTitle {
	min-width: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--text-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 100%;
	padding: 2rem;
	text-align: center;
}

.loadingState {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 2rem;
}

.stateIcon {
	width: 2.625rem;
	height: 2.625rem;
	color: var(--text-secondary);
}

.stateHeading {
	max-width: 32rem;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--text-primary);
}

.stateTitle {
	max-width: 32rem;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--text-secondary);
}

.stateActions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.osNotice {
	margin: 0.75rem 1rem 0;
	padding: 0.625rem 0.875rem;
	border-radius: 0.5rem;
	border: 0.0625rem solid var(--background-modifier-accent);
	background: color-mix(in srgb, var(--background-tertiary) 76%, transparent);
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--text-secondary);
}

.osNotice strong {
	color: var(--text-primary);
	font-weight: 600;
}

.downloadCta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: min(100%, 42.5rem);
	padding: 1rem 1.125rem;
	border: 0.0625rem solid var(--background-modifier-accent);
	border-radius: 1rem;
	background:
		linear-gradient(135deg, rgb(255 255 255 / 0.04), transparent 55%),
		color-mix(in srgb, var(--background-tertiary) 76%, transparent);
	text-align: start;
}

.downloadCopy {
	display: flex;
	flex: 1 1 16.25rem;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.downloadTitle {
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--text-primary);
}

.downloadDescription {
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--text-secondary);
}

.downloadActions {
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
}

.platformIcons {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-secondary);
}

.platformIcon {
	width: 1.125rem;
	height: 1.125rem;
}

.footer {
	padding: 0.875rem var(--picker-pad) var(--picker-pad);
	background: transparent;
}

.footer .footerStart {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: flex-start;
	min-width: 0;
}

.streamSummary {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.1875rem;
	min-width: 0;
}

.streamSummaryTitle {
	color: var(--text-primary);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.25rem;
}

.streamSummaryDetails {
	display: flex;
	align-items: center;
	min-width: 0;
	color: var(--text-secondary);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.125rem;
	overflow: hidden;
	white-space: nowrap;
}

.streamSummaryDetail {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.streamSummaryDetail + .streamSummaryDetail::before {
	content: '•';
	margin: 0 0.5rem;
	color: color-mix(in srgb, var(--text-tertiary) 55%, transparent);
}

.streamButton {
	min-width: 8rem;
}

.previewNotice {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	color: var(--text-secondary);
	font-size: 0.8125rem;
	line-height: 1.35;
}

.previewNoticeText {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.previewNoticeInfoButton {
	flex: 0 0 auto;
}

.previewInfoContent {
	gap: 0.75rem;
}

.previewInfoParagraph {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--text-secondary);
}

.previewInfoSwitch {
	margin-top: 0.25rem;
	padding: 0.75rem;
	border: 0.0625rem solid var(--background-modifier-accent);
	border-radius: 0.5rem;
	background: color-mix(in srgb, var(--background-tertiary) 72%, transparent);
}

@media (max-width: 900px) {
	.root[class] {
		height: min(45rem, calc(100dvh - var(--picker-viewport-gap)));
		max-height: min(45rem, calc(100dvh - var(--picker-viewport-gap)));
		min-height: min(28.75rem, calc(100dvh - 1rem));
	}
}

@media (max-width: 520px) {
	.root[class] {
		--picker-viewport-gap: 1rem;
		--picker-pad: 0.75rem;
		--picker-gap: 0.5rem;
	}

	.footer {
		gap: 0.75rem;
	}

	.footer .footerStart {
		min-width: 8rem;
	}

	.previewNotice {
		width: 100%;
		flex-wrap: wrap;
	}

	.tabs > button {
		padding-inline: 0.5rem;
		font-size: 0.8125rem;
	}

	.tabLabel {
		gap: 0.375rem;
	}

	.downloadActions {
		justify-content: flex-start;
	}
}