body {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
		Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',
		sans-serif;
	background: #f0f0f0;
	display: grid;
	place-content: center;
	width: 100vw;
	height: 100dvh;
}

nav {
	display: flex;
	align-items: center;
	gap: 0.5em;

	img {
		width: 3em;
		height: 3em;
	}
}

main {
	width: 30em;
	max-width: 100%;
	height: 70vh;

	background: #fff;
	border: 1px solid #ccc;
	border-radius: 25px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	padding: 0.5em;
	margin-bottom: 1em;

	overflow-y: auto;
	scroll-behavior: smooth;
}

ul {
	display: flex;
	flex-direction: column;
	list-style: none;
	padding: 0;
}

.Message {
	display: flex;
	flex-direction: column;
	margin: 4px 0;
	padding: 4px 8px;

	span {
		width: 2em;
		height: 36px;
		background: #eee;
		font-size: 12px;
		font-weight: 500;
		display: flex;
		justify-content: center;
		align-items: center;
		border-radius: 999999px;
	}

	p {
		border-radius: 4px;
		padding: 4px 8px;
		margin-top: 0.25em;
	}

	&.user {
		align-self: flex-end;
		align-items: flex-end;

		span,
		p {
			background: rgb(219, 236, 255);
		}
	}

	&.bot {
		align-self: flex-start;

		span,
		p {
			background: rgb(198, 255, 220);
		}
	}
}

form {
	display: flex;

	input {
		border-radius: 999999px;
		flex-grow: 1;
		border: 0;
		padding: 8px;
		margin-right: 8px;
		border: 1px solid #ccc;

		&:focus {
			outline: none;
			border-color: #555;
		}
	}

	button {
		background: #444;
		border: 0;
		color: white;
		border-radius: 30px;
		cursor: pointer;
		padding: 8px;
		transition: background 0.3s ease;

		&[disabled] {
			background: #ccc;
			opacity: 0.6;
			pointer-events: none;
		}

		&:hover {
			background: #555;
		}
	}
}

small {
	font-size: 10px;
	color: #555;
	position: fixed;
	bottom: 10px;
	left: 0;
	right: 0;
	margin: auto;
	width: 400px;
}

.Loading {
	text-align: center;
	display: flex;
	justify-content: center;
	height: 100%;
	align-items: center;
	flex-direction: column;
	margin-top: 50%;

	i {
		pointer-events: none;
		width: 2.5em;
		height: 2.5em;
		border: 0.4em solid transparent;
		border-color: #eee;
		border-top-color: #444;
		border-radius: 50%;
		animation: loadingspin 1s linear infinite;
	}

	h4 {
		color: #444;
		margin-bottom: 8px;
	}

	h5 {
		font-weight: 400;
		margin: 0;
		font-size: 10px;
		opacity: 0.4;
	}
}

footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	margin-top: 0.5em;
	margin-bottom: 0.5em;

	img {
		width: 2em;
		height: 2em;
	}
	p {
		text-align: center;
		font-size: 12px;
		color: #555;

		a {
			font-weight: 500;
			text-decoration: none;
		}
	}
}

@keyframes loadingspin {
	100% {
		transform: rotate(360deg);
	}
}
