body,
html {
	height: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

#root {
	flex: 1;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.chat-app {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.chat-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}

.profile-editor {
	display: flex;
	align-items: center;
	gap: 8px;
}

.avatar {
	border-radius: 50%;
	object-fit: cover;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.avatar-fallback {
	color: #fff;
	font-weight: bold;
	user-select: none;
}

.avatar-button {
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	border-radius: 50%;
	line-height: 0;
}

.avatar-button:hover .avatar {
	opacity: 0.8;
}

.name-button {
	padding: 4px 8px;
	border: 1px dashed transparent;
	background: none;
	font-weight: bold;
	cursor: pointer;
	border-radius: 4px;
}

.name-button:hover {
	border-color: #ccc;
}

.name-edit-form {
	display: inline-block;
}

.name-edit-input {
	font-weight: bold;
	padding: 3px 7px;
}

.avatar-error {
	color: #c0392b;
	font-size: 12px;
	width: 100%;
}

.online-users {
	font-size: 13px;
	max-width: 60%;
}

.online-users-title {
	font-weight: bold;
	margin-bottom: 4px;
}

.online-users ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.online-users li {
	display: flex;
	align-items: center;
	gap: 4px;
	background: #f5f5f5;
	padding: 2px 8px 2px 2px;
	border-radius: 999px;
}

.online-users li.self {
	background: #e5f3ff;
}

.messages-list {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 10px 0;
}

.message {
	margin-bottom: 10px;
	align-items: center;
}

.message .message-avatar {
	display: flex;
	align-items: center;
}

.message .user {
	font-weight: bold;
	text-align: right;
}

.message-form {
	flex: 0 0 auto;
	padding: 10px 0;
}

.send-message {
	padding: 0;
}

.my-input-text::placeholder {
	color: #ccc;
}
