/* Footer Chat Widget Styles */

.footer-chat-toggle-wrapper {
	position: relative;
}

.footer-chat-toggle-btn {
	width: 50px;
	height: 50px;
	min-width: 50px;
	min-height: 50px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
	border: none;
	color: white;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
	z-index: 1000;
}

.footer-chat-toggle-btn:hover {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
	transform: scale(1.05);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.footer-chat-toggle-btn:active {
	transform: scale(0.95);
}

.footer-chat-toggle-btn:focus {
	outline: 3px solid rgba(37, 99, 235, 0.3);
	outline-offset: 2px;
}

.footer-chat-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	background: #ef4444;
	color: white;
	border-radius: 50%;
	min-width: 22px;
	height: 22px;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid white;
	box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
	padding: 0 6px;
	box-sizing: border-box;
	transition: all 0.3s ease;
}

.footer-chat-badge.has-unread {
	animation: pulse 2s infinite, bounce 0.5s ease;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
	}
	50% {
		transform: scale(1.15);
		box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
	}
}

@keyframes bounce {
	0%, 100% {
		transform: scale(1);
	}
	25% {
		transform: scale(1.3);
	}
	50% {
		transform: scale(0.9);
	}
	75% {
		transform: scale(1.1);
	}
}

/* Chat Panel */
.footer-chat-panel {
	position: fixed;
	bottom: 80px;
	right: 20px;
	width: 380px;
	max-width: calc(100vw - 40px);
	height: 500px;
	max-height: calc(100vh - 100px);
	background: white;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	z-index: 999;
	transform: translateY(20px) scale(0.95);
	opacity: 0;
	pointer-events: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: 1px solid #e5e7eb;
	overflow: hidden;
}

.footer-chat-panel.active {
	transform: translateY(0) scale(1);
	opacity: 1;
	pointer-events: all;
}

.footer-chat-panel[aria-hidden="false"] {
	transform: translateY(0) scale(1);
	opacity: 1;
	pointer-events: all;
}

/* Chat Header */
.footer-chat-header {
	background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
	color: white;
	padding: 16px 20px;
	border-radius: 16px 16px 0 0;
	flex-shrink: 0;
}

.footer-chat-header-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.footer-chat-header-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.footer-chat-ip-display {
	display: flex;
	align-items: center;
	font-size: 12px;
	font-weight: 500;
	opacity: 0.9;
	background: rgba(255, 255, 255, 0.15);
	padding: 4px 10px;
	border-radius: 12px;
	backdrop-filter: blur(10px);
}

.footer-chat-ip-display i {
	font-size: 11px;
}

.footer-chat-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	display: flex;
	align-items: center;
}

.footer-chat-close-btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 16px;
}

.footer-chat-close-btn:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg);
}

.footer-chat-close-btn:focus {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

.footer-chat-settings-btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 16px;
	flex-shrink: 0;
}

.footer-chat-settings-btn:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg);
}

.footer-chat-settings-btn:focus {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

.footer-chat-header-content {
	width: 100%;
}

/* Modal z-index fix for footer chat - no backdrop blocking page */
#footer-chat-settings-modal {
	z-index: 9999 !important;
	position: fixed !important;
}

/* Completely remove Bootstrap's default backdrop */
.modal-backdrop {
	display: none !important;
}

body.modal-open .modal-backdrop {
	display: none !important;
}

/* Remove backdrop that Bootstrap might add */
#footer-chat-settings-modal + .modal-backdrop,
body > .modal-backdrop {
	display: none !important;
	visibility: hidden !important;
}

/* Ensure modal dialog is properly positioned */
.footer-chat-settings-modal-dialog {
	margin: auto;
	position: relative;
	z-index: 9999;
}

/* Ensure modal is above footer chat panel */
body.modal-open #footer-chat-panel {
	z-index: 1;
}

/* Prevent body scroll lock and overlay blocking when modal is open */
body.modal-open {
	overflow: auto !important;
	padding-right: 0 !important;
	pointer-events: auto !important;
}

/* Ensure page content is still clickable */
body.modal-open * {
	pointer-events: auto !important;
}

/* Only the modal itself should capture pointer events */
#footer-chat-settings-modal.show {
	pointer-events: auto;
}

#footer-chat-settings-modal.show .modal-content {
	pointer-events: auto;
}

/* Messages Container */
.footer-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 20px 16px;
	background: #f8fafc;
	display: flex;
	flex-direction: column;
	gap: 16px;
	scroll-behavior: smooth;
	min-height: 0; /* Important for flex children */
}

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

.footer-chat-messages::-webkit-scrollbar-track {
	background: #f1f5f9;
}

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

.footer-chat-messages::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

.footer-chat-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #94a3b8;
	text-align: center;
	padding: 40px 20px;
}

.footer-chat-empty i {
	font-size: 48px;
	margin-bottom: 12px;
	opacity: 0.5;
}

.footer-chat-empty p {
	margin: 0;
	font-size: 14px;
}

/* Message Styles */
.footer-chat-message {
	display: flex;
	flex-direction: row;
	gap: 14px;
	animation: messageSlideIn 0.3s ease-out;
	margin-bottom: 8px;
	width: 100%;
	align-items: flex-start;
}

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

/* Current user messages on LEFT */
.footer-chat-message.sent {
	justify-content: flex-start;
	flex-direction: row;
}

/* Other users' messages on RIGHT */
.footer-chat-message.received {
	justify-content: flex-end;
	flex-direction: row-reverse;
}

/* Message Info (Left side - IP, ID, Timestamp) */
.footer-chat-message-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 130px;
	max-width: 150px;
	flex-shrink: 0;
	padding-top: 6px;
}

.footer-chat-message.received .footer-chat-message-info {
	align-items: flex-end;
	text-align: right;
}

.footer-chat-message-sender-id {
	font-size: 11px;
	font-weight: 600;
	color: #475569;
	line-height: 1.4;
	word-break: break-all;
	display: flex;
	align-items: center;
	gap: 4px;
}

.footer-chat-message-sender-id i {
	font-size: 10px;
	opacity: 0.8;
}

.footer-chat-message.sent .footer-chat-message-sender-id {
	color: #2563eb;
}

.footer-chat-message.received .footer-chat-message-sender-id {
	color: #64748b;
}

.footer-chat-message-time {
	font-size: 10px;
	color: #94a3b8;
	font-weight: 500;
	margin-top: 4px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.footer-chat-message-time i {
	font-size: 9px;
	opacity: 0.7;
}

/* Message Bubble - Balloon Style */
.footer-chat-message-bubble {
	max-width: calc(100% - 180px);
	min-width: 120px;
	padding: 14px 18px;
	border-radius: 20px;
	word-wrap: break-word;
	position: relative;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
	transition: all 0.2s ease;
	/* Balloon tail effect using pseudo-element */
}

.footer-chat-message-bubble::before {
	content: '';
	position: absolute;
	width: 0;
	height: 0;
	border-style: solid;
}

.footer-chat-message-bubble:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Current user message bubble (LEFT side) - White Balloon with Blue Text */
.footer-chat-message.sent .footer-chat-message-bubble {
	background: #ffffff;
	color: #2563eb;
	border: 2px solid #e0e7ff;
	border-radius: 20px 20px 20px 6px;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
	margin-right: auto;
	/* Balloon tail pointing left */
}

.footer-chat-message.sent .footer-chat-message-bubble::before {
	left: -8px;
	bottom: 12px;
	border-width: 8px 8px 8px 0;
	border-color: transparent #ffffff transparent transparent;
	filter: drop-shadow(-2px 2px 2px rgba(37, 99, 235, 0.15));
}

.footer-chat-message.sent .footer-chat-message-bubble:hover {
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
	background: #f8fafc;
	border-color: #c7d2fe;
}

.footer-chat-message.sent .footer-chat-message-bubble:hover::before {
	border-color: transparent #f8fafc transparent transparent;
}

/* Other users' message bubble (RIGHT side) - White Balloon with Blue Text */
.footer-chat-message.received .footer-chat-message-bubble {
	background: #ffffff;
	color: #2563eb;
	border: 2px solid #e0e7ff;
	border-radius: 20px 20px 6px 20px;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
	margin-left: auto;
	/* Balloon tail pointing right */
}

.footer-chat-message.received .footer-chat-message-bubble::before {
	right: -8px;
	bottom: 12px;
	border-width: 8px 0 8px 8px;
	border-color: transparent transparent transparent #ffffff;
	filter: drop-shadow(2px 2px 2px rgba(37, 99, 235, 0.15));
}

.footer-chat-message.received .footer-chat-message-bubble:hover {
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
	background: #f8fafc;
	border-color: #c7d2fe;
}

.footer-chat-message.received .footer-chat-message-bubble:hover::before {
	border-color: transparent transparent transparent #f8fafc;
}

/* Message Text - Enhanced Readability */
.footer-chat-message-text {
	font-size: 16px;
	line-height: 1.7;
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #2563eb;
	/* Better text rendering */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.footer-chat-message.sent .footer-chat-message-text {
	color: #2563eb;
}

.footer-chat-message.received .footer-chat-message-text {
	color: #2563eb;
}

/* Remove old meta styles - no longer needed */
.footer-chat-message-meta {
	display: none;
}

/* Input Container */
.footer-chat-input-container {
	padding: 16px;
	background: white;
	border-top: 1px solid #e5e7eb;
	display: flex;
	gap: 12px;
	align-items: flex-end;
	flex-shrink: 0;
}

.footer-chat-input-wrapper {
	flex: 1;
	position: relative;
}

.footer-chat-input {
	width: 100%;
	padding: 12px 60px 12px 14px;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	font-size: 14px;
	font-family: inherit;
	transition: all 0.2s;
	background: #f9fafb;
	resize: none;
}

.footer-chat-input:focus {
	outline: none;
	border-color: #2563eb;
	background: white;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.footer-chat-input:disabled {
	background: #f1f5f9;
	cursor: not-allowed;
	opacity: 0.6;
}

.footer-chat-char-count {
	position: absolute;
	bottom: 8px;
	right: 12px;
	font-size: 11px;
	color: #94a3b8;
	pointer-events: none;
}

.footer-chat-char-count.warning {
	color: #f59e0b;
}

.footer-chat-char-count.error {
	color: #ef4444;
	font-weight: 600;
}

.footer-chat-send-btn {
	background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
	border: none;
	color: white;
	padding: 12px 20px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.footer-chat-send-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.footer-chat-send-btn:active:not(:disabled) {
	transform: translateY(0);
}

.footer-chat-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.footer-chat-send-btn:focus {
	outline: 3px solid rgba(37, 99, 235, 0.3);
	outline-offset: 2px;
}

.footer-chat-send-text {
	display: inline;
}

/* Responsive Design */
@media (max-width: 768px) {
	.footer-chat-panel {
		width: calc(100vw - 20px);
		right: 10px;
		left: 10px;
		height: calc(100vh - 100px);
		max-height: calc(100vh - 100px);
	}
	
	.footer-chat-toggle-btn {
		width: 44px;
		height: 44px;
		min-width: 44px;
		min-height: 44px;
		font-size: 18px;
	}
	
	.footer-chat-send-text {
		display: none;
	}
	
	.footer-chat-send-btn {
		padding: 12px;
		min-width: 48px;
	}
	
	.footer-chat-message-bubble {
		max-width: calc(100% - 100px);
	}
	
	.footer-chat-message-info {
		min-width: 90px;
		max-width: 100px;
	}
	
	.footer-chat-message-sender-id {
		font-size: 10px;
	}
	
	.footer-chat-message-time {
		font-size: 9px;
	}
}

@media (max-width: 480px) {
	.footer-chat-panel {
		bottom: 70px;
		height: calc(100vh - 90px);
		max-height: calc(100vh - 90px);
	}
	
	.footer-chat-message-bubble {
		max-width: calc(100% - 100px);
	}
	
	.footer-chat-message-info {
		min-width: 90px;
		max-width: 100px;
	}
	
	.footer-chat-message-sender-id {
		font-size: 10px;
	}
	
	.footer-chat-message-time {
		font-size: 9px;
	}
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.footer-chat-panel,
	.footer-chat-toggle-btn,
	.footer-chat-message,
	.footer-chat-close-btn,
	.footer-chat-send-btn {
		transition: none;
		animation: none;
	}
}

/* File Upload Styles */
.footer-chat-attach-btn {
	background: transparent;
	border: none;
	color: #64748b;
	font-size: 20px;
	cursor: pointer;
	padding: 8px;
	border-radius: 8px;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.footer-chat-attach-btn:hover {
	background: #f1f5f9;
	color: #2563eb;
	transform: rotate(-15deg);
}

.footer-chat-attach-btn:active {
	transform: rotate(-15deg) scale(0.95);
}

.footer-chat-input-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.footer-chat-input {
	padding-left: 8px !important;
}

/* Upload Progress */
.footer-chat-upload-progress {
	padding: 12px 16px;
	background: #f8fafc;
	border-top: 1px solid #e5e7eb;
}

.footer-chat-upload-progress-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 12px;
}

.footer-chat-upload-filename {
	font-weight: 600;
	color: #475569;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

.footer-chat-upload-status {
	color: #64748b;
	font-size: 11px;
}

.footer-chat-upload-progress-bar {
	width: 100%;
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
	overflow: hidden;
}

.footer-chat-upload-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
	border-radius: 2px;
	transition: width 0.3s ease;
	width: 0%;
}

/* File Attachments */
.footer-chat-attachments {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 8px;
}

.footer-chat-attachment {
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.2s;
}

.footer-chat-attachment-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
	gap: 12px;
	padding: 8px;
	background: rgba(37, 99, 235, 0.05);
	border: 1px solid rgba(37, 99, 235, 0.1);
	border-radius: 8px;
	transition: all 0.2s;
}

.footer-chat-attachment-link:hover {
	background: rgba(37, 99, 235, 0.1);
	border-color: rgba(37, 99, 235, 0.2);
	transform: translateY(-1px);
}

/* Image Attachments */
.footer-chat-attachment-image {
	max-width: 100%;
}

.footer-chat-attachment-preview {
	max-width: 200px;
	max-height: 150px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid rgba(37, 99, 235, 0.2);
}

.footer-chat-attachment-image .footer-chat-attachment-link {
	flex-direction: column;
	align-items: flex-start;
	padding: 12px;
}

.footer-chat-attachment-image .footer-chat-attachment-info {
	width: 100%;
	margin-top: 8px;
}

/* File Attachments (Non-image) */
.footer-chat-attachment-file .footer-chat-attachment-link {
	padding: 12px;
}

.footer-chat-attachment-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(37, 99, 235, 0.1);
	border-radius: 8px;
	flex-shrink: 0;
}

.footer-chat-attachment-icon i {
	font-size: 24px;
	color: #2563eb;
}

.footer-chat-attachment-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.footer-chat-attachment-name {
	font-weight: 600;
	font-size: 13px;
	color: #2563eb;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.footer-chat-attachment-size {
	font-size: 11px;
	color: #64748b;
}

.footer-chat-attachment-download {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(37, 99, 235, 0.1);
	border-radius: 6px;
	flex-shrink: 0;
	transition: all 0.2s;
}

.footer-chat-attachment-link:hover .footer-chat-attachment-download {
	background: rgba(37, 99, 235, 0.2);
	transform: scale(1.1);
}

.footer-chat-attachment-download i {
	font-size: 14px;
	color: #2563eb;
}

/* Tabs */
.footer-chat-tabs {
	display: flex;
	background: #f8fafc;
	border-bottom: 1px solid #e5e7eb;
	padding: 0 16px;
	gap: 4px;
}

.footer-chat-tab {
	background: transparent;
	border: none;
	padding: 12px 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	color: #64748b;
	border-bottom: 2px solid transparent;
	transition: all 0.2s;
	position: relative;
}

.footer-chat-tab:hover {
	color: #2563eb;
	background: rgba(37, 99, 235, 0.05);
}

.footer-chat-tab.active {
	color: #2563eb;
	border-bottom-color: #2563eb;
	background: white;
}

.footer-chat-tab i {
	font-size: 16px;
}

.footer-chat-tab-badge {
	background: #ef4444;
	color: white;
	border-radius: 10px;
	padding: 2px 6px;
	font-size: 11px;
	font-weight: 600;
	min-width: 18px;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Tab Content */
.footer-chat-tab-content {
	display: none;
	flex-direction: column;
	flex: 1;
	overflow: hidden;
}

.footer-chat-tab-content.active {
	display: flex;
}

/* Load More Button */
.footer-chat-load-more-container {
	padding: 12px 16px;
	background: #f8fafc;
	border-top: 1px solid #e5e7eb;
	text-align: center;
}

.footer-chat-load-more-btn {
	background: white;
	border: 1px solid #e5e7eb;
	color: #64748b;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s;
}

.footer-chat-load-more-btn:hover:not(:disabled) {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #2563eb;
}

.footer-chat-load-more-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Files List */
.footer-chat-files-list {
	flex: 1;
	overflow-y: auto;
	background: #f8fafc;
	min-height: 0;
}

.footer-chat-files-list-view {
	padding: 0;
}

.footer-chat-files-grid-view {
	padding: 16px;
}

/* Files Toolbar */
.footer-chat-files-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	background: white;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.footer-chat-files-toolbar-left {
	display: flex;
	align-items: center;
}

.footer-chat-files-count-text {
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
}

.footer-chat-files-toolbar-right {
	display: flex;
	align-items: center;
}

.footer-chat-view-toggle {
	display: flex;
	background: #f1f5f9;
	border-radius: 8px;
	padding: 2px;
	gap: 2px;
}

.footer-chat-view-btn {
	background: transparent;
	border: none;
	padding: 6px 10px;
	border-radius: 6px;
	cursor: pointer;
	color: #64748b;
	font-size: 16px;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.footer-chat-view-btn:hover {
	color: #2563eb;
	background: rgba(37, 99, 235, 0.1);
}

.footer-chat-view-btn.active {
	background: white;
	color: #2563eb;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.footer-chat-files-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #94a3b8;
	text-align: center;
	padding: 40px 20px;
}

.footer-chat-files-empty i {
	font-size: 48px;
	margin-bottom: 12px;
	opacity: 0.5;
}

.footer-chat-files-empty p {
	margin: 0;
	font-size: 14px;
}

.footer-chat-files-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
}

/* List View Container */
.footer-chat-files-list-container {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* List View Item */
.footer-chat-file-item-list {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	background: white;
	border-bottom: 1px solid #e5e7eb;
	transition: all 0.2s;
}

.footer-chat-file-item-list:hover {
	background: #f8fafc;
}

.footer-chat-file-item-list:last-child {
	border-bottom: none;
}

.footer-chat-file-item-list-own {
	background: linear-gradient(to right, rgba(37, 99, 235, 0.02) 0%, white 5%);
	border-left: 3px solid #2563eb;
}

.footer-chat-file-item-list-other {
	border-left: 3px solid transparent;
}

.footer-chat-file-item-list-preview {
	width: 60px;
	height: 60px;
	flex-shrink: 0;
	background: #f8fafc;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
	border: 1px solid #e5e7eb;
}

.footer-chat-file-item-list-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.footer-chat-file-item-list-icon,
.footer-chat-file-item-list-icon-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(37, 99, 235, 0.05);
}

.footer-chat-file-item-list-icon i,
.footer-chat-file-item-list-icon-fallback i {
	font-size: 28px;
	color: #2563eb;
}

.footer-chat-file-item-list-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.footer-chat-file-item-list-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.footer-chat-file-item-list-name {
	font-size: 14px;
	font-weight: 600;
	color: #1e293b;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.4;
}

.footer-chat-file-item-list-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.footer-chat-file-item-list-info {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 12px;
	color: #64748b;
}

.footer-chat-file-item-list-own .footer-chat-file-item-list-name {
	color: #2563eb;
}

.footer-chat-file-item-list-own .footer-chat-file-item-uploader {
	color: #2563eb;
	font-weight: 500;
}

.footer-chat-file-item {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.2s;
	border: 1px solid #e5e7eb;
	position: relative;
}

.footer-chat-file-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer-chat-file-item-own {
	border-color: rgba(37, 99, 235, 0.3);
	background: linear-gradient(to bottom, #ffffff 0%, rgba(37, 99, 235, 0.02) 100%);
}

.footer-chat-file-item-other {
	border-color: #e5e7eb;
}

.footer-chat-file-item-header {
	width: 100%;
	height: 120px;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
}

.footer-chat-file-item-badge-own {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(37, 99, 235, 0.9);
	color: white;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	z-index: 1;
}

.footer-chat-file-item-preview {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.footer-chat-file-item-icon,
.footer-chat-file-item-icon-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(37, 99, 235, 0.05);
}

.footer-chat-file-item-icon i,
.footer-chat-file-item-icon-fallback i {
	font-size: 48px;
	color: #2563eb;
}

.footer-chat-file-item-body {
	padding: 12px;
}

.footer-chat-file-item-name {
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 6px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.4;
}

.footer-chat-file-item-uploader {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #64748b;
	margin-bottom: 8px;
}

.footer-chat-file-item-uploader i {
	font-size: 10px;
	opacity: 0.7;
}

.footer-chat-file-item-own .footer-chat-file-item-uploader {
	color: #2563eb;
	font-weight: 500;
}

.footer-chat-file-item-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
	color: #64748b;
	margin-bottom: 12px;
}

.footer-chat-file-item-size {
	font-weight: 500;
}

.footer-chat-file-item-date {
	opacity: 0.8;
}

.footer-chat-file-item-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.footer-chat-file-item-download,
.footer-chat-file-item-delete {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: all 0.2s;
	font-size: 14px;
	text-decoration: none;
}

.footer-chat-file-item-download {
	background: rgba(37, 99, 235, 0.1);
	color: #2563eb;
}

.footer-chat-file-item-download:hover {
	background: rgba(37, 99, 235, 0.2);
	transform: scale(1.1);
}

.footer-chat-file-item-delete {
	background: rgba(239, 68, 68, 0.1);
	color: #ef4444;
}

.footer-chat-file-item-delete:hover {
	background: rgba(239, 68, 68, 0.2);
	transform: scale(1.1);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
	.footer-chat-panel {
		border: 2px solid #000;
	}
	
	.footer-chat-message-bubble {
		border: 2px solid currentColor;
	}
}

