/*
AI-------------------------------------------------------------------
	Chat section of a chat window
-------------------------------------------------------------------AI
*/

:root {
  --main-bg-color: #08d18e;
}

/*Chatter's container. Contains chatroom-list and chat-dialog*/
.app-container {
	height: 100%;
	max-height: 100vh;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/*Container of chat box. Includes the dialog and input field and button*/
.chat-container {
	width: 100%;
	max-width: 1200px;
	max-height: 100%;
	display: flex;
	flex-direction: row;
}

.chat-subsection {
	display: flex;
	flex-direction: column;
	border: 2px solid var(--main-bg-color);
	border-radius: 2px;
	box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.chatroom-list-container {
	flex-grow: 1;
	border-right: 0;
}

.dialog-container {
	flex-grow: 3;
}

#room-title {
	height: 40px;
	align-items: center;
	justify-content: center;
	display: flex;
	height: 40px;
	border-bottom: 2px solid var(--main-bg-color);
}

/*This is the setting for the chat history dialog.*/
#chat-dialog {
	overflow: auto;
	height: 96%;
}

/*
AI-------------------------------------------------------------------
	The following contains settings for the input field and button.
-------------------------------------------------------------------AI
*/
.input-container {
	padding-top: 2px;
	padding-bottom: 2px;
	display: flex;
	justify-content: center;
	border-top: 2px solid var(--main-bg-color);
	height: 40px;
}

/*This is the text box where the user inputs the messages to send.
It's a textarea element to enable scroll.*/
#send-message {
	width: calc(100% - 50px);
	height: 100%;
	font-size: 1rem;
	overflow: auto;
	resize: none;
	border: none;
	font-family: 'Raleway', sans-serif;
	padding: 0 10px;
}

/*Send button's parent*/
#send-btn-parent {
	width: 50px;
	display:flex;
	justify-content: center;
	align-items: center;
}
/*Send button settings*/
#send-button {
	background: transparent;
	font-weight: bold;
	font-size: 1rem;
	color: var(--main-bg-color);
	border: none;
	width: 50px;
}

/*
AI-------------------------------------------------------------------
	The messages inside the chat-dialog have the following settings
-------------------------------------------------------------------AI
*/

/*Generic message setting that applies to all messages*/
.message {
	max-width: 60%;
	padding: 0.5em 0.5em 0.5em 0.5em;
	margin: 0.2em 0.2em 0.2em 0.2em;
	border-radius: 2em;
	vertical-align: bottom;
	clear: both;
	word-wrap: break-word;
}

/*Messages sent by current user has these settings.*/
.message-sent {
	background: var(--main-bg-color);
	color: white;
	float: right;
}

.message-receiver {
	color: grey;
	font-size: 0.7em;
	float: left;
	padding: 0.2em;
	margin: 0;
}

/*Messages received by other users in the chat have these settings.*/
.message-received {
	background: #dcdcdc;
	color: black;
	float: left;
}

.fa-arrow-left {
	float: left;
	padding-top: 0.2em;
	padding-bottom: 0.2em;
	color: var(--main-bg-color);
}

@media only screen and (max-width: 767px) {
	body {
		text-align: center;
	}
}

@media only screen and (min-width: 768px) {
	.fa-arrow-left {
		display: none;
	}
	.chat-container {
		min-width: 768px;
	}
}

@media only screen and (max-width: 576px) {
	.chatroom-list-container {
		display: none;
	}
}
