@media (pointer: coarse) {
  input.text-xs,
  textarea.text-xs,
  select.text-xs,
  input.text-sm,
  textarea.text-sm,
  select.text-sm {
    font-size: 16px !important;
  }
}

@supports (-webkit-touch-callout: none) {
  input.text-xs,
  textarea.text-xs,
  select.text-xs,
  input.text-sm,
  textarea.text-sm,
  select.text-sm {
    font-size: 16px !important;
  }
}

@media (max-width: 768px) {
  input.text-xs,
  textarea.text-xs,
  select.text-xs,
  input.text-sm,
  textarea.text-sm,
  select.text-sm {
    font-size: 16px !important;
  }

  .text-sm {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}

html.dark {
  color-scheme: dark;
}

html.dark body {
  background-color: #0b1220;
  background-image:
    radial-gradient(900px circle at 14% 18%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(700px circle at 86% 22%, rgba(99, 102, 241, 0.14), transparent 58%),
    radial-gradient(540px circle at 50% 100%, rgba(34, 211, 238, 0.10), transparent 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 8px);
  background-attachment: fixed;
}

#chats-list .chat-actions-ellipsis {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  background: transparent;
  border: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html.dark #chats-list .chat-actions-ellipsis {
  color: #cbd5e1;
}

@media (any-hover: hover) {
  #chats-list li:hover .chat-actions-ellipsis {
    display: flex;
  }
}

#chats-list .chat-actions-ellipsis:active {
  background: rgba(0, 0, 0, 0.06);
}

html.dark #chats-list .chat-actions-ellipsis:active {
  background: rgba(255, 255, 255, 0.10);
}


@media (any-hover: none) {
  #chats-list .group-actions {
    display: none !important;
  }

  #chats-list .chat-actions-ellipsis {
    display: grid !important;
  }

  #chats-list li {
    overflow: visible;
  }
}

@media (pointer: coarse) {
  #chat_messages li[data-message-id] {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
}

.min-h-0 {
  min-height: 0;
}

.opacity-0 {
  opacity: 0;
}

.pointer-events-none {
  pointer-events: none;
}

#scroll_to_bottom_btn {
  position: absolute;
  right: 16px;
  bottom: 96px;
  z-index: 65;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  color: #374151;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity 150ms ease;
}

.sidebar-search-highlight {
  font-weight: 600;
  color: #1d4ed8;
}

html.dark .sidebar-search-highlight {
  color: #7dd3fc;
}

.tabs-pill {
  padding: 5px;
  border-radius: 12px;
}

.sidebar-tab {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
}
