:root {
    --ac-primary: #2778ff; /* Brand Blue */
    --ac-bg-user: #eff6ff; /* Light Blue Bg */
    --ac-bg-peer: #f3f4f6; /* Gray Bg */
    --ac-bg-light: rgb(243, 244, 246); /* Gray Bg */
    --ac-bg-hover: rgb(230, 232, 234); /* Gray Bg */
    --ac-text: #1f2937;
    --ac-text-light: #6b7280;
    --cl-text-sub: #9ba2a0;
    --cl-bg-secondary: #f3f4f6;
    --ac-border: #e5e7eb;
    --ac-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --ac-font: system-ui, -apple-system, sans-serif;
    --status-color: #10b981; /* Online green */
    --ac-danger: #ef4444; /* For busy/unread */
    --ac-success: #10b981; /* For online */
    --ac-warning: #f59e0b; /* For away */
    --ac-offline: #9ca3af; /* For offline */
}

/* The Anchor */
.ac-chat-toast-container {
  position: fixed;
  top: 48px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

/* The Toast Card */
.ac-chat-toast {
  width: 340px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  pointer-events: auto;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.ac-chat-toast.ac-visible {
  transform: translateX(0);
}

/* Inner Layout */
.ac-toast-header { 
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 12px 16px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  /*background-color: var(--ac-primary);
  color: white;*/
}

.ac-toast-sender-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
}


/* Avatar & Status */
.ac-avatar-wrapper {
  position: relative;
  margin-right: 12px;
}

.ac-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--ac-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #777;
  font-size: 14px;
  object-fit: cover;
}

.ac-toast-sender {
  font-weight: 600;
  font-size: 14px;
  /*color: white;*/
}

.ac-toast-role {
  font-size: 12px;
  color: var(--ac-warning);
  /*margin-left: 6px;*/
}

.ac-toast-time {
  font-size: 11px;
  color: #999;
}


.ac-toast-body-wrapper {
    border: none;
    outline: none;
    border-radius: 12px;
    cursor: pointer;
    background-color: transparent;
    
    padding: 12px 8px;
    margin: 4px;
    color: #777;
    display: flex;
    justify-content: start;
    align-items: top;
    gap: 0.5rem;
    
    width: 100%; 
}

.ac-toast-body-wrapper svg {
    transform: translateY(3px);
}

.ac-toast-body-wrapper:hover {
    background-color: var(--ac-bg-light);
}

.ac-open-icon {
    opacity: 0.55;
    display: none;
}

.ac-toast-body-wrapper:hover .ac-open-icon {
    display: inline-block;
}

.ac-toast-body {
  text-align: left;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 80%;
  max-height: 140px; 
  overflow-y: auto;
  scrollbar-width: thin; /* Firefox */
}

/* Chrome/Edge/Safari Scrollbar styling */
.ac-toast-body::-webkit-scrollbar {
  width: 4px;
}

.ac-toast-body::-webkit-scrollbar-track {
  background: transparent;
}

.ac-toast-body::-webkit-scrollbar-thumb {
  background-color: #d1d1d1;
  border-radius: 4px;
}

/* Quick Reply Area */
.ac-toast-actions {
  padding: 8px 16px 12px;
  display: flex;
  gap: 8px;
}

.ac-toast-compose {
    flex: 1;
    background-color: transparent!important;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 4px 4px;
    padding-left: 8px;
    display: flex;
    align-items: center;
}

.ac-toast-input {
  flex-grow: 1;
  padding: 0!important;
  max-height: 80px;
  border: none!important;
  background-color: transparent!important;
  font-size: 13px;
  outline: none!important;
}

.ac-toast-input:focus {
  /*border-color: #0056b3;*/
}

.ac-toast-btn {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 10px;
  
  background-color: var(--ac-bg-light);
  color: var(--ac-text);
  padding: 6px 6px;
  transition: background-color 0.3s ease;
}

.ac-toast-btn:hover {
  background-color: var(--ac-bg-hover);
}

.ac-reply-btn {
    
}

.ac-close-btn {
    margin-left: 4px;
    background-color: transparent;
}
