/**
 * Booking Chat Styles
 */

.order-chat-section {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #e0e0e0;
}

.order-chat-toggle {
	display: inline-block;
	padding: 10px 20px;
	background-color: #2E74B5;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.3s ease;
	margin-bottom: 15px;
	position: relative;
}

.order-chat-toggle:hover {
	background-color: #1f5a8e;
}

.order-chat-toggle.has-unread {
	background-color: #e74c3c;
}

.order-chat-toggle.has-unread:hover {
	background-color: #c0392b;
}

.chat-notification-badge {
	position: absolute;
	top: -8px;
	right: -8px;
	background-color: #e74c3c;
	color: #ffffff;
	border-radius: 12px;
	min-width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: bold;
	padding: 0 6px;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	z-index: 10;
}

.chat-notification-badge.pulse {
	animation: pulseBadge 0.6s ease;
}

@keyframes pulseBadge {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.2);
	}
	100% {
		transform: scale(1);
	}
}

.order-chat-wrapper {
	display: none;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	margin-top: 10px;
}

.order-chat-container {
	height: 400px;
	display: flex;
	flex-direction: column;
	position: relative;
}

.order-chat-header {
	background-color: #2E74B5;
	color: #ffffff;
	padding: 12px 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.order-chat-header h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
}

.order-chat-member-count {
	font-size: 12px;
	opacity: 0.9;
}

.order-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 15px;
	background: #ffffff;
}

.order-chat-message {
	margin-bottom: 15px;
	animation: fadeIn 0.3s ease;
}

.order-chat-message-own {
	text-align: right;
}

.order-chat-message-content {
	max-width: 70%;
	display: inline-block;
	background: #f0f0f0;
	padding: 10px 12px;
	border-radius: 12px;
}

.order-chat-message-own .order-chat-message-content {
	background: #2E74B5;
	color: #ffffff;
}

.order-chat-message-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
	font-size: 11px;
	opacity: 0.8;
}

.order-chat-message-own .order-chat-message-header {
	justify-content: flex-end;
}

.order-chat-message-author {
	font-weight: 600;
	margin-right: 8px;
}

.order-chat-message-time {
	opacity: 0.7;
}

.order-chat-message-text {
	word-wrap: break-word;
	line-height: 1.4;
}

.order-chat-input-wrapper {
	padding: 15px;
	background: #ffffff;
	border-top: 1px solid #e0e0e0;
	display: flex;
	gap: 10px;
}

.order-chat-input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	font-size: 14px;
	resize: none;
	outline: none;
}

.order-chat-input:focus {
	border-color: #2E74B5;
}

.order-chat-send-btn {
	padding: 10px 20px;
	background-color: #2E74B5;
	color: #ffffff;
	border: none;
	border-radius: 20px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.3s ease;
	min-width: 80px;
}

.order-chat-send-btn:hover {
	background-color: #1f5a8e;
}

.order-chat-send-btn:disabled {
	background-color: #cccccc;
	cursor: not-allowed;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Mobile responsive */
@media (max-width: 768px) {
	.order-chat-container {
		height: 350px;
	}
	
	.order-chat-message-content {
		max-width: 85%;
	}
	
	.order-chat-toggle {
		width: 100%;
		text-align: center;
	}
}

/* Scrollbar styling */
.order-chat-messages::-webkit-scrollbar {
	width: 6px;
}

.order-chat-messages::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.order-chat-messages::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 3px;
}

.order-chat-messages::-webkit-scrollbar-thumb:hover {
	background: #a1a1a1;
}

/* Loading overlay */
.chat-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.9);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	border-radius: 8px;
}

.chat-loading-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2E74B5;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 15px;
}

.chat-loading-text {
	color: #2E74B5;
	font-size: 16px;
	font-weight: 500;
}

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

