:root {
	--chat-background: #ece5dd;
}

[name="chat"] .page-content {
	padding: 0.75em;
	background-color: var(--chat-background);
}

.page-footer .join-this-group {
	padding: 1em;
	background-color: var(--chat-background);
	text-align: center;
}

/* Message Bubble Styles */

.message {
	margin-bottom: 10px;
	max-width: 90%;
	width: fit-content;
	padding: 10px;
	border-radius: 10px;
	position: relative;
	word-wrap: break-word;
}

.message.sent {
	margin-left: auto;
	background-color: #dcf8c6;
}

.message.received {
	margin-right: auto;
	background-color: #fff;
}

.message.ai-skipped {
	background-color: lightyellow;
}

.ai-skipped .hide-from-ai, .ai-skipped .delete-msg {
	display: none;
}

.message .content {
	overflow-x: auto;
}

.sender-name {
	font-weight: bold;
}

.message-footer {
	text-align: right;
	font-size: small;
}

.date-separator {
	margin-top: 1em;
	margin-bottom: 1em;
	text-align: center;
}

.date-separator span {
	padding: 6px 12px;
	border-radius: 6px;
	background-color: yellow;
}

/* Reply Button in Message Bubble */
.reply-btn {
	cursor: pointer;
	background: transparent;
	color: var(--primary);
	border: none;
	margin-right: 8px;
}

/* Reply Snippet inside a Message Bubble */
.reply-snippet {
	border-left: 3px solid #ccc;
	padding-left: 5px;
	margin-top: 1em;
	margin-bottom: 1em;
	font-size: 12px;
	color: #555;
}

/* Input Area */
.input-area {
	display: flex;
	align-items: center;
	padding: 6px;
	background-color: #f7f7f7;
	border-top: 1px solid #ccc;
}

.message-input {
	flex: 1;
	padding: 10px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	resize: vertical;
	font-family: Arial, sans-serif;
}

.send-btn {
	margin-left: 6px;
	font-size: 2em;
	color: var(--primary);
	border: none;
	background-color: transparent;
}

.send-btn:hover {
	color: var(--primary-light);
}

/* Reply Preview Box */
.reply-preview {
	display: flex;
	align-items: center;
	background-color: #fff;
	border: 8px solid #ccc;
	padding: 5px 10px;
	border-radius: 4px;
}

.reply-preview .cancel {
	background: transparent;
	border: none;
	color: #999;
	margin-left: auto; /* align right */
}

.audio-playback {
	display: flex;
}

.audio-playback audio {
	width: 100%;
}

.audio-playback .cancel {
	background: black;
	border: none;
	color: white;
}

code:not([class]) {
	background-color: #f0f0f0;
	padding: 2px 4px;
	border-radius: 4px;
}

pre[class*="language-"] {
	font-size: 12px;
}

/* options dropdown button: {{{ */

.options-button {
	background-color: transparent;
}

.options-button svg {
	fill: rgba(0, 0, 0, 0.54);
	pointer-events: none;
}

.options-button:hover {
	background-color: rgba(0, 0, 0, 0.04);
}

.options-button:focus {
	background-color: rgba(0, 0, 0, 0.06);
}

.options-button:focus .options-list {
	display: block;
}

.options-list {
	display: none;
	position: absolute;
	right: 0;
	top: 45px;
	background: white;
	box-shadow: 0 0 4px grey;
	border-radius: 4px;
	margin: 0;
	padding: 4px 0;
	width: max-content;
	list-style-type: none;
	color: darkblue;
	z-index: 99;
}

.options-list li {
	text-align: left;
	font-size: medium;
	padding: 10px 24px;
	box-sizing: border-box;
	width: 100%;
	cursor: pointer;
}

.options-list li:hover {
	background: #faf6f6;
}

.message .options-list {
	top: 25px;
	/* same as options-button's height */
}

.message .options-button {
	display: none;
	position: absolute;
	right: 0;
	top: 0;
	padding: 0;
	border: 0;
	border-radius: 0 10px 0 0;
	/* same as message border-radius */
	height: 25px;
	width: 25px;
}

.message .options-button:focus {
	display: block;
}

.message:hover .options-button {
	display: block;
}

/* options dropdown button: }}} */