/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   liveChat.css                                       :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: edbernar <edbernar@student.42angouleme.    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2024/07/30 13:53:39 by edbernar          #+#    #+#             */
/*   Updated: 2024/11/15 14:36:36 by edbernar         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */


#chatButton {
	position: fixed;
	cursor : pointer;
	z-index: 10;
	bottom: 40px;
	left: 70px;
	background-color: #020202;
	border-radius: 50%;
	height: 60px;
	width: 60px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.notification-badge {
	display: none;
	position: absolute;
	top: 10px;
	right: 10px;
	width: 10px;
	height: 10px;
	background-color: #E74040;
	border-radius: 50%;
}

#chatButton:hover {
	transform: scale(1.2);
}

#chatButton img{
	width: 35px;
	height: 35px;
}

#chatDiv {
	width: 350px;
	height: 400px;
	background-color: #131313;
	position: fixed;
	left: 20px;
	bottom: 0px;
	z-index: 999;
	display: none;
	flex-direction: column;
	color: white;
	font-family: 'Poppins';
	padding: 20px;
	padding-bottom: 0;
}

#chatDiv h1 {
	margin: 0;
	font-size: 25px;
}

#topChatCross span{
	font-size: 30px;
}

#chatDiv #topChatHome {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	padding-bottom: 10px;
}

#buttonTypeChatHome {
	display: grid;
	grid-template-columns: 50% 50%;
	width: 100%;
}

#buttonTypeChatHome h2 {
	font-size: 20px;
	color: #dfdfdf;
	padding-top: 5px;
	padding-bottom: 5px;
	padding-left: 20px;
}

#selected {
	background-color: black;
}

#messageListChatHome {
	display: flex;
	flex-direction: column;
	overflow: auto;
	height: 230px;
	padding-bottom: 20px;
	padding-top: 5px;
}

#messageListChatHome .user {
	display: flex;
	flex-direction: row;
	height: 75px;
	margin: 0;
	padding: 10px 0 5px 5px;
}

#messageListChatHome .user:hover {
	background-color: #484848;
	cursor : pointer;
}

#messageListChatHome .user .status {
	border-radius: 1000px;
	width: 60px;
	height: 60px;
	margin-right: 10px;
}

#messageListChatHome .online {
	background-color: rgb(17, 165, 29);
}

#messageListChatHome .offline {
	background-color: rgb(148, 39, 39);

}

#messageListChatHome .user img {
	height: 52px;
	width: 52px;
	margin-left: 4px;
	margin-top: 4px;
	border-radius: 100%;
}

#messageListChatHome .opponentMessage {
	max-width: 80%;
	padding: 10px;
	margin-top: 20px;
	background-color: #484848;
	margin-right: auto;
}

#messageListChatHome .meMessage {
	max-width: 80%;
	padding: 10px;
	margin-top: 20px;
	background-color: #222222;
	margin-right: 0;
	margin-left: auto;
}

#messageListChatHome .meMessage p {
	text-align: right;
}


#messageListChatHome .content {
	user-select: text;
}

#messageListChatHome .time {
	margin-top: 10px;
	font-size: 12px;
}

#messageListChatHome p {
	margin: 0;
	word-break: break-word;
}

#inputMessageDiv {
	position: absolute;
	width: 348px;
	height: 50px;
	bottom: 10px;
	color: white;
	display: flex;
	flex-direction: row;
}

#inputMessageDiv p {
	margin: 0;
	padding-left: 10px;
	padding-right: 10px;
	background-color: #080808;
	font-family: "Poppins";
	font-weight: bolder;
	font-size: 35px;
	margin-top: -2px;
}

#inputMessage{
	user-select: text;
	background-color: #0f0f0f;
	width: 100%;
	overflow: hidden;
	resize: none;
	border: 0;
	color: white;
	padding: 15px 5% 15px 5%;
}

#inputMessage:focus {
	outline: none;
	border: 0;
}


#messageListChatHome {
	--sb-thumb-color: #080808;
	--sb-size: 5px;
}

#messageListChatHome::-webkit-scrollbar {
	width: var(--sb-size)
}

#messageListChatHome::-webkit-scrollbar-track {
	border-radius: 1px;
}

#messageListChatHome::-webkit-scrollbar-thumb {
	background: var(--sb-thumb-color);
	border-radius: 1px;
}

@supports not selector(::-webkit-scrollbar) {
	#messageListChatHome {
		scrollbar-color: var(--sb-thumb-color)
						var(--sb-track-color);
	}
}

#infoChat {
	text-align: center;
	margin-top: 100px;
}

.user {
	display: flex;
	flex-direction: row;
	align-items: center;
}

.user span {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background-color: #ffffffe4;
	margin-right: 10px;
}

.status img {
	object-fit: cover;
	object-position: center;
}

@media (max-width: 700px){
	#chatButton {
		left: 40px;
	}
	
	#chatDiv {
		width: calc(90% - 40px);
		position: fixed;
		left: 50%;
		transform: translateX(-50%);
	}

	#inputMessageDiv {
		width: 100%;
	}

	#inputMessage {
		width: calc(80% - 20px);
	}
}