
/* /src/components/artifacts/email-draft-editor.css */
.email-draft-editor .tiptap {
  :first-child {
    margin-top: 0;
  }
  outline: none;
  padding: 0;
  /* Font size for email templates */
  font-size: 0.875rem; /* 14px - text-sm */
  line-height: 1.4;
  tab-size: 8;
  user-select: text;
  min-height: 100%;
  width: 100%;

  /* Add spacing between paragraphs */
  p {
    margin-bottom: 0.5rem;
  }

  p:last-child {
    margin-bottom: 0;
  }

  /* List styles */
  ul,
  ol {
    margin-left: 24px;
    margin-bottom: 1rem;

    li p {
      margin-top: 0.25em;
      margin-bottom: 0.25em;
    }
  }

  ul {
    list-style-type: disc;
  }

  ol {
    list-style-type: decimal;
  }

  /* Blockquote styles */
  blockquote {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid #e5e7eb;
    font-style: italic;
    color: #6b7280;
  }
}

/* Dark mode blockquote */
.dark .email-draft-editor .tiptap blockquote {
  border-left-color: #4b5563;
  color: #9ca3af;
}

.email-draft-editor .email-draft-subject {
  min-height: 1.5rem;
}

.email-draft-editor .email-draft-subject p {
  margin-bottom: 0;
}

/* Placeholder styles */
.email-draft-editor .tiptap p.is-editor-empty:first-child::before {
  color: var(--muted-foreground);
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
  /* Align with text-sm used by the editor */
  font-size: 0.875rem;
  line-height: inherit;
}

/* Variable mention styles */
.email-draft-editor .tiptap .variable-mention {
  background-color: #e0f2fe;
  color: #0369a1;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  white-space: nowrap;
}

.email-draft-editor .tiptap .variable-mention:hover {
  background-color: #bae6fd;
}

.email-draft-editor .tiptap .variable-mention.ProseMirror-selectednode {
  outline: 2px solid #0284c7;
  outline-offset: 1px;
}

.email-draft-editor .tiptap a {
  color: #2563eb;
  text-decoration: underline;
}

.email-draft-editor .tiptap a:hover {
  color: #1d4ed8;
}

/* Dark mode variable mention styles */
.dark .email-draft-editor .tiptap .variable-mention {
  background-color: hsl(200 80% 20%);
  color: hsl(200 90% 70%);
}

.dark .email-draft-editor .tiptap .variable-mention:hover {
  background-color: hsl(200 80% 25%);
}

.dark .email-draft-editor .tiptap .variable-mention.ProseMirror-selectednode {
  outline: 2px solid hsl(200 90% 50%);
}

.dark .email-draft-editor .tiptap a {
  color: #93c5fd;
}

.dark .email-draft-editor .tiptap a:hover {
  color: #bfdbfe;
}


/* /src/components/conversation/input/text-editor/styles.css */
.conversation-text-editor .tiptap {
  :first-child {
    margin-top: 0;
  }
  outline: none;
  padding: 0;
  /* Match Tailwind text-sm default line-height (leading-5) for perfect caret centering */
  line-height: 1.25rem;
  tab-size: 8;
  user-select: text;
  height: 100%;
  width: 100%;

  /* Remove default paragraph margins so single-line input looks centered */
  p {
    margin: 0;
  }

  /* List styles */
  ul,
  ol {
    margin-left: 24px;

    li p {
      margin-top: 0.25em;
      margin-bottom: 0.25em;
    }
  }

  ul {
    list-style-type: disc;
  }

  ol {
    list-style-type: decimal;
  }
}

/* Placeholder styles - Note: Inside .tiptap didn't work when deployed */
.conversation-text-editor .tiptap p.is-editor-empty:first-child::before {
  color: var(--muted-foreground);
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
  /* Align with text-sm used by the editor */
  font-size: 0.875rem;
  line-height: inherit;
}

/* Mention styles */
.mention {
  padding: 0 0.2rem;
  border-radius: 0.4rem;
}

.mention.conversation-user-mention {
  background-color: hsl(var(--blue-100));
  color: hsl(var(--blue-500));
}

.mention.task-mention {
  background-color: hsl(var(--purple-100));
  color: hsl(var(--purple-500));
}

.mention.attachment-mention {
  background-color: hsl(var(--green-100));
  color: hsl(var(--green-500));
}

/* Dark theme mention styles */
.dark .mention.conversation-user-mention {
  background-color: hsl(var(--blue-700) / 0.3);
  color: hsl(var(--blue-200));
}

.dark .mention.task-mention {
  background-color: hsl(var(--purple-700) / 0.3);
  color: hsl(var(--purple-200));
}

.dark .mention.attachment-mention {
  background-color: hsl(var(--green-700) / 0.3);
  color: hsl(var(--green-200));
}
