/**
 * Forumax Chat Styles
 *
 * Modern, minimal chat UI with SCSS variables for easy theming.
 *
 * @package Forumax_Pro
 */
:root {
  --forumax-primary-color-hover: #4338ca;
  --forumax-chat-bg: #ffffff;
  --forumax-chat-bg-secondary: #f9fafb;
  --forumax-chat-text: #111827;
  --forumax-chat-text-secondary: #6b7280;
  --forumax-chat-border: #e5e7eb;
  --forumax-chat-bubble-user: #e0e7ff;
  --forumax-chat-bubble-other: #f3f4f6;
  --forumax-chat-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  --forumax-chat-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --forumax-chat-radius: 16px;
  --forumax-chat-radius-sm: 8px;
  --forumax-chat-radius-bubble: 18px;
  --forumax-chat-transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --forumax-chat-bg: #1f2937;
    --forumax-chat-bg-secondary: #374151;
    --forumax-chat-text: #f9fafb;
    --forumax-chat-text-secondary: #9ca3af;
    --forumax-chat-border: #4b5563;
    --forumax-chat-bubble-user: #4338ca;
    --forumax-chat-bubble-other: #374151;
  }
}
@keyframes forumax-badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
@keyframes forumax-chat-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes forumax-spin {
  to {
    transform: rotate(360deg);
  }
}
.forumax-chat-toggle svg,
.forumax-chat-container svg,
.forumax-profile-chat-history svg,
.forumax-author-hover-card svg {
  display: inline-block;
  vertical-align: middle;
  box-sizing: content-box !important;
  max-width: none !important;
  max-height: none !important;
  width: 24px;
  height: 24px;
  min-width: 18px !important;
  min-height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.5 !important;
}

.forumax-chat-toggle {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bbpc_brand_color, #4f46e5);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 111;
}
.forumax-chat-toggle:hover {
  transform: scale(1.05);
  background: var(--forumax-primary-color-hover, #4338ca);
}
.forumax-chat-toggle:active {
  transform: scale(0.95);
}
.forumax-chat-toggle svg,
.forumax-chat-toggle .forumax-chat-icon-open,
.forumax-chat-toggle .forumax-chat-icon-close {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: none !important;
  max-height: none !important;
  stroke: #ffffff !important;
  stroke-width: 2 !important;
  fill: none !important;
  display: block;
  box-sizing: content-box !important;
  overflow: visible !important;
  margin: auto !important;
}
.forumax-chat-toggle .forumax-chat-icon-close {
  display: none !important;
}
.forumax-chat-toggle.is-open {
  background: var(--forumax-chat-text, #111827);
}
.forumax-chat-toggle.is-open .forumax-chat-icon-open {
  display: none !important;
}
.forumax-chat-toggle.is-open .forumax-chat-icon-close {
  display: block !important;
}

.forumax-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: forumax-badge-pulse 2s infinite;
}

.forumax-chat-container {
  position: fixed;
  bottom: 5px;
  right: 5px;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--black_25);
  border-radius: var(--forumax-chat-radius);
  box-shadow: var(--forumax-chat-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  animation: forumax-chat-slide-up 0.3s ease;
}

.forumax-chat-conversation {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.forumax-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bbpc_brand_color);
  color: #ffffff;
  flex-shrink: 0;
}
.forumax-chat-header .forumax-chat-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.forumax-chat-back,
.forumax-chat-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--forumax-chat-transition);
  padding: 0;
}
.forumax-chat-back:hover,
.forumax-chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.forumax-chat-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.forumax-chat-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.forumax-chat-user-name {
  font-weight: 600;
  font-size: 15px;
}

.forumax-chat-conversations {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.forumax-conversation-label {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forumax-chat-text-secondary);
  background: var(--forumax-chat-bg-secondary);
  border-radius: var(--forumax-chat-radius-sm);
  margin-bottom: 4px;
}

.forumax-chat-assistants-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--forumax-chat-bg-secondary);
  border-bottom: 1px solid var(--forumax-chat-border);
}

.forumax-assistants-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forumax-chat-text-secondary);
  white-space: nowrap;
}

.forumax-assistants-avatars {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}
.forumax-assistants-avatars::-webkit-scrollbar {
  height: 0;
}

.forumax-assistant-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all var(--forumax-chat-transition);
  flex-shrink: 0;
}
.forumax-assistant-avatar:hover {
  border-color: var(--bbpc_brand_color);
  transform: scale(1.1);
}
.forumax-assistant-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.forumax-assistant-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid var(--forumax-chat-bg);
  border-radius: 50%;
}

.forumax-conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--forumax-chat-radius-sm);
  cursor: pointer;
  transition: background var(--forumax-chat-transition);
  margin-bottom: 5px;
  background: transparent;
}
.forumax-conversation-item:hover {
  background: #000;
}
.forumax-conversation-item.is-assistant {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, transparent 100%);
  border-left: 2px solid var(--bbpc_brand_color);
}

.forumax-conversation-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.forumax-conversation-info {
  flex: 1;
  min-width: 0;
}

.forumax-conversation-name {
  font-weight: 600;
  font-size: 14px;
  color: #9ca3af;
  margin: 0 0 4px;
  text-transform: capitalize;
}
.forumax-conversation-name:hover {
  color: var(--bbpc_brand_color);
}

.forumax-conversation-preview {
  font-size: 13px;
  color: var(--forumax-chat-text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forumax-conversation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.forumax-conversation-time {
  font-size: 11px;
  color: var(--forumax-chat-text-secondary);
}

.forumax-conversation-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bbpc_brand_color);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forumax-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--forumax-chat-text-secondary);
}
.forumax-chat-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.forumax-chat-login {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.forumax-chat-login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}
.forumax-chat-login-content svg {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: var(--bbpc_brand_color);
  opacity: 0.8;
}
.forumax-chat-login-content h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--forumax-chat-text);
}
.forumax-chat-login-content p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--forumax-chat-text-secondary);
  line-height: 1.5;
}

.forumax-chat-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: var(--bbpc_brand_color);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 25px;
  transition: all var(--forumax-chat-transition);
}
.forumax-chat-login-btn:hover {
  background: var(--forumax-primary-color-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.forumax-chat-login-btn:active {
  transform: translateY(0);
}

.forumax-chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.forumax-chat-load-more {
  align-self: center;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--forumax-chat-bg-secondary);
  border: none;
  color: var(--forumax-chat-text-secondary);
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: background var(--forumax-chat-transition);
}
.forumax-chat-load-more:hover {
  background: var(--forumax-chat-border);
}

.forumax-chat-message {
  display: flex;
  flex-direction: row;
  gap: 8px;
  max-width: 80%;
  align-items: start;
  margin-bottom: 10px;
}
.forumax-chat-message.is-own {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.forumax-chat-message.is-own .forumax-message-content-wrapper {
  align-items: flex-end;
}
.forumax-chat-message.is-own .forumax-message-bubble {
  background: var(--forumax-chat-bubble-user);
  color: var(--black_100);
  border-bottom-right-radius: 4px;
}
.forumax-chat-message.is-own .forumax-message-meta {
  flex-direction: row-reverse !important;
}
.forumax-chat-message.is-other {
  align-self: flex-start;
  flex-direction: row;
}
.forumax-chat-message.is-other .forumax-message-content-wrapper {
  align-items: flex-start;
}
.forumax-chat-message.is-other .forumax-message-bubble {
  background: var(--forumax-chat-bubble-other);
  color: var(--forumax-chat-text);
  border-bottom-left-radius: 4px;
}
.forumax-chat-message:hover .forumax-message-actions {
  opacity: 1;
}

.forumax-message-avatar-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 20px;
}

.forumax-message-sender-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.forumax-message-content-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.forumax-message-bubble {
  padding: 10px 14px;
  border-radius: var(--forumax-chat-radius-bubble);
  line-height: 1.4;
  position: relative;
}
.forumax-message-bubble.is-loved {
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}
.forumax-message-bubble.is-emoji-only {
  background: transparent !important;
  padding: 0;
  box-shadow: none;
}
.forumax-message-bubble.is-media-only {
  background: transparent !important;
  padding: 5px 0 0;
  box-shadow: none;
}
.forumax-message-bubble.is-media-only .forumax-message-attachment {
  margin-top: 0;
}

.forumax-message-loved-indicator {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 5;
  border: 1px solid rgba(239, 68, 68, 0.1);
}
.forumax-message-loved-indicator svg {
  width: 10px;
  height: 10px;
}

.is-own .forumax-message-loved-indicator {
  left: -6px;
  right: auto;
}

.is-other .forumax-message-loved-indicator {
  right: -6px;
  left: auto;
}

.forumax-message-content {
  font-size: 14px;
}
.forumax-message-content.is-large-emoji {
  font-size: 32px;
  line-height: 1.2;
}

.forumax-message-reply-quote {
  padding: 8px 10px;
  margin-bottom: 8px;
  border-left: 3px solid var(--bbpc_brand_color);
  background: rgba(0, 0, 0, 0.05);
  border-radius: 0 var(--forumax-chat-radius-sm) var(--forumax-chat-radius-sm) 0;
  font-size: 12px;
}

.forumax-reply-quote-sender {
  font-weight: 600;
  color: var(--bbpc_brand_color);
  display: block;
  margin-bottom: 2px;
}

.forumax-reply-quote-text {
  color: var(--forumax-chat-text-secondary);
  margin: 0;
}

.forumax-message-meta {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--black_700);
}

.forumax-chat-message:hover .forumax-message-actions {
  opacity: 1;
}

.forumax-message-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--forumax-chat-transition);
}

.forumax-message-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--forumax-chat-bg-secondary);
  border: none;
  color: var(--forumax-chat-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--forumax-chat-transition);
  padding: 0px;
}
.forumax-message-action-btn:hover {
  background: var(--forumax-chat-border);
  color: var(--forumax-chat-text);
}
.forumax-message-action-btn.is-liked {
  color: #ef4444;
}
.forumax-message-action-btn svg {
  width: 16px;
  height: 16px;
}

.forumax-message-attachment {
  margin-top: 8px;
  border-radius: var(--forumax-chat-radius-sm);
  overflow: hidden;
}
.forumax-message-attachment img {
  max-width: 100%;
  max-height: 200px;
  display: block;
  cursor: pointer;
}
.forumax-message-attachment video {
  max-width: 100%;
  max-height: 200px;
  display: block;
}

.forumax-message-attachment-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--forumax-chat-bg-secondary);
  border-radius: var(--forumax-chat-radius-sm);
  text-decoration: none;
  color: var(--forumax-chat-text);
  transition: background var(--forumax-chat-transition);
}
.forumax-message-attachment-file:hover {
  background: var(--forumax-chat-border);
}
.forumax-message-attachment-file svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--bbpc_brand_color);
}
.forumax-message-attachment-file span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.forumax-message-sender {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.forumax-message-sender-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.forumax-message-sender-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--black_900);
  text-transform: capitalize;
  margin-bottom: 5px;
}

.forumax-chat-reply-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--forumax-chat-bg-secondary);
  border-top: 1px solid var(--forumax-chat-border);
}

.forumax-chat-reply-content {
  flex: 1;
  min-width: 0;
}

.forumax-chat-reply-label {
  font-size: 11px;
  color: var(--bbpc_brand_color);
  font-weight: 600;
}

.forumax-chat-reply-sender {
  font-size: 12px;
  font-weight: 600;
  color: var(--forumax-chat-text);
}

.forumax-chat-reply-text {
  font-size: 12px;
  color: var(--forumax-chat-text-secondary);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forumax-chat-reply-cancel {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--forumax-chat-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.forumax-chat-reply-cancel:hover {
  background: var(--forumax-chat-border);
}

.forumax-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bs-white);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.forumax-chat-attach-btn,
.forumax-chat-emoji-btn,
.forumax-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--forumax-chat-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--forumax-chat-transition);
  padding: 0;
}

.forumax-chat-attach-btn:hover,
.forumax-chat-emoji-btn:hover {
  background: var(--forumax-chat-bg-secondary);
  color: #fff;
}

.forumax-chat-send-btn {
  background: var(--bbpc_brand_color);
  color: #ffffff;
}
.forumax-chat-send-btn:hover {
  background: var(--forumax-primary-color-hover);
}
.forumax-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.forumax-chat-input-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--black_50);
  border-radius: 20px;
  padding: 4px 12px;
}

.forumax-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-size: 14px;
  line-height: 1.4;
  max-height: 150px;
  padding: 10px 0;
  color: var(--black_700) !important;
}
.forumax-chat-input::placeholder {
  color: var(--black_900) !important;
}
.forumax-chat-input:focus {
  outline: none;
  background: transparent !important;
  color: var(--black_900) !important;
  border: none;
}

.forumax-chat-attachment-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--forumax-chat-bg-secondary);
  border-top: 1px solid var(--forumax-chat-border);
}

.forumax-chat-attachment-thumb-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
}
.forumax-chat-attachment-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.forumax-chat-attachment-content {
  flex: 1;
  min-width: 0;
}

.forumax-chat-attachment-name {
  display: block;
  font-size: 13px;
  color: var(--forumax-chat-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.forumax-chat-attachment-progress {
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.forumax-chat-attachment-progress-bar {
  height: 100%;
  background: var(--bbpc_brand_color);
  width: 0;
  transition: width 0.3s ease;
}

.forumax-chat-attachment-cancel {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--forumax-chat-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.forumax-chat-attachment-cancel:hover {
  background: var(--forumax-chat-border);
  color: var(--forumax-chat-text);
}

.forumax-chat-attachment-cancel {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--forumax-chat-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.forumax-chat-attachment-cancel:hover {
  background: var(--forumax-chat-border);
  color: #ef4444;
}

.forumax-emoji-picker {
  position: fixed;
  bottom: 180px;
  right: 24px;
  width: 320px;
  max-height: 300px;
  background: var(--forumax-chat-bg);
  border-radius: var(--forumax-chat-radius);
  box-shadow: var(--forumax-chat-shadow);
  overflow: hidden;
  z-index: 100000;
}

.forumax-emoji-picker-header {
  padding: 12px;
  border-bottom: 1px solid var(--forumax-chat-border);
}

.forumax-emoji-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--forumax-chat-border);
  border-radius: 20px;
  font-size: 13px;
  background: var(--forumax-chat-bg-secondary);
  color: var(--forumax-chat-text);
}
.forumax-emoji-search:focus {
  outline: none;
  border-color: var(--bbpc_brand_color);
}

.forumax-emoji-picker-content {
  padding: 12px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}
.forumax-emoji-picker-content::-webkit-scrollbar {
  width: 4px;
}
.forumax-emoji-picker-content::-webkit-scrollbar-track {
  background: transparent;
}
.forumax-emoji-picker-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.forumax-emoji-category {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.forumax-emoji-item {
  width: 100%;
  aspect-ratio: 1;
  border: none;
  background: transparent;
  border-radius: var(--forumax-chat-radius-sm);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--forumax-chat-transition);
}
.forumax-emoji-item:hover {
  background: var(--forumax-chat-bg-secondary);
}

.forumax-chat-author-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.forumax-chat-author-wrap:hover .forumax-chat-author-btn {
  display: inline-flex;
  opacity: 1;
}

.forumax-chat-author-btn {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bbpc_brand_color);
  border: none;
  color: #ffffff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--forumax-chat-transition);
  opacity: 0;
}
.forumax-chat-author-btn:hover {
  transform: scale(1.1);
  background: var(--forumax-primary-color-hover);
}
.forumax-chat-author-btn svg {
  width: 12px;
  height: 12px;
}

.forumax-chat-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  gap: 12px;
  color: var(--forumax-chat-text-secondary);
}

.forumax-chat-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--forumax-chat-border);
  border-top-color: var(--bbpc_brand_color);
  border-radius: 50%;
  animation: forumax-spin 0.8s linear infinite;
}

@media (max-width: 480px) {
  .forumax-chat-toggle {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
  .forumax-chat-container {
    bottom: 80px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    height: calc(100vh - 100px);
    max-height: none;
    border-radius: var(--forumax-chat-radius);
  }
  .forumax-emoji-picker {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 160px;
  }
}
.forumax-chat-messages::-webkit-scrollbar,
.forumax-chat-conversations::-webkit-scrollbar,
.forumax-emoji-picker-content::-webkit-scrollbar {
  width: 6px;
}
.forumax-chat-messages::-webkit-scrollbar-track,
.forumax-chat-conversations::-webkit-scrollbar-track,
.forumax-emoji-picker-content::-webkit-scrollbar-track {
  background: transparent;
}
.forumax-chat-messages::-webkit-scrollbar-thumb,
.forumax-chat-conversations::-webkit-scrollbar-thumb,
.forumax-emoji-picker-content::-webkit-scrollbar-thumb {
  background: var(--forumax-chat-border);
  border-radius: 3px;
}
.forumax-chat-messages::-webkit-scrollbar-thumb:hover,
.forumax-chat-conversations::-webkit-scrollbar-thumb:hover,
.forumax-emoji-picker-content::-webkit-scrollbar-thumb:hover {
  background: var(--forumax-chat-text-secondary);
}

#forumax-hover-portal {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 9999999;
  pointer-events: none;
}
#forumax-hover-portal .forumax-author-hover-card {
  pointer-events: auto;
}

.forumax-chat-author-wrap {
  position: relative;
  display: inline-block;
}

.forumax-author-hover-card {
  display: none !important;
  position: absolute;
  width: 260px;
  background-color: var(--bs-white);
  border: 1px solid var(--black_50);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 0;
  z-index: 9999999;
  text-align: left;
  white-space: normal;
  line-height: 1.4;
  overflow: visible;
}
.forumax-author-hover-card.is-visible {
  display: block !important;
}
.forumax-author-hover-card.is-bottom::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: var(--bs-white);
}
.forumax-author-hover-card.is-bottom::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: var(--bs-white);
  z-index: 10;
  margin-bottom: -1px;
}
.forumax-author-hover-card.is-top::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--forumax-chat-border);
}
.forumax-author-hover-card.is-top::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--forumax-chat-bg);
  z-index: 10;
  margin-top: -1px;
}

.forumax-hover-card-inner {
  padding: 16px;
  background-color: inherit;
  width: 100%;
  height: 100%;
}

.forumax-hover-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.forumax-hover-card-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--black_50);
}

.forumax-hover-card-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.forumax-hover-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--black_900);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: capitalize;
  margin-bottom: 5px;
}

.forumax-hover-card-role {
  font-size: 11px;
  color: var(--forumax-chat-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.forumax-hover-card-stats {
  padding: 10px 0;
  border-top: 1px solid var(--black_50);
  border-bottom: 1px solid var(--black_50);
  margin-bottom: 14px;
}

.forumax-hover-card-stat {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.forumax-stat-label {
  color: var(--forumax-chat-text-secondary);
}

.forumax-stat-value {
  font-weight: 700;
  color: var(--bbpc_brand_color);
}

.forumax-hover-card-footer {
  display: flex;
}

.forumax-hover-card-chat-btn {
  width: 100% !important;
  height: 38px !important;
  background: var(--bbpc_brand_color) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  position: static !important;
  transform: none !important;
  opacity: 1 !important;
  display: flex !important;
  margin: 0 !important;
}
.forumax-hover-card-chat-btn:hover {
  background: var(--forumax-primary-color-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
}
.forumax-hover-card-chat-btn svg {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2.5 !important;
}

.forumax-message-delete-btn {
  color: #ef4444 !important;
  transition: background 0.2s;
}
.forumax-message-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

@keyframes forumaxFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -5px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.forumax-profile-chat-history {
  background: transparent !important;
  color: inherit;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 0;
  font-family: inherit;
}
.forumax-profile-chat-history .forumax-profile-chat-header {
  margin-bottom: 20px;
}
.forumax-profile-chat-history .forumax-profile-chat-header .header-content-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.forumax-profile-chat-history .forumax-profile-chat-header .header-content-wrap h3 {
  margin: 0px 0 10px 0;
  padding: 0;
}
.forumax-profile-chat-history .forumax-profile-chat-header .header-content-wrap p {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #4b5563 !important;
}
.forumax-profile-chat-history .forumax-profile-conversations-list {
  min-height: 150px;
  background: transparent !important;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  border: 1px solid var(--black_50);
  background: var(--bs-white);
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item:hover {
  background: var(--black_50);
  border-color: var(--black_50);
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item:hover .forumax-conversation-name {
  color: var(--black_600);
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item:last-child {
  margin-bottom: 0;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item .forumax-conversation-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item .forumax-conversation-info {
  flex: 1;
  min-width: 0;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item .forumax-conversation-info .forumax-conversation-name {
  margin: 0 0 4px 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item .forumax-conversation-info .forumax-conversation-preview {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  color: #6b7280 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item .forumax-conversation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item .forumax-conversation-meta .forumax-conversation-time {
  font-size: 12px !important;
  color: var(--forumax-chat-text-secondary, #6b7280) !important;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-conversation-item .forumax-conversation-meta .forumax-conversation-badge {
  background: #4f46e5;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-chat-empty {
  text-align: center;
  padding: 40px 20px;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-chat-empty svg {
  width: 64px;
  height: 64px;
  opacity: 0.4;
  margin-bottom: 12px;
  stroke: var(--forumax-chat-text-secondary, #6b7280);
  stroke-width: 1.5;
  fill: none;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-chat-empty p {
  margin: 0 !important;
  font-size: 14px !important;
  color: var(--forumax-chat-text-secondary, #6b7280) !important;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-chat-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  gap: 12px;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-chat-loading .forumax-chat-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--forumax-chat-border, #e5e7eb);
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: forumax-spin 0.8s linear infinite;
}
.forumax-profile-chat-history .forumax-profile-conversations-list .forumax-chat-loading span {
  font-size: 14px !important;
  color: var(--forumax-chat-text-secondary, #6b7280) !important;
}

@media (max-width: 480px) {
  .forumax-chat-toggle {
    right: 20px !important;
    left: auto !important;
    transform: none !important;
    bottom: 20px !important;
  }
  .forumax-chat-toggle.is-open {
    display: none !important;
  }
  .forumax-chat-toggle:hover {
    transform: scale(1.05) !important;
  }
  .forumax-chat-container {
    bottom: 4px !important;
    left: 10px !important;
    right: 10px !important;
    max-width: 98vh !important;
    height: 450px !important;
    max-height: 98vh !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 999999 !important;
    transform: none !important;
    margin-left: auto;
  }
  .forumax-chat-container .forumax-chat-header {
    padding: 12px 16px;
  }
  .forumax-chat-container .forumax-chat-messages {
    padding: 12px;
  }
  .forumax-chat-container .forumax-emoji-picker {
    width: 100% !important;
    right: 0 !important;
    left: 0 !important;
    bottom: 60px !important;
    border-radius: 12px 12px 0 0 !important;
    max-height: 250px !important;
  }
  .forumax-chat-container svg {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
  }
  .forumax-chat-container .forumax-chat-message {
    max-width: 100% !important;
  }
  .forumax-chat-container .forumax-chat-message .forumax-message-meta {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 4px !important;
  }
}

/*# sourceMappingURL=chat.css.map */
