body,html{
	height: 100%;
	margin: 0;
	background: rgb(44, 47, 59);
   background: -webkit-linear-gradient(to right, rgb(40, 59, 34), rgb(54, 60, 70), rgb(32, 32, 43));
	background: linear-gradient(to right, rgb(38, 51, 61), rgb(50, 55, 65), rgb(33, 33, 78));
}

/* Loading Overlay */
.loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
}

.loading-spinner {
	text-align: center;
	color: white;
}

.spinner {
	width: 50px;
	height: 50px;
	margin: 0 auto 20px;
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top: 4px solid white;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.loading-spinner p {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 10px 0;
}

.loading-subtext {
	font-size: 1rem !important;
	font-weight: 400 !important;
	opacity: 0.8;
}

@media(max-width: 480px){
	.loading-spinner p {
		font-size: 1.2rem;
	}
	.loading-subtext {
		font-size: 0.9rem !important;
	}
	.spinner {
		width: 40px;
		height: 40px;
	}
}

.chat{
	margin-top: auto;
	margin-bottom: auto;
	width: 100%;
	max-width: 100%;
}
.card{
	height: 500px;
	border-radius: 15px !important;
	background-color: rgba(0,0,0,0.4) !important;
}

/* Responsive adjustments */
@media(max-width: 768px){
	.card{
		height: calc(100vh - 40px);
		margin: 20px 10px;
		border-radius: 10px !important;
	}
	.chat{
		margin: 0;
	}
}

@media(max-width: 480px){
	.card{
		height: 100vh;
		margin: 0;
		border-radius: 0 !important;
	}
}
.contacts_body{
	padding:  0.75rem 0 !important;
	overflow-y: auto;
	white-space: nowrap;
}
.msg_card_body{
	overflow-y: auto;
}
.card-header{
	border-radius: 15px 15px 0 0 !important;
	border-bottom: 0 !important;
}
.card-footer{
border-radius: 0 0 15px 15px !important;
	border-top: 0 !important;
}
.container{
	align-content: center;
}
.search{
	border-radius: 15px 0 0 15px !important;
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color:white !important;
}
.search:focus{
	 box-shadow:none !important;
   outline:0px !important;
}
.type_msg{
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color:white !important;
	height: 60px !important;
	overflow-y: auto;
}
	.type_msg:focus{
	 box-shadow:none !important;
   outline:0px !important;
}
.attach_btn{
	border-radius: 15px 0 0 15px !important;
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color: white !important;
	cursor: pointer;
}
.send_btn{
	border-radius: 0 15px 15px 0 !important;
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color: white !important;
	cursor: pointer;
}
.search_btn{
	border-radius: 0 15px 15px 0 !important;
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color: white !important;
	cursor: pointer;
}
.contacts{
	list-style: none;
	padding: 0;
}
.contacts li{
	width: 100% !important;
	padding: 5px 10px;
	margin-bottom: 15px !important;
}
.active{
	background-color: rgba(0,0,0,0.3);
}
.user_img{
	height: 70px;
	width: 70px;
	border:1.5px solid #f5f6fa;
	object-fit: cover;
}
.user_img_msg{
	height: 40px;
	width: 40px;
	border:1.5px solid #f5f6fa;
	object-fit: cover;
}

@media(max-width: 480px){
	.user_img{
		height: 50px;
		width: 50px;
	}
	.user_img_msg{
		height: 35px;
		width: 35px;
	}
	.img_cont{
		height: 50px;
		width: 50px;
	}
	.img_cont_msg{
		height: 35px;
		width: 35px;
	}
}
.img_cont{
	position: relative;
	height: 70px;
	width: 70px;
}
.img_cont_msg{
	height: 40px;
	width: 40px;
}
.online_icon{
	position: absolute;
	height: 15px;
	width:15px;
	background-color: #4cd137;
	border-radius: 50%;
	bottom: 0.2em;
	right: 0.4em;
	border:1.5px solid white;
}
.offline{
	background-color: #c23616 !important;
}
.user_info{
	margin-top: auto;
	margin-bottom: auto;
	margin-left: 15px;
}
.user_info span{
	font-size: 20px;
	color: white;
}
.user_info p{
	font-size: 10px;
	color: rgba(255,255,255,0.6);
}

@media(max-width: 480px){
	.user_info{
		margin-left: 10px;
	}
	.user_info span{
		font-size: 16px;
	}
	.user_info p{
		font-size: 9px;
	}
}
.video_cam{
	margin-left: 50px;
	margin-top: 5px;
}
.video_cam span{
	color: white;
	font-size: 20px;
	cursor: pointer;
	margin-right: 20px;
}
.msg_cotainer{
	margin-top: auto;
	margin-bottom: auto;
	margin-left: 10px;
	border-radius: 25px;
	background-color: rgb(82, 172, 255);
	padding: 10px;
	position: relative;
	max-width: 70%;
	word-wrap: break-word;
}
.msg_cotainer_send{
	margin-top: auto;
	margin-bottom: auto;
	margin-right: 10px;
	border-radius: 25px;
	background-color: #58cc71;
	padding: 10px;
	position: relative;
	max-width: 70%;
	word-wrap: break-word;
}

@media(max-width: 480px){
	.msg_cotainer, .msg_cotainer_send{
		max-width: 80%;
		padding: 8px;
		font-size: 14px;
	}
}
.msg_time{
	position: absolute;
	left: 0;
	bottom: -15px;
	color: rgba(255,255,255,0.5);
	font-size: 10px;
}
.msg_time_send{
	position: absolute;
	right:0;
	bottom: -15px;
	color: rgba(255,255,255,0.5);
	font-size: 10px;
}
.msg_head{
	position: relative;
}
#action_menu_btn{
	position: absolute;
	right: 10px;
	top: 10px;
	color: white;
	cursor: pointer;
	font-size: 20px;
}
.action_menu{
	z-index: 1;
	position: absolute;
	padding: 15px 0;
	background-color: rgba(0,0,0,0.5);
	color: white;
	border-radius: 15px;
	top: 30px;
	right: 15px;
	display: none;
}
.action_menu ul{
	list-style: none;
	padding: 0;
	margin: 0;
}
.action_menu ul li{
	width: 100%;
	padding: 10px 15px;
	margin-bottom: 5px;
}
.action_menu ul li i{
	padding-right: 10px;
}
.action_menu ul li:hover{
	cursor: pointer;
	background-color: rgba(0,0,0,0.2);
}
@media(max-width: 576px){
	.contacts_card{
	margin-bottom: 15px !important;
}
}

/* Typing indicator animation */
.typing-indicator {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 10px 0;
}

.typing-indicator span {
	height: 10px;
	width: 10px;
	background-color: rgba(255, 255, 255, 0.7);
	border-radius: 50%;
	display: inline-block;
	animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
	animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes typing {
	0%, 60%, 100% {
		transform: translateY(0);
		opacity: 0.7;
	}
	30% {
		transform: translateY(-10px);
		opacity: 1;
	}
}