/* Rich-text editor styles - Dark theme compatible */
[data-richtext-container] {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  padding: 0;
  margin-top: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-richtext-toolbar] {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  flex-wrap: wrap;
  align-items: center;
}

[data-richtext-toolbar] button {
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s ease;
}

[data-richtext-toolbar] button:hover {
  background: rgba(255,255,255,0.10);
}

/* Richtext toolbar select with custom arrow */
[data-richtext-toolbar] select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 6px 28px 6px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.06) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="rgba(255,255,255,0.75)" d="M1 0L5 4L9 0L10 1L5 6L0 1z"/></svg>') no-repeat;
  background-position: right 8px center;
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s ease;
}

[data-richtext-toolbar] select:hover {
  background-color: rgba(255,255,255,0.10);
}

[data-richtext-toolbar] select:focus {
  outline: none;
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
}

/* Style the dropdown options */
[data-richtext-toolbar] select option {
  background: rgba(20, 24, 36, 0.98);
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  padding: 6px;
}

[data-richtext-toolbar] select option:checked,
[data-richtext-toolbar] select option:hover {
  background: rgba(124, 92, 255, 0.25);
  color: rgba(255,255,255,0.98);
}

[data-richtext-toolbar] input[type="color"] {
  width: 40px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
}

[data-richtext-toolbar] label {
  color: rgba(255,255,255,0.88);
  font-weight: 700;
  font-size: 13px;
}

[data-richtext-editor] {
  min-height: 160px;
  padding: 12px;
  outline: none;
  font-size: 15px;
  line-height: 1.6;
  overflow-y: auto;
  max-height: 500px;
  color: rgba(255,255,255,0.92);
}

[data-richtext-editor]:empty:before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,0.45);
}

/* Note history */
.note-history {
  margin-top: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.note-history-toggle {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.75);
  font-weight: 800;
  transition: background 0.12s ease;
}

.note-history-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
}

.note-history-items {
  display: none;
  margin-top: 12px;
}

.note-history-items.expanded {
  display: block;
}

.note-item {
  padding: 12px;
  margin-top: 8px;
  border-left: 3px solid rgba(124, 92, 255, 0.35);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.035));
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
}

.note-item .muted {
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.65);
}

.note-body {
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
}

/* Public note cards */
.public-note {
  margin-top: 12px !important;
}

.public-note-title {
  font-weight: 900;
  font-size: 16px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.92);
}

.public-note-body {
  margin-top: 10px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
}

.public-note-body p {
  margin: 8px 0;
}

.public-note-body ul,
.public-note-body ol {
  padding-left: 22px;
  margin: 8px 0;
}

.public-note-body li {
  margin: 4px 0;
}
