* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	font-family: Arial, sans-serif;
	background-color: #e5e5e5;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	width: 100%;
	margin: 0;
}
.chatContainer {
	background-color: #aeeaee;
	width: 100%;
	max-width: 720px;
	height: 768px;
	border-radius: 20px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
}

h1 {
	background-color: #62bd62;
	color: white;
	text-align: center;
	padding: 10px;
	margin: 0;
	position: relative;
}

@media screen and (max-width: 720px) {
	body {
		height: 100%;
	}
	.chatContainer {
		height: 100dvh;
		max-height: 100vh;
		border-radius: 0;
	}
	h1 {
		text-align: left;
		padding-left: 20px;
	}
}
#messages {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	padding: 15px;
	overflow-y: auto;
	scrollbar-width: none;
	margin: 0;
	width: 100%;
}
#messages::-webkit-scrollbar {
	display: none;
}
#messages p {
	padding: 10px;
	border-radius: 10px;
	max-width: 60%;
	word-break: break-all;
	word-wrap: break-word;
	color: #222;
}

.myMessage {
	display: flex;
	justify-content: flex-end;
	align-self: flex-end;
	width: 100%;
}
.myMessage p {
	width: fit-content;
	background-color: #62bd62;
	color: white;
}

.otherMessage {
	width: 100%;
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
}
.otherMessage p {
	width: fit-content;
	background-color: #f9f9f9;
}
.otherMessage span {
	font-size: 12px;
	padding: 0 10px;
	color: #525252;
	opacity: 0.8;
}
.imageMessage {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 125px;
	height: 125px;
}
.imageMessage img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
	overflow: hidden;
}
.systemMessage {
	display: flex;
	justify-content: center;
	align-items: center;
}
.systemMessage p {
	color: #525252;
	opacity: 0.8;
	padding: 0 !important;
	border-radius: 20px;
	font-size: 14px;
}
.systemMessage span {
	color: #2b2b2b;
	opacity: 0.8;
	border-radius: 20px;
	font-size: 14px;
	font-weight: bolder;
}
#form {
	display: flex;
	padding: 10px;
	background-color: #f9f9f9;
	border-top: 1px solid #ddd;
	align-items: flex-end;
	position: relative;
}

#input {
	max-width: 90%;
	max-height: 150px;
	overflow-y: auto;
	scrollbar-width: none;
	flex: 1;
	padding: 10px;
	font-size: 16px;
	border: 1px solid #ddd;
	border-radius: 20px;
	outline: none;
	padding-right: 65px;
}
#input::-webkit-scrollbar {
	display: none;
}
button {
	background-color: #62bd62;
	height: auto;
	color: white;
	border: none;
	padding: 10px 15px;
	margin-left: 10px;
	font-size: 16px;
	border-radius: 5px;
	cursor: pointer;
	max-height: 45px;
}

.emoji-button {
	position: absolute;
	top: 51%;
	transform: translateY(-50%);
	right: 95px;
	background: none;
	border: none;
	cursor: pointer;
	width: 22px;
	height: 22px;
	background-image: url("./emoji.webp");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	padding: 0;
	margin: 0;
}

.emoji-popup {
	display: none;
	position: absolute;
	bottom: 50px;
	right: 100px;
	background: white;
	border: 1px solid #ccc;
	padding: 10px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	max-height: 150px;
	overflow-y: auto;
	width: 285px;
	scrollbar-width: none;
	border-radius: 10px;
}
.emoji-popup::-webkit-scrollbar {
	display: none;
}

.emoji-popup .emoji {
	font-size: 24px;
	cursor: pointer;
}

.emoji-popup .emoji:hover {
	background: #f0f0f0;
}

.sticker-button {
	position: absolute;
	top: 51%;
	transform: translateY(-50%);
	right: 125px;
	background: none;
	border: none;
	cursor: pointer;
	width: 22px;
	height: 22px;
	background-image: url("./stamp.webp");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	padding: 0;
	margin: 0;
}

.sticker-popup {
	display: none;
	position: absolute;
	bottom: 50px;
	right: 80px;
	background: white;
	border: 1px solid #ccc;
	padding: 10px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	max-height: 200px;
	overflow-y: auto;
	width: 300px;
	scrollbar-width: none;
	border-radius: 10px;
}
.sticker-box {
	width: 100%;
	height: 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.sticker-box div {
	width: 85px;
	height: 85px;
}
.sticker-box div img {
	object-fit: cover;
	height: 100%;
	width: 100%;
}
.sticker-popup::-webkit-scrollbar {
	display: none;
}

.sticker:hover {
	background: #f0f0f0;
}

.user-button {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: 20px;
	background: none;
	border: none;
	cursor: pointer;
	width: 30px;
	height: 30px;
	background-image: url("./user.png");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	margin-left: 10px;
}

.user-popup {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	background: white;
	border: 1px solid #ccc;
	padding: 10px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	max-height: 200px;
	overflow-y: auto;
	width: 200px;
	scrollbar-width: none;
	border-radius: 10px;
	color: #222;
	font-size: 16px;
}

.user-popup .user {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	padding: 5px 0;
}

.user-popup .user .status {
	width: 10px;
	height: 10px;
	background-color: green;
	border-radius: 50%;
}
.user .icon {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	overflow: hidden;
	background-color: #cfcfcf;
}
