/* Tiptap Editor - Dark Theme Styles */
/* Matches the CodersGrove dark theme */

/* Editor Container */
.tiptap-editor {
  border: 1px solid #27272a; /* dark-border */
  border-radius: 0.5rem;
  background-color: #18181b; /* dark-card */
  overflow: hidden;
}

/* Toolbar */
.tiptap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  background-color: #27272a; /* dark-border */
  border-bottom: 1px solid #27272a;
}

.tiptap-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e4e4e7; /* dark-light */
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tiptap-toolbar-btn:hover {
  background-color: #3f3f46; /* zinc-700 */
  color: #ffffff;
}

.tiptap-toolbar-btn.active {
  background-color: #0ea5e9; /* info */
  color: #ffffff;
}

.tiptap-toolbar-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.5); /* info with opacity */
}

.tiptap-toolbar-separator {
  width: 1px;
  height: 1.5rem;
  margin: 0 0.25rem;
  background-color: #3f3f46; /* zinc-700 */
  align-self: center;
}

/* Editor Content Area */
.tiptap-editor-content {
  min-height: 150px;
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
}

/* ProseMirror Styles */
.tiptap-prose {
  color: #f4f4f5; /* zinc-100 */
  font-size: 1rem;
  line-height: 1.625;
  outline: none;
}

.tiptap-prose:focus {
  outline: none;
}

/* Placeholder */
.tiptap-prose p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: #71717a; /* zinc-500 */
  float: left;
  height: 0;
  pointer-events: none;
}

/* Typography */
.tiptap-prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f4f4f5;
  margin: 1.5rem 0 0.75rem;
  line-height: 1.3;
}

.tiptap-prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f4f4f5;
  margin: 1.25rem 0 0.5rem;
  line-height: 1.4;
}

.tiptap-prose p {
  margin: 0 0 1rem;
}

.tiptap-prose p:last-child {
  margin-bottom: 0;
}

/* Bold, Italic, Strike */
.tiptap-prose strong {
  font-weight: 700;
  color: #ffffff;
}

.tiptap-prose em {
  font-style: italic;
}

.tiptap-prose s {
  text-decoration: line-through;
  color: #a1a1aa; /* dark-muted */
}

/* Lists */
.tiptap-prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
}

.tiptap-prose ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin: 0.5rem 0 1rem;
}

.tiptap-prose li {
  margin: 0.25rem 0;
}

.tiptap-prose li > p {
  margin: 0;
}

/* Blockquote */
.tiptap-prose blockquote {
  border-left: 4px solid #0ea5e9; /* info */
  padding-left: 1rem;
  margin: 1rem 0;
  color: #d4d4d8; /* zinc-300 */
  font-style: italic;
  background-color: rgba(14, 165, 233, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 0 0.25rem 0.25rem 0;
}

/* Code */
.tiptap-prose code {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.875em;
  background-color: #27272a; /* dark-border */
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #0ea5e9; /* info */
}

/* Code Block */
.tiptap-prose pre {
  background-color: #09090b; /* dark-bg */
  border: 1px solid #27272a; /* dark-border */
  border-radius: 0.375rem;
  padding: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
}

.tiptap-prose pre code {
  background-color: transparent;
  padding: 0;
  color: #f4f4f5;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Horizontal Rule */
.tiptap-prose hr {
  border: none;
  border-top: 1px solid #27272a; /* dark-border */
  margin: 1.5rem 0;
}

/* Links (if added later) */
.tiptap-prose a {
  color: #0ea5e9; /* info */
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tiptap-prose a:hover {
  color: #38bdf8; /* info-light */
}

/* Scrollbar styling */
.tiptap-editor-content::-webkit-scrollbar {
  width: 8px;
}

.tiptap-editor-content::-webkit-scrollbar-track {
  background: #18181b;
}

.tiptap-editor-content::-webkit-scrollbar-thumb {
  background-color: #3f3f46;
  border-radius: 4px;
}

.tiptap-editor-content::-webkit-scrollbar-thumb:hover {
  background-color: #52525b;
}

/* Focus state for the whole editor */
.tiptap-editor:focus-within {
  border-color: #0ea5e9; /* info */
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

