#chat-container {
	position: relative;
	width: 100%;
	height: 100%;
}

#chat-container #chat-content {
	overflow-y: scroll;
	scroll-behavior: smooth;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 5rem;
	padding: 1.5rem 1.5rem 0.75rem 1.5rem;
}

@media screen and (max-width: 1200px) {
	#chat-container #chat-content {
		padding: 0.75rem;
	}
}

#chat-container #chat-entry-container {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 5rem;
	padding: 1rem;
}

#chat-container #chat-entry-container form {
	display: flex;
	flex-direction: row;
}

#chat-container #chat-entry-container form input[type="file"] {
	opacity: 0;
	display: none;
}

#chat-container #chat-entry-container form button,
#chat-container #chat-entry-container form label {
	position: relative;
	top: inherit;
	font-size: inherit;
	transition: inherit;
	width: 50px;
	padding: inherit;
	margin: 0 1rem;
	cursor: pointer;
	align-content: center;
	border-radius: var(--border-radius);
	border: 1px solid rgba(128, 128, 128, 0.2);
}

#chat-container #chat-entry-container form textarea {
	flex-grow: 1;
	resize: none;
}

#chat-container .message-container {
	position: relative;
	transition: all 0.33s;
	background: var(--bg-lighter);
	margin-top: 0.5rem;
	padding: 0.5rem;
	border-radius: var(--border-radius);
}

#chat-container .message-container .html-from-markdown {
	padding: 0;
}

#chat-container .user-tock.time-tock:has(+ .user-tock.time-tick),
#chat-container .user-tock.time-tick:has(+ .user-tock.time-tock),
#chat-container .user-tick.time-tock:has(+ .user-tick.time-tick),
#chat-container .user-tick.time-tick:has(+ .user-tick.time-tock),
#chat-container .user-tock.time-tock:has(+ .user-tick.time-tick),
#chat-container .user-tock.time-tick:has(+ .user-tick.time-tock),
#chat-container .user-tick.time-tock:has(+ .user-tock.time-tick),
#chat-container .user-tick.time-tick:has(+ .user-tock.time-tock),
#chat-container .user-tock.time-tock:last-of-type,
#chat-container .user-tock.time-tick:last-of-type,
#chat-container .user-tick.time-tock:last-of-type,
#chat-container .user-tick.time-tick:last-of-type {
	/* border: 1px dotted red; */
	margin-bottom: 1rem !important;
	padding-bottom: 0.25rem !important;
	padding-top: 0 !important;
	margin-top: 0.5rem !important;
}

#chat-container .user-tock.time-tock:has(+ .user-tock.time-tock),
#chat-container .user-tock.time-tick:has(+ .user-tock.time-tick),
#chat-container .user-tick.time-tock:has(+ .user-tick.time-tock),
#chat-container .user-tick.time-tick:has(+ .user-tick.time-tick) {
	/* border: 1px dotted blue; */
	margin-bottom: -0.75rem !important;
	padding-top: 0 !important;
}

#chat-container .user-tock.time-tock+.user-tock.time-tick:has(+ .user-tock.time-tick),
#chat-container .user-tock.time-tick+.user-tock.time-tock:has(+ .user-tock.time-tock),
#chat-container .user-tick.time-tock+.user-tick.time-tick:has(+ .user-tick.time-tick),
#chat-container .user-tick.time-tick+.user-tick.time-tock:has(+ .user-tick.time-tock),
#chat-container .user-tock.time-tock+.user-tick.time-tick:has(+ .user-tick.time-tick),
#chat-container .user-tock.time-tick+.user-tick.time-tock:has(+ .user-tick.time-tock),
#chat-container .user-tick.time-tock+.user-tock.time-tick:has(+ .user-tock.time-tick),
#chat-container .user-tick.time-tick+.user-tock.time-tock:has(+ .user-tock.time-tock) {
	/* border: 1px dotted green; */
	margin-bottom: -0.75rem !important;
}

#chat-container .message-container.user-tick.time-tick+.message-container.user-tick.time-tick .info-container,
#chat-container .message-container.user-tick.time-tock+.message-container.user-tick.time-tock .info-container,
#chat-container .message-container.user-tock.time-tick+.message-container.user-tock.time-tick .info-container,
#chat-container .message-container.user-tock.time-tock+.message-container.user-tock.time-tock .info-container {
	opacity: 0;
	visibility: hidden;
	height: 0;
	margin: 0;
}

#chat-container .message-container.sending {
	opacity: 0.75;
}

#chat-container .message-container button[commandfor] {
	position: absolute;
	top: 0.1rem;
	right: 0.1rem;
	color: rgb(from var(--text) r g b / 0.7);
	border: none;
	z-index: 10;
}

#chat-container .message-container .message-actions-container:has(input[type="checkbox"]:checked) {
	background: rgb(from var(--bg) r g b / 0.9);
	border-color: var(--border-subtle);
	z-index: 11;
}

#chat-container .message-container .message-actions-container .message-action {
	border: none;
	opacity: 0;
	transition: 0.2s ease-in-out;
	width: 0;
	align-content: center;
	height: 3.5rem;
	overflow: hidden;
	cursor: pointer;
	margin-right: 0;
	padding: 0.25rem 0 0 0;
	text-align: center;
	text-wrap: nowrap;
	background: none;
}

#chat-container .message-container .message-actions-container label {
	cursor: pointer;
	width: 2rem;
	text-align: right;
	padding-top: 0.5rem;
}

#chat-container .message-container .message-actions-container input[type="checkbox"] {
	opacity: 0;
	display: none;
}

#chat-container .message-container .message-actions-container input[type="checkbox"]:checked~.message-action {
	opacity: 1;
	width: 3.25rem;
	margin-right: 1.25rem;
}

#chat-container .message-container .message-actions-container .message-action .action-name {
	font-size: x-small;
}

#chat-container .message-container .info-container {
	display: flex;
	margin-bottom: -1.75rem;
	height: 3.75rem;
}

#chat-container .message-container .info-container .username-container {
	margin: 0 4px;
	font-weight: bold;
	padding-top: 0.5rem;
}

#chat-container .message-container .info-container .datetime-container {
	margin: 0 4px;
	padding-top: 0.4rem;
}

#chat-container .message-container .info-container .datetime-container .long {
	font-size: x-small;
	text-transform: uppercase;
}

#chat-container .message-container .info-container .datetime-container .short {
	font-size: xx-small;
	visibility: hidden;
	display: none;
}

#chat-container .message-container .message-content-container,
#chat-container .message-container .message-media-container,
#chat-container .message-container .reactions-container {
	padding-left: 8rem;
	overflow-x: auto;
}

#chat-container .message-container .reactions-container:has(> .reaction-container) {
	margin-top: 0.5rem;
	margin-bottom: 0.25rem;
}

#chat-container .embed-container {
	position: relative;
	width: 100%;
	max-width: 640px;
}

#chat-container .embed-container .embed-actions-container {
	position: absolute;
	z-index: 100;
	top: 0.25rem;
	right: 0.25rem;
	height: 2rem;

	display: none;
	visibility: hidden;
	opacity: 0;
}

#chat-container .embed-container audio {
	width: 100%;
}

#chat-container .embed-container.rounded {
	border-radius: 6px;
}

#chat-container .embed-container.short {
	height: 120px;
	overflow: hidden;
	overflow-y: auto;
}

#chat-container .embed-container.tidal {
	border-radius: 12px;
}

#chat-container .embed-container.vertical {
	max-width: 320px;
	overflow: hidden;
	aspect-ratio: 9 / 16 !important;
}

#chat-container .embed-container.letterbox {
	/*	height: 0; */
	overflow: hidden;
	overflow-y: auto;
	/* padding-bottom: 33%; */
	aspect-ratio: 16 / 9 !important;
}

#chat-container .embed-container.square {
	overflow: hidden;
	overflow-y: auto;
	aspect-ratio: 1 / 1 !important;
}

#chat-container .embed-container iframe,
#chat-container .embed-container video {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-style: none;
}

@media screen and (max-width: 1200px) {
	#chat-container #chat-container {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
	}

	#chat-container #chat-container #chat-entry-container,
	#chat-container #chat-container #chat-entry-container form {
		padding: 0.25rem;
	}

	#chat-container #chat-container #chat-entry-container form button,
	#chat-container #chat-container #chat-entry-container form label {
		margin: 0 0.5rem;
	}

	#chat-container .message-container .message-content-container,
	#chat-container .message-container .message-media-container,
	#chat-container .message-container .reactions-container {
		padding-left: 4rem;
	}

	#chat-container .message-container .info-container .datetime-container .long {
		display: none;
		visibility: hidden;
	}

	#chat-container .message-container .info-container .datetime-container .short {
		display: inline-block;
		visibility: visible;
	}
}
