/* Voxfor Secure Live Chat - Frontend Chat Widget Styles */

.voxfseli-chat-widget.voxfseli-modern-design {
	position: fixed;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

/* Chat Launcher */
.voxfseli-chat-launcher {
	position: relative;
	transition: var(--voxfseli-transition);
}

.voxfseli-launcher-button {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--voxfseli-shadow);
	transition: var(--voxfseli-transition);
	position: relative;
}

.voxfseli-launcher-button:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 32px rgba(0, 0, 0, 0.2);
}

.voxfseli-launcher-icon {
	transition: var(--voxfseli-transition);
}

.voxfseli-status-indicator {
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 3px solid white;
	background: #10b981;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

.voxfseli-status-offline {
	background: #ef4444;
}

.voxfseli-notification-badge {
	position: absolute;
	top: -8px;
	right: -8px;
	background: #ef4444;
	color: white;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	font-size: 12px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-10px); }
	60% { transform: translateY(-5px); }
}

/* Chat Window */
.voxfseli-chat-window {
	position: fixed;
	bottom: 90px;
	right: 20px;
	width: 380px;
	height: 550px;
	background: white;
	border-radius: var(--voxfseli-border-radius);
	box-shadow: var(--voxfseli-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0.8) translateY(20px);
	opacity: 0;
	transition: var(--voxfseli-transition);
	pointer-events: none;
}

.voxfseli-chat-window.voxfseli-open {
	transform: scale(1) translateY(0);
	opacity: 1;
	pointer-events: all;
}

.voxfseli-chat-header {
	padding: 20px;
	color: white;
	position: relative;
	background: var(--voxfseli-primary-color);
}

.voxfseli-chat-header h3 {
	margin: 0 0 5px 0;
	font-size: 18px;
	font-weight: 600;
}

.voxfseli-chat-header p {
	margin: 0;
	opacity: 0.9;
	font-size: 13px;
}

.voxfseli-close-chat {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	color: white;
	font-size: 20px;
	cursor: pointer;
	padding: 5px;
	border-radius: 4px;
	transition: var(--voxfseli-transition);
}

.voxfseli-close-chat:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* Chat Content */
.voxfseli-chat-content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.voxfseli-chat-form {
	padding: 20px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.voxfseli-form-group {
	margin-bottom: 15px;
}

.voxfseli-form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 500;
	color: #374151;
	font-size: 13px;
}

.voxfseli-form-group input,
.voxfseli-form-group textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	transition: var(--voxfseli-transition);
	box-sizing: border-box;
}

.voxfseli-form-group input:focus,
.voxfseli-form-group textarea:focus {
	outline: none;
	border-color: var(--voxfseli-primary-color);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.voxfseli-start-chat-btn {
	width: 100%;
	padding: 12px;
	background: var(--voxfseli-primary-color);
	color: white;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: var(--voxfseli-transition);
	font-size: 14px;
}

.voxfseli-start-chat-btn:hover {
	background: var(--voxfseli-primary-hover);
	transform: translateY(-1px);
}

/* Messages Area */
.voxfseli-messages {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	background: #ffffff;
}

.voxfseli-message {
	margin-bottom: 15px;
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.voxfseli-message.voxfseli-user {
	flex-direction: row-reverse;
}

.voxfseli-message-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: bold;
	color: #6b7280;
	flex-shrink: 0;
}

.voxfseli-message.voxfseli-agent .voxfseli-message-avatar {
	background: var(--voxfseli-primary-color);
	color: white;
}

.voxfseli-message-content {
	max-width: 70%;
	padding: 10px 15px;
	border-radius: 18px;
	background: #f3f4f6;
	color: #374151;
	line-height: 1.4;
	position: relative;
}

.voxfseli-message.voxfseli-user .voxfseli-message-content {
	background: var(--voxfseli-primary-color);
	color: white;
}

.voxfseli-message.voxfseli-agent .voxfseli-message-content {
	background: #f3f4f6;
	color: #374151;
}

.voxfseli-message-time {
	font-size: 11px;
	color: #9ca3af;
	margin-top: 5px;
	text-align: center;
}

/* Message Input */
.voxfseli-message-input {
	padding: 15px 20px;
	background: white;
	border-top: 1px solid #e5e7eb;
	display: flex;
	gap: 10px;
	align-items: flex-end;
}

.voxfseli-message-input input {
	flex: 1;
	padding: 10px 15px;
	border: 1px solid #d1d5db;
	border-radius: 20px;
	resize: none;
	font-size: 14px;
	line-height: 1.4;
	max-height: 100px;
	transition: var(--voxfseli-transition);
}

.voxfseli-message-input input:focus {
	outline: none;
	border-color: var(--voxfseli-primary-color);
}

.voxfseli-send-button {
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: var(--voxfseli-primary-color);
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--voxfseli-transition);
	flex-shrink: 0;
}

.voxfseli-send-button:hover {
	background: var(--voxfseli-primary-hover);
	transform: scale(1.1);
}

.voxfseli-send-button:disabled {
	background: #9ca3af;
	cursor: not-allowed;
	transform: none;
}

/* Typing Indicator */
.voxfseli-typing-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	color: #6b7280;
	font-size: 13px;
	background: #f9fafb;
	border-top: 1px solid #f3f4f6;
}

.voxfseli-typing-dots {
	display: flex;
	gap: 4px;
}

.voxfseli-typing-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #9ca3af;
	animation: typing 1.4s infinite ease-in-out;
}

.voxfseli-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.voxfseli-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
	0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
	40% { transform: scale(1); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 480px) {
	.voxfseli-chat-window {
		bottom: 0;
		right: 0;
		left: 0;
		width: 100%;
		height: 100%;
		border-radius: 0;
	}
	
	.voxfseli-chat-window.voxfseli-open {
		transform: translateY(0);
	}
}

/* Accessibility */
.voxfseli-chat-widget button:focus {
	outline: 2px solid var(--voxfseli-primary-color);
	outline-offset: 2px;
}

.voxfseli-chat-widget input:focus,
.voxfseli-chat-widget textarea:focus {
	outline: 2px solid var(--voxfseli-primary-color);
	outline-offset: 2px;
}

/* Loading States */
.voxfseli-loading {
	opacity: 0.7;
	pointer-events: none;
}

.voxfseli-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #f3f3f3;
	border-radius: 50%;
	border-top-color: var(--voxfseli-primary-color);
	animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* File Upload */
.voxfseli-file-upload {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

.voxfseli-file-input {
	display: none;
}

.voxfseli-file-button {
	padding: 8px 12px;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	transition: var(--voxfseli-transition);
}

.voxfseli-file-button:hover {
	background: #e5e7eb;
}

.voxfseli-file-preview {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: #f0f9ff;
	border: 1px solid #bae6fd;
	border-radius: 6px;
	font-size: 12px;
	color: #0369a1;
}

.voxfseli-file-remove {
	background: none;
	border: none;
	color: #dc2626;
	cursor: pointer;
	padding: 2px;
	border-radius: 2px;
}

/* Widget Positioning */
.voxfseli-chat-widget.voxfseli-position-left {
	left: 20px;
	right: auto;
}

.voxfseli-chat-widget.voxfseli-position-left .voxfseli-chat-window {
	left: 20px;
	right: auto;
}

/* RTL Support */
.voxfseli-chat-widget.voxfseli-rtl {
	direction: rtl;
}

.voxfseli-chat-widget.voxfseli-rtl .voxfseli-chat-window {
	left: 20px;
	right: auto;
}

.voxfseli-chat-widget.voxfseli-rtl .voxfseli-message {
	direction: rtl;
}

.voxfseli-chat-widget.voxfseli-rtl .voxfseli-message.voxfseli-user {
	flex-direction: row;
}

.voxfseli-chat-widget.voxfseli-rtl .voxfseli-message.voxfseli-agent {
	flex-direction: row-reverse;
}
