:root {
	--color-chat-1: rgba(135, 195, 243, 1);
	--color-chat-1-1: rgba(135, 195, 243, 0.1);
	--color-chat-1-3: rgba(135, 195, 243, 0.3);
	--color-chat-1-5: rgba(135, 195, 243, 0.5);
	--color-chat-1-7: rgba(135, 195, 243, 0.7);
	--color-chat-1-8: rgba(135, 195, 243, 0.8);

	--color-chat-2: rgba(255, 0, 187, 1);

	--color-chat-3: rgb(61, 129, 185);
	--color-chat-3-1: rgba(61, 129, 185, 0.1);
	--color-chat-3-3: rgba(61, 129, 185, 0.3);
	--color-chat-3-5: rgba(61, 129, 185, 0.5);
	--color-chat-3-7: rgba(61, 129, 185, 0.7);
	--color-chat-3-8: rgba(61, 129, 185, 0.8);

	/*
	--color1: rgba(255, 0, 187, 1);
	--color1-1: rgba(255, 0, 187, 0.1);
	--color1-3: rgba(255, 0, 187, 0.3);
	--color1-5: rgba(255, 0, 187, 0.5);
	
	--color-gray1: rgba(232, 232, 232, 1);
	--color-gray1-0: rgba(232, 232, 232, 0);
	--color-gray1-5: rgba(232, 232, 232, 0.5);
	--color-gray1-7: rgba(232, 232, 232, 0.7);
	--color-gray2: rgba(136, 136, 136, 1.0);
	--color-gray2-3: rgba(136, 136, 136, 0.3);
	--color-gray2-5: rgba(136,136,136,0.5);
	*/
}


#chat {
	/*background-color: #fff;
	padding: 1em;*/
    position: relative;
	height: calc(100% - 50px);
}

#chat_history_outer {
	position: relative;
	z-index: 1;
}

#chat_history {
	max-height: calc(100dvh - 50px - 150px);
	min-height: 50vh;
	overflow-y: scroll;
	padding: 1em;
	border: 1px solid var(--color-chat-1-5);
	border-radius: 4px;
	box-sizing: border-box;
	/*background-color: #fff;*/
	color: #fff;
	background-color: var(--color-chat-1);
	background-image: url(/files/site/chat_bg1.jpg);
	background-repeat: repeat;
	background-blend-mode: soft-light;
	position: relative;
	z-index: 1;
}

#chat_history a {
	color: var(--color1);
}

#chat_empty {
	font-weight: 600;
	color: #fff
}

.chat_reply,
#chat_reply {
	display: block;
	padding: 0.2em 0.2em 0.2em 0.5em;
	border-left: 4px solid var(--color-chat-1);
	font-size: 70%;
	opacity: 0.5;
	margin-top: 0.5em;
	background-color: var(--color-gray1);
}
#chat_reply:empty {
	display: none;
}

.chat_message .chat_reply,
.chat_message #chat_reply {
	/*border: 1px solid var(--color-gray2);*/
	border-left: 4px solid var(--color-chat-1);
}

#chat_new {
	position: relative;
	padding-top: 0.5em;
	box-sizing: border-box;
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	justify-content: center;
	flex-wrap: nowrap;
	z-index: 10;
}

#chat_new_text {
	background-color: #fff;
	padding: 0.5em;
	height: auto;
	max-height: 10em;
	overflow-y: auto;
	border: 0px solid var(--color-gray2);
	border-radius: 4px;
	color: #000;
	max-height: 5rem;
}

#chat_new_text[placeholder]:empty:before {
    content: attr(placeholder);
    color: var(--color-gray2);
}

#chat_new_text:focus-visible {
	outline: 0;
}

#chat_send {
	padding: 0.75em 1em;
	width: auto;
	margin: 0;
	line-height: 1;
}

#chat_bottom {
	margin-top: 0.5em;
	text-align: left;
	font-size: 120%;
}

#chat_file {
	/*border: 0;
	box-shadow: 0 0 0 0 transparent;
	background-color: transparent;*/
	/*outline: 0;
	opacity: 0;
	pointer-events: none;
	user-select: none;*/
	display: none;
}


#chat_file_label, #chat_emoji {
	border: 0px solid var(--color-gray2-5);
	border-radius: 4px;
	display: inline-block;
	padding: 0;
	transition: 0.4s;
	cursor: pointer;
	text-decoration: none;
	font-size: 1.7em;
	z-index: 100;
}

#chat_file_title {
	color: var(--color-gray2);
}
#chat_file_label:hover, #chat_emoji:hover {
	background-color: var(--color-chat-1-3);
	text-decoration: none;
}


#chat_previous {
	text-align: center;
}

#chat_users_online {
	font-size: 70%;
    opacity: 0.5;
    text-align: right;
    padding-right: 0.5em;
}

#chat_user_list {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    height: auto;
    max-height: 100%;
	font-size: 70%;
    padding: 1em;
    overflow-y: scroll;
    background-color: rgba(255, 255, 255, 1.00);
    box-shadow: -0.5em 0.5em 1em 0 rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-chat-1-5);
}

#chat_user_list a {
	color: #000;
}

#chat_emoji_select {
	position: absolute;
	bottom: 3rem;
	right: 0;
	width: 600px;
	max-width: 90vw;
	height: 300px;
	overflow-y: scroll;
	display: none;
	background-color: var(--color-gray1);
	padding: 0.5em;
	box-shadow: 0 0 1em 0 var(--color-gray2);
	font-size: 120%;
}

.chat_message {
	margin-bottom: 0.5em;
	display: flex;
}

.chat_mine_outer {
	justify-content: flex-end;
}

.chat_another_outer {
	justify-content: flex-start;
}

.chat_mine {
	border-radius: 0.5em 0 0.5em 0.5em;
	padding: 0.2em 0.5em;
	text-align: left;
	background-color: rgba(255, 255, 255, 0.8);
	color: #000;
	backdrop-filter: blur(1px);
	overflow-x: hidden;
}

.chat_another {
	border-radius: 0 0.5em 0.5em 0.5em;
	padding: 0.2em 0.5em;
	text-align: left;
	background-color: rgba(255, 255, 255, 1);
	color: #000;
	backdrop-filter: blur(1px);
	overflow-x: hidden;
}

.chat_text {
	overflow-x: scroll;
	max-width: 40vw;
}

.chat_admin {
	/*background-color: rgba(255,0,100,0.08);*/
	background-color: var(--color-chat-1-1);
}

.chat_image {
	height: 5em;
}

.chat_list_item .chat_new_cnt {
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	vertical-align: middle;
	border-radius: 50%;
	background-color: var(--color-chat-2);
	margin-left: 0.5em;
}

.chat_link {
	color: var(--color-chat-1);
}


.reply_name {
	font-weight: bold;
}

.reply_del {
	text-decoration: none;
}

.reply_del:hover {
	text-decoration: none;
}

.message_id, .message_user {
	font-weight: 600;
	color: var(--color-chat-3);
}

.message_date {
	font-size: 60%;
	text-align: end;
	opacity: 0.6;
	color: #000;
}

.chat_mine .message_date,
.chat_another .message_date {
	opacity: 0.4;
}

.chat_attachment {
	margin-top: 0.5rem;
	padding: 0 0.5rem;
}

.chat_attachment img {
	max-height: 100px;
}

.chat_attachment a {
	color: #000 !important;
}

.chat_attachment_buttons {
	margin-top: 0.5rem;
}

.chat_attachment_buttons > div {
	display: flex;
	gap: 2px;
}

.chat_attachment_buttons a {
	background-color: var(--color-chat-3-8);
	border-radius: 4px;
	padding: 0.5rem 1rem;
	transition: 200ms;
	color: #fff !important;
}

.chat_attachment_buttons a:hover {
	background-color: var(--color-chat-3-5);
}

.chat_photo {
	height: 200px;
	width: 200px;
	object-fit: cover;
	border-radius: 4px;
	transition: 200ms;
}

.chat_photo:hover {
	filter: brightness(0.8);
}

.message_attachment1 {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

#chat_scroll {
	position: absolute;
	bottom: 0.5rem;
	left: calc(50% - 2rem);
	border-radius: 50%;
	display: block;
	z-index: 5;
	transition: 200ms;
	opacity: 0.2;
	background-color: var(--color-gray2);
	padding: 1rem;
}

#chat_scroll img {
	display: block;
	width: 2rem;
	height: 2rem;
}

#chat_scroll:hover {
	opacity: 0.4;
}




/* xxl */
@media screen {

}

@media screen and (max-width: 1800px) {
	
}

/* xl */
@media screen and (max-width: 1400px) {
	.chat_text {
		max-width: 40vw;
	}
	
}

/* lg */
@media screen and (max-width: 1200px) {
	.chat_photo {
		height: 100px;
		width: 100px;
	}

}

/* md */
@media screen and (max-width: 992px) {
}

/* sm */
@media screen and (max-width: 768px) {
	.chat_text {
		max-width: 60vw;
	}
}

/* xs */
@media screen and (max-width: 576px) {
	.chat_photo {
		height: 80px;
		width: 80px;
	}
}
