/* assets/css/markdown-editor.css */
.md-editor {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dark .md-editor {
  border-color: #2d2d3d;
  background: #0f0f18;
}
.md-editor:focus-within {
  border-color: #8700af;
  box-shadow: 0 0 0 3px rgba(135, 0, 175, 0.15);
}
.dark .md-editor:focus-within {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}
.md-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem;
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.dark .md-editor-toolbar {
  border-color: #2d2d3d;
  background: #141420;
}
.md-editor-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding-right: 0.375rem;
  margin-right: 0.25rem;
  border-right: 1px solid #e5e7eb;
}
.dark .md-editor-toolbar-group {
  border-color: #2d2d3d;
}
.md-editor-toolbar-group:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}
.md-editor-toolbar-preview {
  margin-left: auto;
  border-right: none;
  padding-right: 0;
}
.md-editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3125rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  line-height: 1;
}
.dark .md-editor-btn {
  color: #9ca3af;
}
.md-editor-btn:hover {
  background: #e5e7eb;
  color: #111827;
}
.dark .md-editor-btn:hover {
  background: #1e1e2d;
  color: #f3f4f6;
}
.md-editor-btn:active {
  background: #d1d5db;
}
.dark .md-editor-btn:active {
  background: #2d2d3d;
}
.md-editor-btn svg {
  flex-shrink: 0;
}
.md-editor-preview-btn {
  padding: 0.3125rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
}
.md-editor-preview-btn.active {
  background: rgba(135, 0, 175, 0.1);
  color: #8700af;
}
.dark .md-editor-preview-btn.active {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}
.md-editor-content {
  flex: 1;
}
.md-editor-content .cm-editor {
  height: 100%;
}
.md-editor-content .cm-focused {
  outline: none;
}
.md-editor-content .cm-content {
  color: #111827;
  caret-color: #111827;
}
.dark .md-editor-content .cm-content {
  color: #f3f4f6;
  caret-color: #f3f4f6;
}
.md-editor-content .cm-placeholder {
  color: #9ca3af;
}
.dark .md-editor-content .cm-placeholder {
  color: #4b5563;
}
.md-editor-content .cm-line strong,
.md-editor-content .cm-line em,
.md-editor-content .cm-line code {
  opacity: 0.9;
}
.md-editor-preview {
  padding: 0.625rem 0.75rem;
  color: #374151;
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-y: auto;
}
.dark .md-editor-preview {
  color: #d1d5db;
}
.md-editor-preview.hidden {
  display: none;
}
.md-editor-preview h1,
.md-editor-preview h2,
.md-editor-preview h3,
.md-editor-preview h4 {
  font-weight: 700;
  color: #111827;
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}
.dark .md-editor-preview h1,
.dark .md-editor-preview h2,
.dark .md-editor-preview h3,
.dark .md-editor-preview h4 {
  color: #f9fafb;
}
.md-editor-preview h1 {
  font-size: 1.5rem;
}
.md-editor-preview h2 {
  font-size: 1.25rem;
}
.md-editor-preview h3 {
  font-size: 1.125rem;
}
.md-editor-preview p {
  margin-bottom: 0.75em;
}
.md-editor-preview strong {
  font-weight: 700;
}
.md-editor-preview em {
  font-style: italic;
}
.md-editor-preview del {
  text-decoration: line-through;
}
.md-editor-preview a {
  color: #8700af;
  text-decoration: underline;
}
.dark .md-editor-preview a {
  color: #a855f7;
}
.md-editor-preview ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-bottom: 0.75em;
}
.md-editor-preview ol {
  list-style: decimal;
  padding-left: 1.5em;
  margin-bottom: 0.75em;
}
.md-editor-preview li {
  margin-bottom: 0.25em;
}
.md-editor-preview blockquote {
  border-left: 3px solid #8700af;
  padding-left: 1em;
  color: #6b7280;
  margin: 0.75em 0;
  font-style: italic;
}
.dark .md-editor-preview blockquote {
  color: #9ca3af;
}
.md-editor-preview pre {
  background: #f3f4f6;
  border-radius: 0.375rem;
  padding: 0.75rem;
  overflow-x: auto;
  margin-bottom: 0.75em;
}
.dark .md-editor-preview pre {
  background: #1e1e2d;
}
.md-editor-preview code {
  background: #f3f4f6;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
  font-family:
    "JetBrains Mono",
    "Fira Code",
    monospace;
}
.dark .md-editor-preview code {
  background: #1e1e2d;
  color: #e2e8f0;
}
.md-editor-preview pre code {
  background: none;
  padding: 0;
}
.md-editor-preview img {
  max-width: 100%;
  border-radius: 0.375rem;
  margin: 0.5em auto;
  display: block;
}
.md-editor-preview iframe {
  max-width: 100%;
  border-radius: 0.375rem;
  margin: 0.5em 0;
}
.md-editor-preview figure {
  margin: 1em 0;
  text-align: center;
}
.md-editor-preview figure img {
  margin: 0 auto 0.375em;
}
.md-editor-preview figcaption {
  font-size: 0.8125rem;
  color: #6b7280;
  font-style: italic;
}
.dark .md-editor-preview figcaption {
  color: #9ca3af;
}
.md-editor-info {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #9ca3af;
  font-size: 0.75rem;
}
.dark .md-editor-info {
  border-color: #2d2d3d;
  background: #141420;
  color: #4b5563;
}
.md-editor-info-link {
  color: #8700af;
  text-decoration: underline;
}
.dark .md-editor-info-link {
  color: #a855f7;
}
.md-editor-info svg {
  flex-shrink: 0;
  opacity: 0.6;
}
.md-modal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.md-modal {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 28rem;
  overflow: hidden;
}
.dark .md-modal {
  background: #1a1a2e;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.md-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}
.dark .md-modal-header {
  border-color: #2d2d3d;
}
.md-modal-title {
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
}
.dark .md-modal-title {
  color: #f9fafb;
}
.md-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.1s;
}
.md-modal-close:hover {
  background: #f3f4f6;
}
.dark .md-modal-close:hover {
  background: #2d2d3d;
}
.dark .md-modal-close {
  color: #9ca3af;
}
.md-modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.md-modal-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}
.dark .md-modal-label {
  color: #d1d5db;
}
.md-modal-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: #ffffff;
  color: #111827;
  outline: none;
  transition: border-color 0.15s;
}
.md-modal-input:focus {
  border-color: #8700af;
  box-shadow: 0 0 0 3px rgba(135, 0, 175, 0.1);
}
.dark .md-modal-input {
  background: #0f0f18;
  border-color: #2d2d3d;
  color: #f3f4f6;
}
.dark .md-modal-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}
.md-modal-input--error {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}
.dark .md-modal-input--error {
  background: #2a1010 !important;
  border-color: #f87171 !important;
}
.md-modal-field-error {
  font-size: 0.8125rem;
  color: #ef4444;
  margin-top: 0.25rem;
  display: none;
}
.dark .md-modal-field-error {
  color: #f87171;
}
.md-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.dark .md-modal-footer {
  border-color: #2d2d3d;
  background: #141420;
}
.md-modal-btn-cancel {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #374151;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.1s;
}
.md-modal-btn-cancel:hover {
  background: #f3f4f6;
}
.dark .md-modal-btn-cancel {
  background: #1e1e2d;
  border-color: #2d2d3d;
  color: #d1d5db;
}
.dark .md-modal-btn-cancel:hover {
  background: #2d2d3d;
}
.md-modal-btn-insert {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #8700af;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: filter 0.1s;
}
.md-modal-btn-insert:hover {
  filter: brightness(1.15);
}
.md-editor-preview details {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
.md-editor-preview summary {
  cursor: pointer;
  font-weight: 600;
  color: #6b7280;
  -webkit-user-select: none;
  user-select: none;
  list-style: none;
}
.md-editor-preview summary::-webkit-details-marker {
  display: none;
}
.md-editor-preview summary::before {
  content: "\25b6";
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 0.75rem;
  transition: transform 0.2s;
}
.md-editor-preview details[open] summary::before {
  transform: rotate(90deg);
}
.md-editor-preview details[open] summary {
  margin-bottom: 0.5rem;
}
.dark .md-editor-preview details {
  border-color: #374151;
}
.dark .md-editor-preview summary {
  color: #9ca3af;
}
/*# sourceMappingURL=editor.css.map */
