@import "fonts/fonts.css";

@import "layout.css";

:root {
	--font: Inter, Arial, system-ui, sans-serif;
	--font-features: 'cv05', 'cv08';

	--font-mono: "Commit Mono", monospace;

	--fs-xxs: 10px;
	--fs-xs: 12px;
	--fs-sm: 13px;
	--fs-md: 14px;
	--fs-lg: 16px;
	--fs-xl: 18px;
	--fs-xxl: 20px;

	--br-mn: 0px;
	--br-xxs: 2px;
	--br-xs: 4px;
	--br-sm: 6px;
	--br-md: 10px;
	--br-lg: 12px;
	--br-xl: 14px;
	--br-xxl: 18px;
	--br-mx: 99999px;

	--blur-xs: 2px;
	--blur-sm: 4px;
	--blur-md: 8px;
	--blur-lg: 12px;
	--blur-xl: 20px;

	/* Light Theme */

	--bg-1: #ffffff;
	--bg-2: #e8e8e8;
	--bg-3: #cccccc;

	--bg-1-50: #ffffff50;
	--bg-2-50: #e8e8e850;
	--bg-3-50: #cccccc50;

	--tx-1: #000000;
	--tx-2: #1c1c1c;
	--tx-3: #3a3a3a;

	/* Theme-Neutral Colors */

	--primary: #8e6bed;

	--primary-50: #8e6bed50;
	--primary-25: #8e6bed25;

	--success: #38b84d;
	--warn: #e39244;
	--danger: #e65448;

	--success-50: #38b84d50;
	--warn-50: #e3924450;
	--danger-50: #e6544850;
}

@media (prefers-color-scheme: light) {
	:root {
		/* Light Theme */

		--bg-1: #ffffff;
		--bg-2: #e8e8e8;
		--bg-3: #cccccc;

		--bg-1-50: #ffffff50;
		--bg-2-50: #e8e8e850;
		--bg-3-50: #cccccc50;

		--tx-1: #000000;
		--tx-2: #1c1c1c;
		--tx-3: #3a3a3a;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		/* Dark Theme */

		--bg-1: #140e1b;
		--bg-2: #1a1423;
		--bg-3: #261e37;

		--bg-1-50: #140e1b50;
		--bg-2-50: #1a142350;
		--bg-3-50: #261e3750;

		--tx-1: #f3efff;
		--tx-2: #d8cdf1;
		--tx-3: #9688bd;
	}
}

html {
	color-scheme: light dark;

	background-color: var(--bg-1);
	color: var(--tx-2);
}

body {
	margin: 0;
}

body, html {
	font-family: var(--font);
	font-feature-settings: var(--font-features);
	font-size: var(--fs-md);
}

/* Elements */

a {
	color: var(--primary);
	text-decoration: underline;
	text-decoration-color: var(--primary-50);

	&:hover {
		text-decoration-color: var(--primary);
	}

	&.danger {
		color: var(--danger);
		text-decoration: none;
	}
}

.tablerIcon {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	svg {
		height: 18px;
		width: 18px;
	}
}

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

	height: 45px;
	width: 45px;

	border-radius: var(--br-md);
	color: var(--tx-3);

	&.large {
		height: 65px;
		width: 65px;

		border-radius: var(--br-xl);
	}

	&.small {
		height: 32px;
		width: 32px;
	}

	&.fallback {
		background: var(--bg-3);
	}
}

.stat {
	display: flex;
	align-items: center;
	justify-content: start;
	gap: 4px;

	padding: 10px 12px;
	text-decoration: none;
	border-radius: var(--br-md);
	background: var(--bg-3-50);

	width: 100%;
	box-sizing: border-box;

	.tablerIcon {
		margin-right: 4px;
	}
}

.userCard {
	display: flex;
	align-items: center;
	justify-content: start;
	gap: 10px;

	padding: 10px;
	text-decoration: none;
	border-radius: var(--br-md);

	width: 100%;
	box-sizing: border-box;

	overflow-wrap: anywhere;

	&:hover {
		background: var(--bg-3-50);
	}
}

.names {
	display: flex;
	flex-direction: column;

	b {
		overflow-wrap: anywhere;
		color: var(--tx-2);
	}

	span {
		overflow-wrap: anywhere;
		color: var(--tx-3);
	}
}

.ask {
	display: flex;
	flex-direction: column;

	background: var(--bg-2);
	border-radius: var(--br-md);
	overflow: clip;

	p {
		margin: 0;
	}

	.cw summary {
		padding: 12px 14px;
		background-color: var(--warn-50);
		color: var(--warn);
	}

	.cw .content {
		background: var(--bg-3-50);
		padding: 14px;

		.timeAndVisibility {
			display: flex;
			align-items: center;
			gap: 4px;

			margin-top: 4px;
			color: var(--tx-3);
			font-size: var(--fs-sm);
		}

		.asker {
			margin-top: 4px;
			color: var(--tx-3);
		}
	}

	.cw .response {
		display: flex;
		flex-direction: column;
		gap: 8px;

		padding: 14px;
		background-color: var(--bg-2);

		form {
			display: flex;
			flex-direction: row;
			align-items: center;
			gap: 8px;

			label {
				flex-grow: 1;

				input {
					width: 100%;
					box-sizing: border-box;
				}
			}
		}

		.actions {
			display: flex;
			flex-direction: row;
			align-items: center;
			gap: 8px;
		}

		.adminInfo {
			display: flex;
			flex-direction: row;
			align-items: end;
			gap: 12px;
		}

		.askedTo, .askedBy {
			span {
				color: var(--tx-3);
				font-size: var(--fs-sm);
			}

			display: flex;
			flex-direction: column;

			gap: 8px;
			margin-top: 8px;

			.user {
				display: flex;
				flex-direction: row;
				align-items: center;
				gap: 8px;
			}
		}
	}

	.cw .response, .cw .actions {
		input, button {
			background-color: var(--bg-3);
		}
	}
}

code {
	font-family: var(--font-mono);
}

.userHeader {
	display: flex;
	gap: 10px;

	.top {
		display: flex;
		align-items: start;
		gap: 10px;

		width: 100%;
		box-sizing: border-box;

		.prompt {
			background: var(--bg-2);
			border-radius: var(--br-md);
			padding: 10px 12px;
			overflow-wrap: anywhere;

			span {
				color: var(--tx-3);
				overflow-wrap: anywhere;
			}
		}

		.actions {
			flex: 1;

			display: flex;
			align-items: center;
			justify-content: end;
			gap: 10px;
		}

		margin-bottom: 20px;
	}
}

.nothing {
	font-style: italic;
	color: var(--tx-3);
}

.tab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;

	font-size: var(--fs-sm);
	gap: 8px;

	height: 50px;
	min-width: 30px;
	overflow: clip;

	color: var(--tx-1);
	text-decoration: none;

	.count {
		color: var(--primary);
		font-size: 11px;
		font-weight: bold;

		background-color: var(--primary-50);

		padding: 2px 4px;
		border-radius: 5px;
	}

	.bar {
		position: absolute;
		bottom: 0;
		opacity: 0;
		width: 0;

		border-radius: 99px;
		background-color: var(--primary);

		height: 4px;
		min-width: 6px;
	}

	&.selected {
		color: var(--primary);

		.bar {
			opacity: 1;
			width: 30px;
		}
	}
}

@media screen and (max-width: 780px) {
	.tab {
		&.collapsable {
			gap: 0;
			font-size: 0;

			.count {
				margin-left: 5px;
			}
		}
	}
}

.askPageAskedTo {
	display: flex;
	align-items: center;
	gap: 8px;

	.askedTo {
		display: flex;
		flex-direction: column;

		b {
			font-size: var(--fs-lg);
		}
	}
}

.notifTarget {
	border-radius: var(--br-md);
	background: var(--bg-2-50);
	padding: 10px;

	summary {
		.columns {
			margin-top: 10px;
		}
	}

	.forms {
		margin-top: 10px;
	}
}

.invite {
	padding: 4px 0;
}

.announcements {
	display: flex;
	flex-direction: column;
	gap: 4px;

	margin-bottom: 10px;

	.announcement {
		display: flex;
		align-items: center;
		gap: 8px;

		width: 100%;
		box-sizing: border-box;
		border-radius: var(--br-md);

		color: var(--primary);
		background-color: var(--primary-25);
		padding: 8px;

		.text {
			display: flex;
			align-items: center;
			gap: 4px;
		}

		.actions {
			display: flex;
			justify-content: end;
			flex-grow: 1;
		}
	}
}

.links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

a.btn.fedi {
	color: #6364FF;
	background: #6364FF25;
}

a.btn.bsky {
	color: #1185FE;
	background: #1185FE25;
}

.subtext {
	color: var(--tx-3);
	font-size: var(--fs-sm);
}

h2:not(:first-of-type) {
	margin-top: 50px;
}

.queueTask {
	background-color: var(--bg-2);
	border-radius: var(--br-md);
	padding: 10px;
	margin-bottom: 4px;
}

.about {
	text-align: center;
	margin: 50px 0;
}
