/**
 * Advanced WordPress Chat - Frontend Styles
 */

/* CSS Variables */
:root {
	--voxfseli-primary-color: #007cba;
	--voxfseli-primary-hover: #005a87;
	--voxfseli-text-color: #333;
	--voxfseli-bg-color: #fff;
	--voxfseli-border-color: #ddd;
	--voxfseli-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	--voxfseli-border-radius: 12px;
	--voxfseli-transition: all 0.3s ease;
	--voxfseli-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	--voxfseli-z-index: 999999;
}

/* Reset and base styles */
#voxfseli-chat-widget * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

#voxfseli-chat-widget {
	position: fixed;
	z-index: var(--voxfseli-z-index);
	font-family: var(--voxfseli-font-family);
	font-size: 14px;
	line-height: 1.4;
	color: var(--voxfseli-text-color);
	direction: ltr;
}

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

#voxfseli-chat-widget.voxfseli-rtl .voxfseli-message-content {
	text-align: right;
}

#voxfseli-chat-widget.voxfseli-rtl .voxfseli-message-user .voxfseli-message-content {
	text-align: left;
}

/* Pre-Chat Form Styles */
.voxfseli-prechat-form {
	display: flex;
	background: #fff;
	border-radius: 0px;
	text-align: center;
	max-height: 450px;
	overflow-y: auto;
	height: 100vh;
	align-content: center;
	justify-content: center;
	align-items: center;
}

.voxfseli-prechat-content {
	max-width: 280px;
	margin: 0 auto;
}

.voxfseli-prechat-title {
	font-size: 25px;
	font-weight: 600;
	margin-bottom: 4px !important;
	color: var(--voxfseli-text-color);
}

.voxfseli-prechat-description {
	font-size: 14px;
	color: #666;
	margin-bottom: 20px !important;
	line-height: 1.5;
}

.voxfseli-prechat-form-fields {
	text-align: left;
}

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

.voxfseli-form-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 6px !important;
	margin-top: 6px !important;
	color: var(--voxfseli-text-color);
}

.voxfseli-required {
	color: #e74c3c;
	font-weight: 600;
}

.voxfseli-form-input {
	font-size: 14px;
	padding: 6px !important;
	margin: 0px 0 8px 0 !important;
	border-radius: 2px !important;
	box-shadow: 0px 1px 6px 0px #00000059;
	border: none !important;
	width: 100%;
	transition: var(--voxfseli-transition);
	font-family: var(--voxfseli-font-family);
}

.voxfseli-form-input:focus {
	outline: none;
	border-color: var(--voxfseli-primary-color);
	box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.voxfseli-form-input::placeholder {
	color: #999;
}


.voxfseli-form-actions {
	text-align: center;
	margin-top: 20px;
}

.voxfseli-start-chat-btn {
	background: var(--voxfseli-primary-color);
	color: white;
	border: none;
	margin: 12px 6px !important;
	padding: 8px !important;
	font-size: 14px;
	font-weight: 500;
	border-radius: 6px;
	cursor: pointer;
	transition: var(--voxfseli-transition);
	font-family: var(--voxfseli-font-family);
	min-width: 120px;
}

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

.voxfseli-start-chat-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.voxfseli-start-chat-btn:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.3);
}
.voxfseli-welcome-screen {
	display: flex;
	flex-wrap: nowrap;
	align-content: center;
	align-items: center;
	background: #fff;
	height: 100vh;
	text-align: center;
	justify-content: center;
}
.voxfseli-start-conversation-btn {
	visibility: hidden;
}
.voxfseli-welcome-description {
	margin-top: 8px !important;
}

/* Widget positioning */
.voxfseli-widget-bottom-right {
	bottom: 20px;
	right: 20px;
}

.voxfseli-widget-bottom-left {
	bottom: 20px;
	left: 20px;
}

.voxfseli-widget-top-right {
	top: 20px;
	right: 20px;
}

.voxfseli-widget-top-left {
	top: 20px;
	left: 20px;
}

/* Chat Button */
.voxfseli-chat-button {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: var(--voxfseli-primary-color);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--voxfseli-shadow);
	transition: var(--voxfseli-transition);
	border: none;
	outline: none;
}

.voxfseli-chat-button:hover {
	background-color: var(--voxfseli-primary-hover);
	transform: scale(1.05);
}

.voxfseli-chat-button:active {
	transform: scale(0.95);
}

.voxfseli-button-content {
	position: relative;
	width: 24px;
	height: 24px;
}

.voxfseli-chat-icon,
.voxfseli-close-icon {
	position: absolute;
	top: 0;
	left: 0;
	transition: var(--voxfseli-transition);
}

.voxfseli-close-icon {
	opacity: 0;
	transform: rotate(90deg);
}

.voxfseli-chat-button.voxfseli-open .voxfseli-chat-icon {
	opacity: 0;
	transform: rotate(-90deg);
}

.voxfseli-chat-button.voxfseli-open .voxfseli-close-icon {
	opacity: 1;
	transform: rotate(0deg);
}

/* Status indicator */
.voxfseli-status-indicator {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid white;
	transition: var(--voxfseli-transition);
}

.voxfseli-status-indicator.online {
	background-color: #4caf50;
}

.voxfseli-status-indicator.ai-mode {
	background: linear-gradient(45deg, #2196f3, #9c27b0);
	animation: aiPulse 2s ease-in-out infinite;
}

.voxfseli-status-indicator.offline {
	background-color: #5D3FD3;
}

.voxfseli-status-indicator.away {
	background-color: #ff9800;
}

/* AI mode pulse animation */
@keyframes aiPulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.7; transform: scale(1.1); }
}

/* Unread count */
.voxfseli-unread-count {
	position: absolute;
	top: -5px;
	right: -5px;
	background-color: #f44336;
	color: white;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: bold;
	animation: voxfseli-pulse 2s infinite;
}

@keyframes voxfseli-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.1); }
	100% { transform: scale(1); }
}

/* Chat Window */
.voxfseli-chat-window {
	position: absolute;
	bottom: 80px;
	right: 0;
	width: 350px;
	height: 500px;
	background-color: #fff;
	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);
}

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

.voxfseli-widget-bottom-left .voxfseli-chat-window,
.voxfseli-widget-top-left .voxfseli-chat-window {
	right: auto;
	left: 0;
}

.voxfseli-widget-top-right .voxfseli-chat-window,
.voxfseli-widget-top-left .voxfseli-chat-window {
	bottom: auto;
	top: 80px;
}

/* Chat Header */
.voxfseli-chat-header {
	background-color: var(--voxfseli-primary-color);
	color: white;
	padding: 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.voxfseli-header-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.voxfseli-header-info {
	flex: 1;
}

.voxfseli-chat-title {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 4px;
}

.voxfseli-status-text {
	display: flex;
	position: relative;
	width: 120px;
	left: -151px;
	top: 0px;
	align-items: center;
	font-size: 12px;
	opacity: 0.9;
	color: #000;
}

.voxfseli-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 6px;
}

.voxfseli-status-dot.online {
	background-color: #4caf50;
}

.voxfseli-status-dot.ai-mode {
	background: linear-gradient(45deg, #2196f3, #9c27b0);
	animation: aiPulse 2s ease-in-out infinite;
}

.voxfseli-status-dot.offline {
	background-color: #5D3FD3;
}

.voxfseli-status-dot.away {
	background-color: #ff9800;
}

.voxfseli-header-actions {
	display: flex;
	gap: 8px;
}

.voxfseli-minimize-btn,
.voxfseli-close-btn {
	background: none;
	border: none;
	color: white;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	transition: var(--voxfseli-transition);
	opacity: 0.8;
}

.voxfseli-minimize-btn:hover,
.voxfseli-close-btn:hover {
	background-color: rgba(255, 255, 255, 0.1);
	opacity: 1;
}

/* Messages Container */
.voxfseli-messages-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.voxfseli-messages {
	flex: 1;
	padding: 16px;
	overflow-y: auto;
	scroll-behavior: smooth;
}

.voxfseli-messages::-webkit-scrollbar {
	width: 6px;
}

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

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

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

/* Messages */
.voxfseli-message {
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
}

.voxfseli-message-user {
	align-items: flex-end;
}

.voxfseli-message-agent,
.voxfseli-message-system {
	align-items: flex-start;
}

.voxfseli-message-content {
	max-width: 80%;
	padding: 12px 16px;
	border-radius: 18px;
	word-wrap: break-word;
	position: relative;
}

.voxfseli-message-user .voxfseli-message-content {
	background-color: var(--voxfseli-primary-color);
	color: white;
	border-bottom-right-radius: 4px;
}

.voxfseli-message-agent .voxfseli-message-content {
	background-color: #f1f1f1;
	color: var(--voxfseli-text-color);
	border-bottom-left-radius: 4px;
}

.voxfseli-message-system .voxfseli-message-content {
	background-color: #e3f2fd;
	color: #1976d2;
	border-radius: 8px;
	font-size: 13px;
	text-align: center;
	max-width: 100%;
}

.voxfseli-message-time {
	font-size: 11px;
	color: #999;
	margin-top: 4px;
	padding: 0 4px;
}

.voxfseli-message-user .voxfseli-message-time {
	text-align: right;
}

.voxfseli-message-agent .voxfseli-message-time,
.voxfseli-message-system .voxfseli-message-time {
	text-align: left;
}

/* Agent name styling */
.voxfseli-agent-name {
	font-weight: 600;
	color: #fff;
}
.voxfseli-message-time .voxfseli-agent-name {
	color: #000;
}
/* File messages */
.voxfseli-message-file {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 8px;
	margin-top: 8px;
}

.voxfseli-file-icon {
	width: 32px;
	height: 32px;
	background-color: var(--voxfseli-primary-color);
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 12px;
	font-weight: bold;
}

.voxfseli-file-info {
	flex: 1;
}

.voxfseli-file-name {
	font-weight: 500;
	margin-bottom: 2px;
}

.voxfseli-file-size {
	font-size: 11px;
	color: #666;
}

.voxfseli-file-download {
	background: none;
	border: none;
	color: var(--voxfseli-primary-color);
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	transition: var(--voxfseli-transition);
}

.voxfseli-file-download:hover {
	background-color: rgba(0, 124, 186, 0.1);
}

/* AI Typing Message Bubble */
.voxfseli-typing-message {
	width: 115px;
}

.voxfseli-typing-message .voxfseli-message-bubble {
	min-width: 60px !important;
	max-width: 80px !important;
}

.voxfseli-typing-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 4px;
	gap: 4px;
}

.voxfseli-typing-dots .voxfseli-dot {
	width: 8px !important;
	height: 8px !important;
	border-radius: 50% !important;
	background-color: #20adf3 !important;
	opacity: 0.4 !important;
	animation: voxfseliTypingPulse 1.4s infinite ease-in-out !important;
	display: inline-block !important;
}

.voxfseli-typing-dots .voxfseli-dot:nth-child(1) {
	animation-delay: 0s !important;
}

.voxfseli-typing-dots .voxfseli-dot:nth-child(2) {
	animation-delay: 0.2s !important;
}

.voxfseli-typing-dots .voxfseli-dot:nth-child(3) {
	animation-delay: 0.4s !important;
}

@keyframes voxfseliTypingPulse {
	0%, 80%, 100% {
		opacity: 0.4 !important;
		transform: scale(1) !important;
	}
	40% {
		opacity: 1 !important;
		transform: scale(1.2) !important;
	}
}

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



/* Input Container */
.voxfseli-input-container {
	border-top: 1px solid var(--voxfseli-border-color);
	background-color: var(--voxfseli-bg-color);
}

.voxfseli-input-wrapper {
	position: relative;
}

/* File upload area */
.voxfseli-file-upload-area {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.95);
	border: 2px dashed var(--voxfseli-primary-color);
	border-radius: 8px;
	margin: 8px;
	z-index: 10;
}

.voxfseli-file-upload-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	text-align: center;
	color: var(--voxfseli-primary-color);
	cursor: pointer;
}

.voxfseli-file-upload-content p {
	margin-top: 8px;
	font-size: 13px;
}

.voxfseli-file-upload-area.voxfseli-dragover {
	background-color: rgba(0, 124, 186, 0.1);
	border-color: var(--voxfseli-primary-hover);
}

/* Message input */
.voxfseli-message-input-wrapper {
	display: flex;
	align-items: flex-end;
	padding: 12px;
	gap: 8px;
}

.voxfseli-attach-btn {
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	transition: var(--voxfseli-transition);
	flex-shrink: 0;
}
button#voxfseli-attach-btn {
	position: absolute;
	bottom: 12px;
	z-index: 999;
	right: 42px;
}

.voxfseli-attach-btn:hover {
	background-color: rgba(0, 0, 0, 0.05);
	color: var(--voxfseli-primary-color);
}

/* Updated input field structure */
.voxfseli-input-row {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
}

.voxfseli-input-field-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	border: none !important;
	background: white;
	padding: 0;
}

/* Send button styles removed - no longer used
.voxfseli-send-btn {
	background: var(--voxfseli-primary-color) !important;
	border: none;
	cursor: pointer;
	padding: 8px 10px !important;
	border-radius: 50%;
	transition: var(--voxfseli-transition);
	flex-shrink: 0;
	color: white !important;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 4px;
	order: 1;
}

.voxfseli-send-btn:hover {
	background-color: var(--voxfseli-primary-hover) !important;
}

.voxfseli-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
*/
.voxfseli-message.voxfseli-system {
	margin: 2px 12px !important;
}

.voxfseli-message-input {
	flex: 1;
	border-top: 2px solid #3bb6ff2e !important;
	border-radius: 0;
	padding: 18px 80px 16px 16px !important;
	font-family: inherit;
	font-size: 13px;
	resize: none;
	outline: none;
	transition: var(--voxfseli-transition);
	max-height: 100px;
	min-height: 36px;
	background: transparent;
	order: 2; /* Place input field after send button */
}

.voxfseli-message-input:focus {
	outline: none;
	box-shadow: none;
}


.voxfseli-file-btn {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	transition: var(--voxfseli-transition);
	flex-shrink: 0;
	align-self: flex-start;
	position: absolute;
	top: 12px;
	left: 0px;
	z-index: 99;
}

.voxfseli-file-btn:hover {
	background-color: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.voxfseli-file-btn svg {
	fill: #fff;
}

/* Send button styles removed - no longer used
.voxfseli-send-btn:not(:disabled),
.voxfseli-send-btn.enabled,
.voxfseli-send-btn {
	opacity: 1 !important;
	cursor: pointer !important;
	background-color: var(--voxfseli-primary-color) !important;
	color: white !important;
	pointer-events: auto !important;
}

.voxfseli-message-input:not(:placeholder-shown) + .voxfseli-send-btn,
.voxfseli-input-container:has(.voxfseli-message-input:not(:placeholder-shown)) .voxfseli-send-btn {
	opacity: 1 !important;
	cursor: pointer !important;
	background-color: var(--voxfseli-primary-color) !important;
	color: white !important;
	pointer-events: auto !important;
}
*/

/* Character counter */
.voxfseli-char-counter {
	position: absolute;
	right: 16px;
	bottom: -20px;
	font-size: 11px;
	color: #666;
	text-align: right;
}

.voxfseli-char-counter.voxfseli-warning {
	color: #ff9800;
}

.voxfseli-char-counter.voxfseli-error {
	color: #f44336;
}

/* User provided styles */
.voxfseli-agent-info {
	display: flex;
	align-items: center;
	gap: 6px;
}

.voxfseli-chat-header {
	background-color: var(--voxfseli-primary-color);
	color: white;
	padding: 5px !important;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.voxfseli-chat-messages {
	margin: 10px !important;
}

.voxfseli-message-agent .voxfseli-message-content {
	padding: 10px !important;
}

.voxfseli-chat-input-container {
	position: absolute;
	bottom: 0px;
	left: 0px;
	width: 100%;
}

/* Offline notice */
.voxfseli-offline-notice {
	padding: 16px;
	text-align: center;
	color: #666;
	font-style: italic;
}

/* Powered by */
.voxfseli-powered-by {
	padding: 8px 16px;
	text-align: center;
	border-top: 1px solid var(--voxfseli-border-color);
	background-color: #f9f9f9;
}

.voxfseli-powered-by small {
	color: #999;
	font-size: 11px;
}

/* Loading overlay */
.voxfseli-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 20;
}

.voxfseli-loading-spinner {
	text-align: center;
}

.voxfseli-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid var(--voxfseli-primary-color);
	border-radius: 50%;
	animation: voxfseli-spin 1s linear infinite;
	margin: 0 auto 12px;
}

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

.voxfseli-loading-spinner p {
	color: #666;
	font-size: 13px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
	#voxfseli-chat-widget #voxfseli-chat-launcher {
		z-index: 99999 !important;
	}
	.voxfseli-status-text{
		display: none !important;
	}
	.voxfseli-chat-window {
		width: 100vw;
		height: 90vh;
		bottom: 0;
		right: 0;
		left: 0;
		top: 0;
		border-radius: 0;
		position: fixed;
	}

	.voxfseli-widget-bottom-left .voxfseli-chat-window,
	.voxfseli-widget-top-left .voxfseli-chat-window,
	.voxfseli-widget-top-right .voxfseli-chat-window {
		right: 0;
		left: 0;
		top: 0;
		bottom: 0;
	}

	.voxfseli-chat-button {
		width: 56px;
		height: 56px;
	}

	.voxfseli-message-content {
		max-width: 85%;
	}
	.voxfseli-chat-launcher {
	z-index: 0 !important;
}
.voxfseli-prechat-form{
	max-height: 80vh !important;
}
}

@media (max-width: 480px) {
	.voxfseli-widget-bottom-right,
	.voxfseli-widget-bottom-left {
		bottom: 10px;
		right: 10px;
		left: auto;
	}

	.voxfseli-widget-top-right,
	.voxfseli-widget-top-left {
		top: 10px;
		right: 10px;
		left: auto;
	}

	.voxfseli-chat-messages, .voxfseli-messages-container {
		height: 100% !important;
		max-height: calc(68vh - 20px) !important;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	:root {
		--voxfseli-text-color: #e0e0e0;
		--voxfseli-bg-color: #2d2d2d;
		--voxfseli-border-color: #404040;
	}

	.voxfseli-message-agent .voxfseli-message-content {
		background-color: #404040;
		color: #e0e0e0;
	}

	.voxfseli-message-system .voxfseli-message-content {
		background-color: #1a237e;
		color: #bbdefb;
	}

	.voxfseli-message-input {
		background-color: #fbfbfb;
		box-shadow: 4px 5px 6px 4px #00000052;
		color: #2c2c2c;
		border-color: #555;
	}

	.voxfseli-powered-by {
		background-color: #404040;
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.voxfseli-chat-button {
		border: 2px solid #000;
	}

	.voxfseli-message-content {
		border: 1px solid #000;
	}

	.voxfseli-message-input {
		border: 2px solid #000;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Print styles */
@media print {
	#voxfseli-chat-widget {
		display: none !important;
	}
}

/* Add new CSS for button text */
span.voxfseli-button-text {
	display: block;
	position: fixed;
	font-size: 16px;
	width: 200px;
	left: -177px;
	color: #000;
}
button:hover {
	color: unset;
}
div#voxfseli-notification-badge {
	position: absolute;
	font-size: 12px;
	padding: 2px 7px;
	background: red;
	color: #fff;
	border-radius: 50%;
	z-index: 9999;
	top: -8px;
	right: -8px;
	min-width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ================================================
   🎨 MODERN CHAT WIDGET ANIMATIONS & STYLING
   Tidio/Tawk.to-inspired premium experience - FIXED VERSION
   ================================================ */

/* Enhanced CSS Variables for animations */
:root {
	--voxfseli-animation-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
	--voxfseli-animation-smooth: cubic-bezier(0.4, 0, 0.2, 1);
	--voxfseli-animation-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--voxfseli-gradient-primary: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
	--voxfseli-gradient-hover: linear-gradient(135deg, #1976D2 0%, #0288D1 100%);
	--voxfseli-shadow-soft: 0 4px 20px rgba(33, 150, 243, 0.3);
	--voxfseli-shadow-lifted: 0 8px 30px rgba(33, 150, 243, 0.4);
}

/* ================================================
   PHASE 1: 🚀 RESPONSIVE LAUNCHER WITH TEXT & ICON
   ================================================ */

/* Launcher Container - Initial Hidden State */
#voxfseli-chat-widget #voxfseli-chat-launcher {
	opacity: 0 !important;
	transform: translateY(20px) scale(0.8) !important;
	transition: all 0.6s var(--voxfseli-animation-spring) !important;
	pointer-events: none !important;
}

/* Launcher Container - Visible State */
#voxfseli-chat-widget #voxfseli-chat-launcher.voxfseli-loaded {
	opacity: 1 !important;
	transform: translateY(0) scale(1) !important;
	pointer-events: auto !important;
	animation: voxfseli-launcher-entrance 0.8s var(--voxfseli-animation-bounce) 1s forwards !important;
}

/* Enhanced Launcher Button - Responsive Design */
#voxfseli-chat-widget .voxfseli-launcher-button {
	position: relative !important;
	min-width: 64px !important;
	height: 64px !important;
	border-radius: 32px !important;
	background: var(--voxfseli-gradient-primary) !important;
	border: none !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: var(--voxfseli-shadow-soft) !important;
	transition: all 0.3s var(--voxfseli-animation-smooth) !important;
	z-index: 999999 !important;
	padding: 0 20px !important;
	color: white !important;
	font-family: var(--voxfseli-font-family) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
}

/* Chat Icon and Text Layout */
#voxfseli-chat-widget .voxfseli-launcher-icon {
	margin-right: 8px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0 !important;
}

#voxfseli-chat-widget .voxfseli-button-text {
	white-space: nowrap !important;
	opacity: 1 !important;
	transition: all 0.3s ease !important;
}

/* Hide text on smaller launcher (circular mode) */
#voxfseli-chat-widget .voxfseli-launcher-button.voxfseli-compact .voxfseli-button-text {
	display: none !important;
}

#voxfseli-chat-widget .voxfseli-launcher-button.voxfseli-compact {
	width: 64px !important;
	border-radius: 50% !important;
	padding: 0 !important;
}

#voxfseli-chat-widget .voxfseli-launcher-button.voxfseli-compact .voxfseli-launcher-icon {
	margin-right: 0 !important;
}

/* Close Icon Visibility */
#voxfseli-chat-widget .voxfseli-close-icon {
	display: none !important;
}

#voxfseli-chat-widget .voxfseli-launcher-button.voxfseli-open .voxfseli-chat-icon {
	display: none !important;
}

#voxfseli-chat-widget .voxfseli-launcher-button.voxfseli-open .voxfseli-close-icon {
	display: flex !important;
}

/* Launcher Button Hover Effect */
#voxfseli-chat-widget .voxfseli-launcher-button:hover {
	transform: scale(1.05) !important;
	background: var(--voxfseli-gradient-hover) !important;
	box-shadow: var(--voxfseli-shadow-lifted) !important;
}

/* Launcher Button Active Effect */
#voxfseli-chat-widget .voxfseli-launcher-button:active {
	transform: scale(0.98) !important;
}

/* Breathing Pulse Animation - Reduced for performance */
#voxfseli-chat-widget .voxfseli-launcher-button::before {
	content: '' !important;
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	width: 100% !important;
	height: 100% !important;
	border-radius: inherit !important;
	background: rgba(33, 150, 243, 0.2) !important;
	transform: translate(-50%, -50%) scale(1) !important;
	animation: voxfseli-pulse-ring 4s infinite !important;
	z-index: -1 !important;
}

/* ================================================
   PHASE 2: 💫 NOTIFICATION BADGE - FIXED POSITIONING
   ================================================ */

/* Notification Badge - Fixed positioning */
#voxfseli-chat-widget .voxfseli-notification-badge {
	position: absolute !important;
	top: -8px !important;
	right: -8px !important;
	background: #ff4444 !important;
	color: white !important;
	border-radius: 50% !important;
	min-width: 24px !important;
	height: 24px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 12px !important;
	font-weight: bold !important;
	border: 2px solid white !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
	z-index: 999999 !important;
}

/* Status Indicator - Fixed positioning */
#voxfseli-chat-widget .voxfseli-status-indicator {
	position: absolute !important;
	bottom: 2px !important;
	right: 2px !important;
	width: 18px !important;
	height: 18px !important;
	border-radius: 50% !important;
	border: 3px solid white !important;
	transition: all 0.3s ease !important;
	z-index: 10 !important;
}

#voxfseli-chat-widget .voxfseli-status-indicator.voxfseli-online {
	background: #4CAF50 !important;
}

#voxfseli-chat-widget .voxfseli-status-indicator.voxfseli-offline {
	background: #999 !important;
}

/* ================================================
   PHASE 3: 🎬 SMOOTH WINDOW ANIMATIONS - RESPONSIVE
   ================================================ */

/* Chat Window - Responsive sizing */
#voxfseli-chat-widget #voxfseli-chat-window {
	width: 380px !important;
	max-width: calc(100vw - 20px) !important;
	height: 532px !important;
	max-height: calc(100vh - 20px) !important;
	border-radius: 12px !important;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
	background: white !important;
	overflow: hidden !important;
	opacity: 0 !important;
	transform: scale(0.9) translateY(20px) !important;
	transform-origin: bottom right !important;
	transition: all 0.4s var(--voxfseli-animation-spring) !important;
	visibility: hidden !important;
}

/* Chat Window - Visible State */
#voxfseli-chat-widget #voxfseli-chat-window.voxfseli-visible {
	opacity: 1 !important;
	transform: scale(1) translateY(0) !important;
	visibility: visible !important;
}

/* Enhanced Chat Header */
#voxfseli-chat-widget .voxfseli-chat-header {
	background: var(--voxfseli-gradient-primary) !important;
	padding: 20px !important;
	border-radius: 12px 12px 0 0 !important;
	color: white !important;
	position: relative !important;
}

/* ================================================
   PHASE 4: 📝 FORM STYLING - NO FLOATING LABELS CONFLICT
   ================================================ */

/* Pre-chat Form Container */
#voxfseli-chat-widget .voxfseli-prechat-form {
	padding: 24px !important;
	background: white !important;
	height: 100% !important;
	display: flex;
	flex-direction: column !important;
	justify-content: center !important;
}

/* Form Groups - Clean spacing */
#voxfseli-chat-widget .voxfseli-form-group {
	margin-bottom: 0px !important;
	position: relative !important;
}

/* Form Labels - Normal positioning, no conflict */
#voxfseli-chat-widget .voxfseli-form-label {
	display: block !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #333 !important;
	margin-bottom: 8px !important;
	position: static !important;
}

/* Form Inputs - Enhanced design */
#voxfseli-chat-widget .voxfseli-form-input {
	width: 100% !important;
	padding: 14px 16px !important;
	border: 2px solid #e1e5e9 !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	transition: all 0.3s ease !important;
	background: #fff !important;
	color: #333 !important;
	box-sizing: border-box !important;
}

#voxfseli-chat-widget .voxfseli-form-input:focus {
	border-color: #2196F3 !important;
	box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1) !important;
	outline: none !important;
}

#voxfseli-chat-widget .voxfseli-form-input::placeholder {
	color: #999 !important;
	opacity: 1 !important;
}

/* Start Chat Button */
#voxfseli-chat-widget .voxfseli-start-chat-btn {
	width: 100% !important;
	padding: 16px !important;
	background: var(--voxfseli-gradient-primary) !important;
	color: white !important;
	border: none !important;
	border-radius: 8px !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
}

#voxfseli-chat-widget .voxfseli-start-chat-btn:hover {
	background: var(--voxfseli-gradient-hover) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3) !important;
}

/* ================================================
   PHASE 5: 💬 MESSAGE INPUT AREA - FIXED WIDTH/PADDING
   ================================================ */

/* Chat Input Area - Fixed responsive design */
#voxfseli-chat-widget .voxfseli-chat-input-area {
	padding: 16px !important;
	background: white !important;
	border-top: 1px solid #e1e5e9 !important;
	border-radius: 0 0 12px 12px !important;
}

/* Input Container */
#voxfseli-chat-widget .voxfseli-input-container {
	display: flex !important;
	align-items: flex-end !important;
	gap: 12px !important;
	width: 100% !important;
}

/* Input Wrapper */
#voxfseli-chat-widget .voxfseli-input-wrapper {
	flex: 1 !important;
	position: relative !important;
	background: #f8f9fa !important;
	border-radius: 20px !important;
	border: 1px solid #e1e5e9 !important;
	display: flex !important;
	align-items: flex-end !important;
}

/* Message Input */
#voxfseli-chat-widget .voxfseli-message-input {
	flex: 1 !important;
	background: transparent !important;
	padding: 14px 70px 14px 14px !important;
	border-radius: 0px !important;
	resize: none !important;
	font-family: var(--voxfseli-font-family) !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #333 !important;
	outline: none !important;
	max-height: 100px !important;
	min-height: 20px !important;
	width: 100%;
}

#voxfseli-chat-widget .voxfseli-message-input::placeholder {
	color: #999 !important;
}

/* Input Actions */
#voxfseli-chat-widget .voxfseli-input-actions {
	display: flex !important;
	align-items: center !important;
	padding: 8px !important;
	gap: 4px !important;
}

#voxfseli-chat-widget .voxfseli-action-btn {
	width: 32px !important;
	height: 32px !important;
	border: none !important;
	background: transparent !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	color: #666 !important;
	transition: all 0.2s ease !important;
}

#voxfseli-chat-widget .voxfseli-action-btn:hover {
	background: rgba(33, 150, 243, 0.1) !important;
	color: #2196F3 !important;
}

/* Send Button */
#voxfseli-chat-widget .voxfseli-send-btn {
	width: 40px !important;
	height: 40px !important;
	border-radius: 50% !important;
	background: #2196F3 !important;
	color: white !important;
	border: none !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.3s ease !important;
	flex-shrink: 0 !important;
}

#voxfseli-chat-widget .voxfseli-send-btn:hover {
	background: #1976D2 !important;
	transform: scale(1.05) !important;
}

#voxfseli-chat-widget .voxfseli-send-btn:disabled {
	background: #ccc !important;
	cursor: not-allowed !important;
	transform: none !important;
}

/* ================================================
   PHASE 6: 💬 MESSAGE BUBBLES - RESPONSIVE
   ================================================ */

/* Messages Container */
#voxfseli-chat-widget .voxfseli-messages-container {
	flex: 1 !important;
	overflow-y: auto !important;
	padding: 0px 0px !important;
	background: #f8f9fa !important;
}

/* Message Base */
#voxfseli-chat-widget .voxfseli-message {
	margin-bottom: 0px !important;
	display: flex !important;
	opacity: 0;
	transform: translateY(20px) !important;
	animation: voxfseli-message-slide-in 0.4s ease forwards !important;
}

/* User Messages */
#voxfseli-chat-widget .voxfseli-message.voxfseli-user {
	justify-content: flex-end !important;
}

/* AI/Agent Messages */
#voxfseli-chat-widget .voxfseli-message.voxfseli-ai,
#voxfseli-chat-widget .voxfseli-message.voxfseli-agent {
	justify-content: flex-start !important;
	align-items: flex-start;
}

/* Message Bubbles */
#voxfseli-chat-widget .voxfseli-message-bubble {
	max-width: 280px !important;
	padding: 12px 16px !important;
	border-radius: 18px !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
	word-wrap: break-word !important;
	position: relative !important;
}

/* User Message Bubbles */
#voxfseli-chat-widget .voxfseli-message.voxfseli-user .voxfseli-message-bubble {
	background: var(--voxfseli-gradient-primary) !important;
	color: white !important;
	border-bottom-right-radius: 4px !important;
}

/* AI/Agent Message Bubbles */
#voxfseli-chat-widget .voxfseli-message.voxfseli-ai .voxfseli-message-bubble,
#voxfseli-chat-widget .voxfseli-message.voxfseli-agent .voxfseli-message-bubble {
	background: white !important;
	color: #333 !important;
	border-bottom-left-radius: 4px !important;
}

/* ================================================
   🎭 KEYFRAME ANIMATIONS
   ================================================ */

@keyframes voxfseli-launcher-entrance {
	0% {
		opacity: 0;
		transform: translateY(20px) scale(0.8);
	}
	60% {
		opacity: 1;
		transform: translateY(-3px) scale(1.02);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes voxfseli-pulse-ring {
	0% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 0.5;
	}
	100% {
		transform: translate(-50%, -50%) scale(1.2);
		opacity: 0;
	}
}

@keyframes voxfseli-message-slide-in {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* ================================================
   📱 MOBILE RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 768px) {
	/* Launcher adjustments */
	#voxfseli-chat-widget .voxfseli-launcher-button {
		width: 60px !important;
		height: 60px !important;
		border-radius: 50% !important;
		padding: 0 !important;
	}

	#voxfseli-chat-widget .voxfseli-button-text {
		display: none !important;
	}
	span.voxfseli-status-text.offline{
		display: none !important;
	}

	#voxfseli-chat-widget .voxfseli-launcher-icon {
		margin-right: 0 !important;
	}

	/* Chat window mobile adjustments */
	#voxfseli-chat-widget #voxfseli-chat-window {
		width: calc(100vw - 16px) !important;
		height: calc(90vh - 16px) !important;
		border-radius: 12px !important;
		position: fixed !important;
		top: 8px !important;
		left: 8px !important;
		right: 8px !important;
		bottom: 8px !important;
		transform-origin: center !important;
	}

	/* Form adjustments */
	#voxfseli-chat-widget .voxfseli-form-input {
		font-size: 16px !important; /* Prevent zoom on iOS */
	}

	/* Message bubbles mobile */
	#voxfseli-chat-widget .voxfseli-message-bubble {
		max-width: calc(100vw - 80px) !important;
	}
}

@media (max-width: 480px) {
	#voxfseli-chat-widget .voxfseli-launcher-button {
		width: 56px !important;
		height: 56px !important;
	}

	#voxfseli-chat-widget .voxfseli-messages-container {
		padding: 16px !important;
	}

	#voxfseli-chat-widget .voxfseli-chat-input-area {
		padding: 12px !important;
	}
}

/* ================================================
   🎨 ACCESSIBILITY & REDUCED MOTION
   ================================================ */

@media (prefers-reduced-motion: reduce) {
	#voxfseli-chat-widget * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	#voxfseli-chat-widget .voxfseli-launcher-button {
		border: 2px solid !important;
	}

	#voxfseli-chat-widget .voxfseli-form-input {
		border-width: 3px !important;
	}
}

/* ================================================
   🔧 CSS RESET & CONFLICT RESOLUTION
   ================================================ */

/* Reset any conflicting styles from existing CSS */
#voxfseli-chat-widget .voxfseli-launcher-button,
#voxfseli-chat-widget .voxfseli-launcher-button * {
	box-sizing: border-box !important;
}

/* Ensure proper visibility states */
#voxfseli-chat-widget #voxfseli-chat-launcher {
	position: fixed !important;
	bottom: 20px !important;
	right: 20px !important;
	z-index: 999999;
}

/* Override any existing chat window positioning */
#voxfseli-chat-widget #voxfseli-chat-window {
	position: fixed !important;
	bottom: 100px !important;
	right: 20px !important;
	z-index: 999998 !important;
	display: none !important;
}

#voxfseli-chat-widget #voxfseli-chat-window.voxfseli-visible {
	display: flex !important;
	flex-direction: column !important;
}

/* Ensure proper flex layout for window content */
#voxfseli-chat-widget .voxfseli-prechat-form,
#voxfseli-chat-widget .voxfseli-messages-container,
#voxfseli-chat-widget .voxfseli-welcome-screen {
	flex: 1 !important;
	display: flex;
	flex-direction: column !important;
}

/* Fix any text selection issues */
#voxfseli-chat-widget .voxfseli-launcher-button {
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
}

/* Ensure proper form element styling */
#voxfseli-chat-widget input,
#voxfseli-chat-widget textarea,
#voxfseli-chat-widget button {
	font-family: inherit !important;
}

/* Fix any inheritance issues */
#voxfseli-chat-widget * {
	font-family: var(--voxfseli-font-family) !important;
}

/* Position overrides for different widget positions */
#voxfseli-chat-widget.voxfseli-widget-bottom-left #voxfseli-chat-launcher {
	left: 20px !important;
	right: auto !important;
}

#voxfseli-chat-widget.voxfseli-widget-bottom-left #voxfseli-chat-window {
	left: 20px !important;
	right: auto !important;
	transform-origin: bottom left !important;
}

#voxfseli-chat-widget.voxfseli-widget-top-right #voxfseli-chat-launcher {
	top: 20px !important;
	bottom: auto !important;
}

#voxfseli-chat-widget.voxfseli-widget-top-right #voxfseli-chat-window {
	top: 100px !important;
	bottom: auto !important;
	transform-origin: top right !important;
}

#voxfseli-chat-widget.voxfseli-widget-top-left #voxfseli-chat-launcher {
	top: 20px !important;
	bottom: auto !important;
	left: 20px !important;
	right: auto !important;
}

#voxfseli-chat-widget.voxfseli-widget-top-left #voxfseli-chat-window {
	top: 100px !important;
	bottom: auto !important;
	left: 20px !important;
	right: auto !important;
	transform-origin: top left !important;
}
