/* Message Base */

.message {
	position: relative;
	margin: 0 0 10px;
}

.message .content {
	position: relative;
	font-family: math;
	padding: 12px 15px;
	border: 1px solid #aaa;
	background: #fff;
	border-radius: 12px;
	box-shadow: 1px 1px 5px #00000019;
}

.message .metadata {
	font-family: 'Open Sans';
	font-size: 13px;
	color: #777;
	padding: 3px 15px;
	font-weight: 300;
}

/* Message Role Icons */

.message[data-role="assistant"]:before {
	font-family: 'icons';
	content: 'G';
	color: #777;
	position: absolute;
	top: 3px;
	left: -33px;
	font-size: 24px;
	line-height: 36px;
}

.message[data-role="user"]:before {
	font-family: 'icons';
	content: '5';
	color: #777;
	position: absolute;
	bottom: 32px;
	right: -32px;
	font-size: 24px;
	line-height: 36px;
}

.message[data-role="review"]:before {
	font-family: 'icons';
	content: '6';
	color: #777;
	position: absolute;
	top: 3px;
	left: -33px;
	font-size: 24px;
	line-height: 36px;
}

/* Message Role Variants */

.message[data-role="user"] .content {
	border-radius: 12px 12px 0 12px;
	border-color: #d7d7d7;
}

.message[data-role="user"] .metadata {
	text-align: right;
}

.message[data-role="assistant"] .content {
	border-radius: 0 12px 12px 12px;
	border-color: #b5b5b5;
}

.message[data-role="summary"] .content {
	border: 0;
	box-shadow: none;
	background: transparent;
	padding: 0;
}

.message[data-role="summary"] .content::first-letter {
	font-size: 2.9em;
	font-weight: 300;
	float: left;
	line-height: 1;
	margin-right: 0.1em;
}

/* Message Speech Bubbles */

.message[data-role="assistant"] .content:before {
	content: '';
	position: absolute;
	left: -12px;
	top: -1px;
	border: 6px solid transparent;
	border-top: 6px solid #b5b5b5;
	border-right: 6px solid #b5b5b5;
}

.message[data-role="assistant"] .content:after {
	content: '';
	position: absolute;
	left: -10px;
	top: 0;
	border: 5px solid transparent;
	border-top: 5px solid #fff;
	border-right: 5px solid #fff;
}

.message[data-role="user"] .content:before {
	content: '';
	position: absolute;
	right: -12px;
	bottom: -1px;
	border: 6px solid transparent;
	border-bottom: 6px solid #d7d7d7;
	border-left: 6px solid #d7d7d7;
}

.message[data-role="user"] .content:after {
	content: '';
	position: absolute;
	right: -10px;
	bottom: 0;
	border: 5px solid transparent;
	border-bottom: 5px solid #fff;
	border-left: 5px solid #fff;
}

/* Message Content Elements */

.message hr {
	margin: 15px 0;
	border-top: 1px solid #ddd;
}

.message p:last-child {
	margin-bottom: 0;
}

.message ul,
.message ol {
	margin: 0;
}

.message li {
	margin: 0 0 10px;
}

.message li p {
	margin: 0;
}

.message li ul {
	margin-top: 10px;
	list-style-type: disc;
}

.message li li {
	margin: 0 0 10px;
}

.message code {
	font-size: 13px;
	background: #e9e9e9;
	margin: 0 2px;
}

.message img {
	max-width: 100%;
}

/* Conversation Divider */

.hr {
	border-top: 2px solid #999;
	padding-bottom: 37px;
	margin-top: 30px;
	position: relative;
	width: 47%;
	left: 25%;
}

.hr:before {
	content: '8';
	font-family: 'icons';
	font-size: 34px;
	left: 50%;
	position: absolute;
	top: -12px;
	color: #999;
	z-index: 1000;
	background: #f9f9f9;
}

.hr-after {
	text-align: center;
	padding: 5px 0 20px;
	font-size: 30px;
	color: #777;
}

/* Loading States */

.loading-indicator {
	font-family: 'icons';
	font-size: 1.5em;
	animation: textloading 0.8s ease-in-out infinite;
}

.loading-text {
	font-family: monospace;
	white-space: pre-wrap;
}

.caret {
	display: inline-block;
	width: 0.6em;
	height: 1em;
	background: #000;
	margin-left: 0.05ch;
	animation: blink 1s step-end infinite;
	vertical-align: middle;
}

.save-animation-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.8);
	font-family: icons;
	font-size: 120px;
	pointer-events: none;
	z-index: 1000;
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Composition Box */

.composition-box {
	border: 1px solid #aaa;
	border-radius: 5px;
	position: relative;
	z-index: 10;
	margin: 0 50px;
	box-shadow: 0 -6px 20px rgba(204, 204, 204, 0.8);
	flex-shrink: 0;
}

.composition-box select {
	font-size: 14px;
	padding: 4px 5px;
}

.composition-box textarea {
	font-family: math;
	display: block;
	font-size: 15px;
	border-radius: 5px 5px 0 0;
	padding: 8px 13px;
	width: 100%;
	outline: none;
}

.composition-box .commands {
	display: inline-block;
	width: 100%;
	background: #ddd;
	padding: 3px 5px;
	border-radius: 0 0 5px 5px;
}
