/* Status Bubble Styling
 * Provides styling for status indicators in the Meta Agent Chat interface
 */

/* IMPORTANT: This should ONLY apply to status bubbles, NOT user message bubbles - Minimalist design */
.status-bubble:not(.message-bubble):not(.user-message):not(.agent-message) {
  background-color: transparent !important;
  padding: 4px 0;
  border-radius: 0;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  box-shadow: none !important;
  border: none !important;
  max-width: 80% !important;
  width: fit-content;
  margin-left: 50px;
  flex-direction: column;
}

.status-bubble .message-text {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px !important;
  font-size: 14px;
  color: #666666;
  flex-direction: row !important;
  overflow: visible;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
  width: fit-content;
  flex: none;
  opacity: 0.8;
}

.dark-mode .status-bubble:not(.message-bubble):not(.user-message):not(.agent-message) {
  background-color: transparent !important;
  border: none !important;
}

.dark-mode .status-bubble .message-text {
  color: rgba(255, 255, 255, 0.7);
}

/* Pure CSS spinning circle - guaranteed magenta */
.status-bubble .css-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top: 2px solid #d946ef;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

.dark-mode .status-bubble .css-spinner {
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid #d946ef;
}

/* Fallback for SVG spinner if still used */
.status-bubble svg.spinner {
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

.status-bubble .track {
  fill: none;
  stroke: rgba(0, 0, 0, 0.1);
  stroke-width: 2;
}

.dark-mode .status-bubble .track {
  stroke: rgba(255, 255, 255, 0.1);
}

.status-bubble .indicator {
  fill: none;
  stroke: #d946ef !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 40;
  transition: stroke-dashoffset 0.3s ease;
}

/* Force all SVG circles in status bubbles to use the correct color */
.status-bubble svg circle {
  stroke: #d946ef !important;
}

.dark-mode .status-bubble .indicator {
  stroke: #d946ef;
}

/* Special styling for different status types */
.status-bubble.processing .indicator {
  stroke: #d946ef;
}

.status-bubble.error .indicator {
  stroke: #e53e3e;
}

.status-bubble.complete .indicator {
  stroke: #38a169;
}

.status-bubble.thinking .indicator {
  stroke: #d946ef;
}

/* Message text content */
.status-bubble .msg {
  display: flex;
  align-items: flex-start;
  flex: none; /* Changed from flex: 1 to prevent expansion */
  overflow: visible;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  width: fit-content; /* Changed from 100% to fit-content to match text size */
  position: relative;
  cursor: default;
}

/* Tooltip for truncated messages */
.status-bubble .msg[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: normal;
  max-width: 300px;
  word-wrap: break-word;
  z-index: 1000;
  margin-bottom: 5px;
}

.dark-mode .status-bubble .msg[title]:hover::after {
  background: rgba(255, 255, 255, 0.9);
  color: black;
}

/* Show typing dots animation - changed from hide to show */
.status-bubble .dots {
  display: inline-block !important;
  margin-left: 4px;
}

.status-bubble .dot {
  display: inline-block !important;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  margin: 0 1px;
  background-color: #d946ef;
  animation: pulse 1.5s infinite;
}

.status-bubble .dot:nth-child(1) {
  animation-delay: 0s;
}

.status-bubble .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.status-bubble .dot:nth-child(3) {
  animation-delay: 0.4s;
}

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

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

/* Responsive design for different screen sizes - Minimalist */
@media (max-width: 768px) {
  .status-bubble {
    max-width: 85% !important; /* Consistent with 80% desktop but slightly more for mobile */
    margin-left: 20px;
    padding: 4px 0; /* Minimalist padding */
  }
  
  .status-bubble .message-text {
    font-size: 13px;
    gap: 8px !important;
    width: fit-content; /* Maintain fit-content for mobile */
  }
  
  .status-bubble .css-spinner {
    width: 16px;
    height: 16px;
  }
  
  .status-bubble .msg {
    width: fit-content; /* Changed from 100% to fit-content */
  }
}

@media (max-width: 480px) {
  .status-bubble {
    max-width: 90% !important; /* Slightly more for very small screens */
    margin-left: 10px;
    padding: 4px 0; /* Minimalist padding */
  }
  
  .status-bubble .message-text {
    font-size: 12px;
    gap: 8px !important;
    width: fit-content; /* Maintain fit-content for small mobile */
  }
  
  .status-bubble .css-spinner {
    width: 14px;
    height: 14px;
  }
  
  .status-bubble .msg {
    width: fit-content; /* Changed from 100% to fit-content */
  }
} 