@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
	--background: #131215;
	--foreground: #1a191c;

	--border: #242426;

	--text: white;
	--note: #4d4a53;

	--primary: #377792;
	--primary-border: #50a1c4;
}

html,
body {
	margin: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-family: "Roboto Mono", monospace;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	color: var(--text);
}

body {
	background: var(--background);
	background: linear-gradient(
		0deg,
		var(--background) 0%,
		var(--foreground) 100%
	);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: "Roboto", sans-serif;
	font-optical-sizing: auto;
	font-weight: 500;
	font-style: normal;
	color: var(--text);
	margin: 0 0 10px 0;
	padding: 0;
}

h1 {
	font-size: 2rem;
}
h2 {
	font-size: 1.5rem;
}
h3 {
	font-size: 1.2rem;
}
h4 {
	font-size: 1rem;
}
h5 {
	font-size: 0.8rem;
}
h6 {
	font-size: 0.7rem;
}

#profileOverlay {
	position: fixed;
	top: 0;
	left: 0;

	width: 100vw;
	height: 100vh;

	background: var(--background);
	background: linear-gradient(
		0deg,
		var(--background) 0%,
		var(--foreground) 100%
	);

	display: none;
	align-items: center;
	justify-content: center;

	z-index: 9999;
}

#profileBox {
	background: var(--foreground);
	padding: 20px 25px 25px 25px;
	display: flex;
	flex-direction: column;

	max-width: 300px;
	border-radius: 10px;

	align-items: center;
	justify-content: center;

	border: solid 1px var(--border);

	display: flex;
	flex-direction: column;
	gap: 10px;
}

#profileBox #login {
	display: flex;
	flex-direction: column;

	align-items: start;
	justify-content: center;

	gap: 10px;
}

#profileBox input {
	background: var(--background);
	padding: 8px 8px;
	font-family: "Roboto Mono", monospace;
	outline: none;
	color: var(--text);
	transition: 0.1s;
	border: none;
}

#profileBox input:focus {
	background: var(--border);
	font-family: "Roboto Mono", monospace;
}

#profileBox input:hover {
	background: var(--border);
	font-family: "Roboto Mono", monospace;
}

input[type="text"] {
	width: 100%;
	border-left: none;
	border-radius: 0px 10px 10px 0px;
}

input[type="color"] {
	border-right: none;
	width: 47px;
	height: 40px;
	border-radius: 10px 0px 0px 10px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
}
input[type="color"]::-webkit-color-swatch {
	border: solid 1px var(--border);
	border-radius: 100%;
	padding: 5px;
	-webkit-box-shadow: inset 0px 8px 19px -9px #ffffff21;
	box-shadow: inset 0px 8px 19px -9px #ffffff21;
}

#passwordInput {
	width: 100%;
	padding: 8px 8px;
	height: 24px;
	border-radius: 10px;
}

.note {
	color: var(--note);
	font-size: smaller;
	text-align: center;
}

#profileBox button {
	margin-top: 10px;
	width: 100%;
	border-radius: 10px;
	padding: 8px 5px;
	background: var(--primary);
	border: 1px solid var(--primary-border);
	cursor: pointer;
	font-family: "Roboto Mono", monospace;

	transition: 0.1s;

	color: var(--text);
}

#profileBox button:hover {
	-webkit-box-shadow: 0px 8px 19px -9px #000000;
	box-shadow: 0px 8px 19px -9px #000000;

	border: 1px solid #ffffff75;
	background: var(--primary-border);

	transform: translateY(-1px);

	color: var(--text);
}

#profileBox button:active {
	-webkit-box-shadow: none;
	box-shadow: none;

	border: 1px solid #ffffff75;

	transform: translateY(2px);

	transition: 0.05s;
}

#layout {
	display: flex;

	gap: 0;

	width: 100vw;
	height: 100vh;

	background: #202225;
}

/* NOTE(Alex): Doesn't work right now */
/* NOTE(Hugo): Does work right now :) 2026-05-11 */
#left {
	background: transparent;
	/* min-width: 250px; */
	width: 100%;
	background: var(--background);
	background: linear-gradient(
		0deg,
		var(--background) 0%,
		var(--foreground) 100%
	);
}

/* NOTE(Alex): Doesn't work right now */
/* NOTE(Hugo): Does work right now :) 2026-05-11 */
#right {
	background: transparent;
	width: 100%;
	background: var(--background);
	background: linear-gradient(
		0deg,
		var(--background) 0%,
		var(--foreground) 100%
	);
}

#center {
	flex: 1;

	min-width: 700px;
	max-width: 1200px;

	background: var(--background);

	border: 1px solid var(--border);
	border-top: none;
	border-bottom: none;

	display: flex;
	flex-direction: column;
}

a {
	color: var(--primary);
}

a:hover {
	color: var(--primary-border);
}

#messages {
	flex: 1;
	overflow-y: scroll;
	max-height: 100%;
	height: 100%;
	padding: 10px;
	height: auto;
	min-height: 0;
}

.message {
	background: var(--foreground);
	padding: 10px;

	margin-bottom: 10px;
	width: auto;
	max-width: 85%;
	min-width: 30%;
	word-break: break-word;

	border-radius: 10px 10px 10px 0px;

	border: solid 1px var(--border);
}

.yourmessage {
	background: var(--primary);
	padding: 5px 10px;

	border: 1px solid var(--primary-border);

	margin-bottom: 10px;
	width: min-content;

	border-radius: 10px 10px 0px 10px;
	width: auto;
	max-width: 85%;
	min-width: 30%;
	word-break: break-word;

	align-items: end;
	justify-content: end;
	margin-left: auto;
}

.messageHeader {
	display: flex;
	flex-direction: row;
	margin-bottom: 3px;
	height: 100%;
	display: flex;
	align-items: end;
}

.messageAuthor {
	font-size: 12px;
	color: var(--user-color, #aaa);
	margin-bottom: 0px;
}

.messageTimestamp {
	font-size: 8px;
	margin-left: 7px;
	margin-bottom: 1px;
}

.message .messageTimestamp {
	color: var(--note);
	filter: brightness(2);
}

.yourmessage .messageTimestamp {
	color: var(--primary-border);
	filter: brightness(1.25);
}

.messageBody {
	color: #fff;
}

.messageBody p {
	margin: 0;
}

/* NOTE(Alex): File attachments */
.messageAttachments {
	display: flex;
	flex-direction: column;
	gap: 5px;

	margin-top: 8px;
}

.attachment {
	display: inline-flex;
	align-items: center;

	border-radius: 10px;

	padding: 5px 10px;
	margin-bottom: 4px;

	color: rgba(255, 255, 255, 0.664);
	text-decoration: none;
	background: rgba(255, 255, 255, 0.13);
	border: solid 1px var(--note);

	cursor: pointer;

	width: fit-content;
}

.yourmessage .attachment {
	background: var(--primary-border);
	color: var(text);
	border: 1px solid rgba(255, 255, 255, 0.185);
}

.yourmessage .attachment:hover {
	background: var(--primary-border);
	color: var(--text);
	filter: brightness(1.1);
}

.attachment:hover {
	transition: 0.1s;
	text-decoration: underline;
	color: white;
	background: rgba(255, 255, 255, 0.288);
	border: solid 1px rgba(255, 255, 255, 0.5);
}

.messageBody img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* NOTE(Alex): Markdown styles */
pre {
	border: 1px solid var(--border);
	background: rgb(8, 10, 10);
	border-radius: 10px;
	padding: 12px;
	overflow-x: auto;
	margin-top: 8px;
	margin-bottom: 8px;
}

code {
	background: rgb(19, 16, 16);
	border-radius: 5px;
	padding: 1px 5px;
	font-family: monospace;
	color: #ffcb6b;
	margin-bottom: 10px;
}

pre code {
	background: transparent;
	padding: 1px 5px;
	color: #9adfff;
	font-family: monospace;
	font-size: 14px;
	white-space: pre;
}

/* NOTE(Alex): File upload boxes */
#uploadStatus {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;

	margin-left: 8px;
	margin-right: 8px;
	margin-bottom: 8px;
}

.uploadItem {
	display: inline-flex;
	align-items: center;

	padding: 5px 10px;
	border-radius: 10px;

	background: var(--primary);
	border: 1px solid var(--primary-border);
	color: white;

	-webkit-box-shadow: 0px 8px 19px -9px #000000;
	box-shadow: 0px 8px 19px -9px #000000;

	font-size: 12px;
}

#inputArea {
	padding: 20px;
	border-top: 1px solid var(--border);

	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;

	background: var(--foreground);
}

/* NOTE(Alex): Message text input box */
#msg {
	width: 100%;
	height: 80px;

	resize: none;

	background: var(--border);

	border: solid 1px var(border);
	color: white;

	font-size: 1.25rem;

	border: none;

	padding: 10px;

	box-sizing: border-box;

	border: solid 1px #37373a;

	transition: 0.1s;

	border-radius: 10px 10px 0px 10px;
}

#msg:focus {
	outline: none;
	background: #37373a;
}

#attachBtn {
	width: 60px;
	height: 50px;
	color: var(--text);
	padding: 8px 5px;
	height: 100%;
	background: var(--primary);
	border: 1px solid var(--primary-border);
	cursor: pointer;
	font-family: "Roboto Mono", monospace;

	transition: 0.1s;

	border-radius: 10px 10px 10px 0px;

	color: var(--text);
}

#attachBtn:hover {
	-webkit-box-shadow: 0px 8px 19px -9px #000000;
	box-shadow: 0px 8px 19px -9px #000000;
	background: var(--primary-border);

	border: 1px solid #ffffff75;

	transform: translateY(-1px);

	color: var(--text);
}

#attachBtn:active {
	border: 1px solid #ffffff75;
	-webkit-box-shadow: none;
	box-shadow: none;

	transform: translateY(2px);

	transition: 0.05s;
}

::-webkit-scrollbar {
	background: var(--background);
	width: 5px;
	height: 5px;
	border-radius: 10px;
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--note);
}

.message blockquote {
	border-left: 5px solid #b1b0b6;
	margin: 8px 0;
	padding: 6px 12px;
	background: var(--background);
	border-radius: 0px 8px 8px 0px;
	color: #b1b0b6;
	font-style: italic;
}

.yourmessage blockquote {
	border-left: 5px solid white;
	margin: 8px 0;
	padding: 6px 12px;
	background: var(--primary-border);
	border-radius: 0px 8px 8px 0px;
	color: white;
	font-style: italic;
}

.message th {
	background: var(--background);
	color: var(--text);
	padding: 8px 12px;
	text-align: left;
	font-family: "Roboto", sans-serif;
	font-weight: 1000;
	font-size: large;
}

.message td {
	padding: 8px 12px;
	border-bottom: 1px solid var(--border);
	color: var(--text);
}

.message tr:nth-child(even) td {
	background: #1d1c1d;
}

.message tr:hover td {
	background: var(--border);
	transition: 0.1s;
}

.yourmessage th {
	background: var(--primary-border);
	color: var(--text);
	padding: 8px 12px;
	text-align: left;
	font-family: "Roboto", sans-serif;
	font-weight: 1000;
	font-size: large;
}

.yourmessage td {
	padding: 8px 12px;
	border-bottom: 1px solid var(--primary-border);
	color: var(--text);
}

.yourmessage tr:nth-child(even) td {
	background: #3e86a5;
}

.yourmessage tr:hover td {
	background: var(--primary-border);
	transition: 0.1s;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0;
	font-size: 14px;
}
