/* Tallybot CSS - Animations and custom styles */

/* Material Icons font */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar for message area */
#tallybot-scroll::-webkit-scrollbar {
  width: 10px;
}

#tallybot-scroll::-webkit-scrollbar-thumb {
  background: rgba(33, 37, 41, 0.22);
  border-radius: 999px;
  border: 3px solid #FBFBFC;
}

#tallybot-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* Message entrance animation */
.tb-msg-in {
  animation: tb-entrance 0.26s ease;
}

@keyframes tb-entrance {
  from {
    transform: translateY(6px);
  }
  to {
    transform: translateY(0);
  }
}

/* Typing indicator dots animation */
.tb-dot-1 {
  animation: tb-bounce 1.2s infinite ease-in-out both;
}

.tb-dot-2 {
  animation: tb-bounce 1.2s infinite ease-in-out both;
  animation-delay: 0.16s;
}

.tb-dot-3 {
  animation: tb-bounce 1.2s infinite ease-in-out both;
  animation-delay: 0.32s;
}

@keyframes tb-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Spinning progress indicator */
.tb-spin {
  animation: tb-rotate 1s linear infinite;
}

@keyframes tb-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* Spinning animation for progress indicators */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Audit slide-in animation */
.tb-audit-slide {
  animation: tb-slide-in 0.24s ease;
}

@keyframes tb-slide-in {
  from {
    transform: translateX(8px);
  }
  to {
    transform: translateX(0);
  }
}

/* Prevent text selection in UI elements */
.tb-fab,
.tb-chip,
.tb-icon-btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Focus styles for accessibility */
.tb-fab:focus-visible,
.tb-chip:focus-visible,
.tb-icon-btn:focus-visible {
  outline: 2px solid #0770E9;
  outline-offset: 2px;
}

/* Textarea resize behavior */
textarea {
  min-height: 38px;
  overflow-y: auto;
}

/* Smooth color transitions */
.tb-chip,
.tb-icon-btn,
.tb-send {
  transition: background-color 80ms ease, border-color 80ms ease;
}

/* Panel shadow and border radius for different browsers */
.tb-panel {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tb-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  
  .tb-fab {
    right: 16px;
    bottom: 16px;
  }
}