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

:global(flx-auth-card-surface).card {
	--setup-card-gutter: clamp(1rem, 4vw, 3rem);
	flex-direction: column;
	max-width: 40rem;
	height: min(46rem, calc(100svh - 2 * var(--setup-card-gutter)));
	transition:
		max-width 220ms ease,
		box-shadow 180ms ease;
}

:global(flx-auth-card-surface).cardWide {
	max-width: none;
	height: calc(100svh - 2 * var(--setup-card-gutter));
}

:global(flx-auth-card-form-side).cardBody {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	padding: 0;
}

.cardInner {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.progressTrack {
	flex: 0 0 auto;
	height: 0.25rem;
	background: color-mix(in srgb, var(--background-modifier-accent) 60%, transparent);
	overflow: hidden;
}

.progressFill {
	height: 100%;
	background: var(--brand-primary, #4641d9);
	transition: width 200ms ease;
}

.contentScroller {
	flex: 1 1 auto;
	min-height: 0;
}

.contentFrame {
	flex: 1 0 auto;
	padding: 2rem 1.5rem 1.5rem;
}

.wideScroller {
	container: setup-wide / size;
	padding: 1.75rem clamp(1.25rem, 2.5vw, 2.5rem) 0;
}

.wideFrame {
	flex: 1 0 auto;
}

.content {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	justify-content: center;
}

.mobileWizard {
	display: flex;
	flex-direction: column;
	min-height: calc(100dvh - 4.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}

.mobileWizard .progressTrack {
	margin-bottom: 1.5rem;
	border-radius: 999px;
}

.mobileBody {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	padding-block-end: 8rem;
}

.mobileFooter {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 20;
	padding-block-end: env(safe-area-inset-bottom, 0px);
	background: rgb(8 6 22);
}

.mobileFooter::before {
	content: '';
	position: absolute;
	inset-inline: 0;
	bottom: 100%;
	height: 1.5rem;
	background: linear-gradient(to bottom, rgb(8 6 22 / 0), rgb(8 6 22));
	pointer-events: none;
}

.mobileFooter .footer {
	border-top: 0;
	padding-inline: 1.5rem;
	padding-block-end: 0.5rem;
}

.step,
.welcomeStep {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	width: 100%;
	max-width: 35rem;
	margin: 0 auto;
}

.welcomeStep {
	align-items: center;
	text-align: center;
}

.centeredStep {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.125rem;
	width: 100%;
	min-height: 16rem;
	max-width: 30rem;
	margin: 0 auto;
	text-align: center;
}

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

.title {
	margin: 0;
	color: var(--text-primary);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.25;
	outline: none;
}

.body,
.welcomeBody {
	margin: 0;
	color: var(--text-secondary);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.welcomeBody {
	max-width: 30rem;
}

.note {
	margin: 0;
	padding: 0.75rem 0.875rem;
	border-radius: 0.5rem;
	background: color-mix(in srgb, var(--background-modifier-accent) 40%, transparent);
	color: var(--text-primary);
	font-size: 0.875rem;
	line-height: 1.5;
}

.visuallyHidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.welcomeHeroWrap,
.welcomeHero {
	display: flex;
	justify-content: center;
	width: 100%;
}

.welcomeWordFrame {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	height: 7rem;
	overflow: hidden;
}

.welcomeWord,
.welcomeWordMeasure {
	display: inline-block;
	margin: 0;
	font-size: 4.5rem;
	font-weight: 850;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
}

.welcomeWord {
	color: var(--text-primary);
	text-align: center;
	transform-origin: center;
}

.welcomeWordMeasure {
	position: absolute;
	visibility: hidden;
	pointer-events: none;
}

.localeBlock {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: min(100%, 22rem);
	margin-top: 0.5rem;
	text-align: start;
}

.localeSelector {
	width: 100%;
}

.fieldLabel {
	color: var(--text-primary);
	font-size: 0.875rem;
	font-weight: 700;
}

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

.fieldRow {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 7rem;
	gap: 0.875rem;
	align-items: start;
}

.monospaceInput {
	font-family: var(--font-code, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.codeRow {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	min-width: 0;
	padding-block: 0.375rem;
	padding-inline: 0.75rem 0.375rem;
	border-radius: 0.375rem;
	background: var(--background-tertiary);
}

.codeBlock {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--text-primary);
	font-family: var(--font-code, ui-monospace, SFMono-Regular, Menlo, monospace);
	font-size: 0.8125rem;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.codeRow > :last-child {
	flex: 0 0 auto;
}

:global(flx-auth-card-surface).card :where(h1, h2, h3, h4, p, span, label, code, li, dt, dd, strong, em, a) {
	user-select: text !important;
	-webkit-user-select: text !important;
}

:global(flx-auth-card-surface).card :where(button, [role='button'], [role='radio'], [role='tab']) :where(*) {
	user-select: none !important;
	-webkit-user-select: none !important;
}

.accountForm {
	width: 100%;
}

.accountForm > form {
	margin-top: 0;
	gap: 0.875rem;
}

.actionRow {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.success {
	display: inline-flex;
	gap: 0.375rem;
	align-items: center;
	margin: 0;
	color: var(--status-online, #23a55a);
	font-size: 0.9375rem;
	font-weight: 600;
}

.alertBlock {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	align-items: flex-start;
}

.alert {
	margin: 0;
	color: var(--status-danger);
	font-size: 0.875rem;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.link {
	align-self: flex-start;
	border-radius: 0.25rem;
	color: var(--text-link);
	font-size: 0.9375rem;
	text-decoration: underline;
}

.textButton {
	align-self: flex-start;
	padding: 0.25rem 0;
	border: 0;
	border-radius: 0.25rem;
	background: none;
	color: var(--text-link);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.textButton:hover:not(:disabled) {
	text-decoration: underline;
}

.textButton:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.storedKey {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 0.875rem;
	border: 0.0625rem solid var(--background-modifier-accent);
	border-radius: 0.5rem;
}

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

.summary {
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 0.0625rem solid var(--background-modifier-accent);
	border-radius: 0.5rem;
	overflow: hidden;
}

.summaryRow {
	display: grid;
	grid-template-columns: minmax(7rem, 2fr) minmax(0, 3fr);
	gap: 0.75rem;
	align-items: center;
	padding: 0.625rem 0.875rem;
}

.summaryRow:not(:last-child) {
	border-bottom: 0.0625rem solid var(--background-modifier-accent);
}

.summaryLabel {
	color: var(--text-secondary);
	font-size: 0.875rem;
}

.summaryValue {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
	min-width: 0;
	margin: 0;
	color: var(--text-primary);
	font-size: 0.875rem;
	font-weight: 600;
}

.summaryValueText {
	min-width: 0;
	overflow-wrap: anywhere;
}

.summaryValue .textButton {
	flex: 0 0 auto;
	align-self: center;
}

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

.colorSwatch {
	width: 1rem;
	height: 1rem;
	border-radius: 0.25rem;
}

.logoThumb {
	max-width: 2.5rem;
	max-height: 1.5rem;
	object-fit: contain;
}

.doneIcon {
	color: var(--status-online, #23a55a);
}

.doneActions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	min-width: 0;
}

.doneActions > button {
	height: auto;
	text-align: center;
}

.doneActions > button * {
	min-width: 0;
	white-space: normal;
	overflow-wrap: anywhere;
}

.footer {
	display: flex;
	flex: 0 0 auto;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
	padding: 0.875rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
	border-top: 0.0625rem solid color-mix(in srgb, var(--background-modifier-accent) 72%, transparent);
}

.footerStart {
	display: flex;
	gap: 0.875rem;
	align-items: center;
	min-width: 0;
}

.stepCount {
	color: var(--text-secondary);
	font-size: 0.8125rem;
	white-space: nowrap;
}

.footerPrimary {
	display: flex;
	margin-inline-start: auto;
}

.primaryButton {
	min-width: 8rem;
}

.submitSlot {
	display: contents;
}

.backNarrow {
	display: none;
}

@media (max-width: 520px) {
	.welcomeWord,
	.welcomeWordMeasure {
		font-size: 3.25rem;
	}

	.contentFrame {
		padding-inline: 1rem;
	}

	.fieldRow {
		grid-template-columns: minmax(0, 1fr);
	}

	.summaryRow {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.25rem;
	}
}

@media (max-width: 479px) {
	.footer {
		flex-direction: column-reverse;
		align-items: stretch;
		padding-inline: 1rem;
	}

	.footerStart {
		justify-content: space-between;
	}

	.footerPrimary {
		margin-inline-start: 0;
	}

	.footerPrimary > *,
	.primaryButton {
		width: 100%;
	}

	.backWide {
		display: none;
	}

	.backNarrow {
		display: inline-flex;
	}
}

@media (prefers-reduced-motion: reduce) {
	.progressFill,
	:global(flx-auth-card-surface).card {
		transition: none;
	}
}