/* TipTap Editor Styles */
.ProseMirror {
  outline: none;
  padding: 1rem;
  min-height: 200px;
}

.ProseMirror p.is-editor-empty:first-child::before {
  color: #adb5bd;
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3,
.ProseMirror h4,
.ProseMirror h5,
.ProseMirror h6 {
  line-height: 1.1;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.ProseMirror h1 {
  font-size: 2.25rem;
}

.ProseMirror h2 {
  font-size: 1.875rem;
}

.ProseMirror h3 {
  font-size: 1.5rem;
}

.ProseMirror h4 {
  font-size: 1.25rem;
}

.ProseMirror h5 {
  font-size: 1.125rem;
}

.ProseMirror h6 {
  font-size: 1rem;
}

.ProseMirror p {
  margin: 1rem 0;
}

.ProseMirror ul,
.ProseMirror ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.ProseMirror li {
  margin: 0.25rem 0;
}

.ProseMirror blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280;
}

.ProseMirror code {
  background-color: #f3f4f6;
  border-radius: 0.25rem;
  padding: 0.125rem 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

.ProseMirror pre {
  background-color: #1f2937;
  color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
}

.ProseMirror pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

.ProseMirror table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
}

.ProseMirror table td,
.ProseMirror table th {
  border: 1px solid #d1d5db;
  padding: 0.5rem;
  text-align: left;
}

.ProseMirror table th {
  background-color: #f9fafb;
  font-weight: 600;
}

.ProseMirror img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.ProseMirror a {
  color: #3b82f6;
  text-decoration: underline;
  cursor: pointer;
}

.ProseMirror a:hover {
  color: #1d4ed8;
}

.ProseMirror mark {
  background-color: #fef3c7;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}

.ProseMirror .task-list-item {
  list-style: none;
  display: flex;
  align-items: flex-start;
  margin: 0.25rem 0;
}

.ProseMirror .task-list-item input[type="checkbox"] {
  margin-right: 0.5rem;
  margin-top: 0.125rem;
}

.ProseMirror .mention {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

.ProseMirror hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2rem 0;
}

/* Focus styles */
.ProseMirror:focus {
  outline: none;
}

/* Selection styles */
.ProseMirror .selectedCell:after {
  z-index: 2;
  position: absolute;
  content: "";
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(200, 200, 255, 0.4);
  pointer-events: none;
}

.ProseMirror .column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: -2px;
  width: 4px;
  background-color: #3b82f6;
  pointer-events: none;
}

.ProseMirror .resize-cursor {
  cursor: ew-resize;
  cursor: col-resize;
}

/* Bubble menu styles */
.bubble-menu {
  display: flex;
  background-color: #1f2937;
  padding: 0.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.bubble-menu button {
  background: none;
  border: none;
  color: #f9fafb;
  padding: 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.bubble-menu button:hover {
  background-color: #374151;
}

.bubble-menu button.is-active {
  background-color: #3b82f6;
}

/* Floating menu styles */
.floating-menu {
  display: flex;
  background-color: #1f2937;
  padding: 0.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.floating-menu button {
  background: none;
  border: none;
  color: #f9fafb;
  padding: 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.floating-menu button:hover {
  background-color: #374151;
}

.floating-menu button.is-active {
  background-color: #3b82f6;
}