/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */


html {
  scroll-behavior: smooth;
}

/* Mobile message styling */
@media (max-width: 767px) {
  .message-item {
    /* Simple mobile message styling */
  }
}

/* TipTap Content Styling for Notes Index */
.tiptap-content h1 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin: 0.5rem 0 !important;
  color: rgb(17 24 39) !important;
}

.dark .tiptap-content h1 {
  color: white !important;
}

.tiptap-content h2 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  margin: 0.5rem 0 !important;
  color: rgb(17 24 39) !important;
}

.dark .tiptap-content h2 {
  color: white !important;
}

.tiptap-content h3 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin: 0.5rem 0 !important;
  color: rgb(17 24 39) !important;
}

.dark .tiptap-content h3 {
  color: white !important;
}

.tiptap-content h4 {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  margin: 0.5rem 0 !important;
  color: rgb(17 24 39) !important;
}

.dark .tiptap-content h4 {
  color: white !important;
}

.tiptap-content h5 {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin: 0.5rem 0 !important;
  color: rgb(17 24 39) !important;
}

.dark .tiptap-content h5 {
  color: white !important;
}

.tiptap-content h6 {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  margin: 0.5rem 0 !important;
  color: rgb(17 24 39) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.dark .tiptap-content h6 {
  color: white !important;
}

.tiptap-content p {
  margin: 0.25rem 0 !important;
  line-height: 1.5 !important;
}

.tiptap-content ul:not([data-type="taskList"]) {
  list-style: disc !important;
  margin: 0.25rem 0 !important;
  padding-left: 1.25rem !important;
}

.tiptap-content ol {
  list-style: decimal !important;
  margin: 0.25rem 0 !important;
  padding-left: 1.25rem !important;
}

.tiptap-content li:not([data-type="taskItem"]) {
  margin: 0.125rem 0 !important;
  display: list-item !important;
}

.tiptap-content blockquote {
  border-left: 3px solid rgb(99 102 241) !important;
  padding-left: 0.75rem !important;
  margin: 0.5rem 0 !important;
  font-style: italic !important;
  color: rgb(75 85 99) !important;
}

.dark .tiptap-content blockquote {
  border-left-color: rgb(129 140 248) !important;
  color: rgb(156 163 175) !important;
}

.tiptap-content strong {
  font-weight: 700 !important;
}

.tiptap-content em {
  font-style: italic !important;
}

.tiptap-content code {
  background: rgb(243 244 246) !important;
  padding: 0.125rem 0.25rem !important;
  border-radius: 0.25rem !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 0.875rem !important;
}

.dark .tiptap-content code {
  background: rgb(75 85 99) !important;
}

/* Code Block Styling (different from inline code) */
.tiptap-content pre {
  background: rgb(17 24 39) !important;
  color: rgb(243 244 246) !important;
  padding: 1rem !important;
  border-radius: 0.5rem !important;
  margin: 1rem 0 !important;
  overflow-x: auto !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
}

.dark .tiptap-content pre {
  background: rgb(17 24 39) !important;
  color: rgb(243 244 246) !important;
}

.tiptap-content pre code {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: inherit !important;
}

.tiptap-content mark {
  background-color: rgb(254 240 138) !important;
  color: rgb(17 24 39) !important;
  padding: 0.125rem 0.25rem !important;
  border-radius: 0.125rem !important;
}

.dark .tiptap-content mark {
  background-color: rgb(161 98 7) !important;
  color: white !important;
}

/* Task List Styling for Index */
.tiptap-content ul[data-type="taskList"] {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0.25rem 0 !important;
}

.tiptap-content ul[data-type="taskList"] li {
  display: flex !important;
  align-items: flex-start !important;
  margin: 0.25rem 0 !important;
  gap: 0.5rem !important;
  list-style: none !important;
}

.tiptap-content ul[data-type="taskList"] li > label {
  margin: 0 !important;
  padding: 0 !important;
  user-select: none;
  display: flex !important;
  align-items: center;
  flex-shrink: 0;
  margin-top: 0.125rem !important; /* Align with first line of text */
}

.tiptap-content ul[data-type="taskList"] li > label input[type="checkbox"] {
  margin: 0 !important;
  width: 1rem;
  height: 1rem;
  accent-color: rgb(99 102 241);
}

.tiptap-content ul[data-type="taskList"] li > div {
  flex: 1;
  min-width: 0;
  line-height: 1.5 !important;
}

/* Handle nested task lists */
.tiptap-content ul[data-type="taskList"] ul[data-type="taskList"] {
  margin-top: 0.25rem !important;
  margin-bottom: 0 !important;
  padding-left: 0 !important;
}

.tiptap-content ul[data-type="taskList"] ul[data-type="taskList"] li {
  margin: 0.125rem 0 !important;
}

.tiptap-content ul[data-type="taskList"] li > div > p {
  margin: 0 !important;
  display: inline !important;
}

.tiptap-content ul[data-type="taskList"] > li[data-checked="true"] > div > p {
  text-decoration: line-through;
  color: rgb(107 114 128);
}

.dark .tiptap-content ul[data-type="taskList"] > li[data-checked="true"] > div > p {
  color: rgb(156 163 175);
}

/* Line Break Styles for TipTap Content */
.tiptap-content br {
  display: block !important;
  margin: 0.5rem 0 !important;
  line-height: 1.5 !important;
}

.tiptap-content p:empty {
  min-height: 1.5rem !important;
  display: block !important;
}

.tiptap-content p:empty::before {
  content: "\00a0" !important;
  display: inline-block !important;
}

/* Handle paragraphs that only contain a br tag */
.tiptap-content p:has(br:only-child) {
  min-height: 1.5rem !important;
  display: block !important;
}

/* File Browser Table Hover Effect */
.file-browser-table tr.group:hover {
  background-color: rgb(249 250 251); /* gray-50 */
  transform: none !important;
  scale: none !important;
}

.dark .file-browser-table tr.group:hover {
  background-color: rgba(55, 65, 81, 0.5); /* gray-700/50 */
}

/* Global Scrollbar Styling - applies to all scrollable elements */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: rgb(243 244 246); /* gray-100 */
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
  background: rgb(209 213 219); /* gray-300 */
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgb(156 163 175); /* gray-400 */
}

/* Global Dark mode scrollbar styling */
.dark *::-webkit-scrollbar-track {
  background: rgb(31 41 55); /* gray-800 */
}

.dark *::-webkit-scrollbar-thumb {
  background: rgb(75 85 99); /* gray-600 */
}

.dark *::-webkit-scrollbar-thumb:hover {
  background: rgb(107 114 128); /* gray-500 */
}

/* Specific Scrollbar Styling (legacy - kept for backwards compatibility) */
#messages-container::-webkit-scrollbar,
#user-list::-webkit-scrollbar,
#activity-dropdown-list::-webkit-scrollbar {
  width: 8px;
}

#messages-container::-webkit-scrollbar-track,
#user-list::-webkit-scrollbar-track,
#activity-dropdown-list::-webkit-scrollbar-track {
  background: rgb(243 244 246); /* gray-100 */
}

#messages-container::-webkit-scrollbar-thumb,
#user-list::-webkit-scrollbar-thumb,
#activity-dropdown-list::-webkit-scrollbar-thumb {
  background: rgb(209 213 219); /* gray-300 */
  border-radius: 4px;
}

#messages-container::-webkit-scrollbar-thumb:hover,
#user-list::-webkit-scrollbar-thumb:hover,
#activity-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: rgb(156 163 175); /* gray-400 */
}

/* Dark mode scrollbar styling */
.dark #messages-container::-webkit-scrollbar-track,
.dark #user-list::-webkit-scrollbar-track,
.dark #activity-dropdown-list::-webkit-scrollbar-track {
  background: rgb(31 41 55); /* gray-800 */
}

.dark #messages-container::-webkit-scrollbar-thumb,
.dark #user-list::-webkit-scrollbar-thumb,
.dark #activity-dropdown-list::-webkit-scrollbar-thumb {
  background: rgb(75 85 99); /* gray-600 */
}

.dark #messages-container::-webkit-scrollbar-thumb:hover,
.dark #user-list::-webkit-scrollbar-thumb:hover,
.dark #activity-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: rgb(107 114 128); /* gray-500 */
}

/* Floating Notes Widget Styles */
.floating-note-button {
  transition: all 0.2s ease-in-out;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.floating-note-button:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.floating-note-panel {
  transition: all 0.3s ease-in-out;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Trix Editor Styling for Floating Notes */
.floating-note-panel trix-editor {
  border: none;
  padding: 0.75rem;
  outline: none;
  max-height: 300px;
  overflow-y: auto;
}

.floating-note-panel trix-editor:focus {
  outline: none;
}

.floating-note-panel trix-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
  border-bottom: 1px solid rgb(229 231 235);
  padding: 0.5rem;
}

.dark .floating-note-panel trix-toolbar {
  background: rgb(31 41 55);
  border-bottom-color: rgb(75 85 99);
}

/* Floating notes panel scrollbar */
.floating-note-panel .overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}

.floating-note-panel .overflow-y-auto::-webkit-scrollbar-track {
  background: rgb(243 244 246);
}

.floating-note-panel .overflow-y-auto::-webkit-scrollbar-thumb {
  background: rgb(209 213 219);
  border-radius: 3px;
}

.floating-note-panel .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: rgb(156 163 175);
}

.dark .floating-note-panel .overflow-y-auto::-webkit-scrollbar-track {
  background: rgb(31 41 55);
}

.dark .floating-note-panel .overflow-y-auto::-webkit-scrollbar-thumb {
  background: rgb(75 85 99);
}

.dark .floating-note-panel .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: rgb(107 114 128);
}

/* Sortable.js Drag and Drop Styles */
.sortable-ghost {
  opacity: 0.4;
  background: rgb(243 244 246) !important;
}

.dark .sortable-ghost {
  background: rgb(55 65 81) !important;
}

.sortable-drag {
  opacity: 1;
}

.sortable-chosen {
  cursor: move;
}



