@tailwind base;
@tailwind components;
@tailwind utilities;

/* Disable drag-and-drop when comment tooltip is active (JS version) */
.comment-tooltip-active [data-dnd-kit-draggable-handle],
.comment-tooltip-active [data-sortable-handle],
.comment-tooltip-active .sortable-item {
  pointer-events: none !important;
  cursor: default !important;
}

/* Keep tooltip interactive */
.comment-tooltip-active .comment-tooltip {
  pointer-events: auto !important;
}

/* Hide scrollbars for navigation containers */
.hide-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer and Edge */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}

/* TipTap Editor List Styles - Fix for bullet and numbering issues */
.ProseMirror ul {
  list-style-type: disc !important;
  margin-left: 1.5rem !important;
  padding-left: 0 !important;
}

.ProseMirror ol {
  list-style-type: decimal !important;
  margin-left: 1.5rem !important;
  padding-left: 0 !important;
}

.ProseMirror li {
  display: list-item !important;
  margin-left: 0 !important;
  padding-left: 0.25rem !important;
}

.ProseMirror ul ul {
  list-style-type: circle !important;
  margin-left: 1.5rem !important;
}

.ProseMirror ul ul ul {
  list-style-type: square !important;
  margin-left: 1.5rem !important;
}

/* Ensure list items have proper spacing */
.ProseMirror li p {
  margin: 0 !important;
}

.ProseMirror li + li {
  margin-top: 0.25rem !important;
}

/* Also apply list styles to rendered comments (prose class) */
.prose ul {
  list-style-type: disc !important;
  margin-left: 1.5rem !important;
  padding-left: 0 !important;
}

.prose ol {
  list-style-type: decimal !important;
  margin-left: 1.5rem !important;
  padding-left: 0 !important;
}

.prose li {
  display: list-item !important;
  margin-left: 0 !important;
  padding-left: 0.25rem !important;
}

.prose ul ul {
  list-style-type: circle !important;
  margin-left: 1.5rem !important;
}

.prose ul ul ul {
  list-style-type: square !important;
  margin-left: 1.5rem !important;
}

.prose li p {
  margin: 0 !important;
}

.prose li + li {
  margin-top: 0.25rem !important;
}

/* TipTap specific list classes */
.tiptap-bullet-list {
  list-style-type: disc !important;
  margin-left: 1.5rem !important;
  padding-left: 0 !important;
}

.tiptap-ordered-list {
  list-style-type: decimal !important;
  margin-left: 1.5rem !important;
  padding-left: 0 !important;
}

.tiptap-list-item {
  display: list-item !important;
  margin-left: 0 !important;
  padding-left: 0.25rem !important;
}

/* TaskCard Description Styles - Handle images properly in task cards */
.task-card-description img {
  max-width: 100% !important;
  height: auto !important;
  max-height: 120px !important;
  border-radius: 4px !important;
  object-fit: cover !important;
  margin: 0.5rem 0 !important;
  display: block !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Ensure images in shrunken task cards don't break layout */
.task-card-description.line-clamp-2 img {
  max-height: 60px !important;
  margin: 0.25rem 0 !important;
}

/* Compact image mode for inline editing in TaskCards */
.ProseMirror .tiptap-image[data-compact="true"],
.prose .tiptap-image[data-compact="true"] {
  max-width: 150px !important;
  max-height: 80px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
  margin: 0.25rem 0 !important;
}
