.a8-widget h1,
.a8-widget h2,
.a8-widget h3,
.a8-widget h4,
.a8-widget h5,
.a8-widget h6 {
  margin-top: unset !important;
  margin-bottom: unset !important;
  font-weight: unset !important;
  font-size: unset !important;
  line-height: unset !important;
}

.a8-widget input,
.a8-widget button,
.a8-widget select,
.a8-widget optgroup,
.a8-widget textarea {
  margin: unset !important;
  /* color: unset !important; */
  font-size: unset !important;
  font-family: unset !important;
  line-height: unset !important;
}
.markdown-editor-container {
  width: 100%;
  margin-bottom: 16px;
}

.markdown-editor-viewer {
  width: 100%;
}

.markdown-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
  padding: 8px;
  background-color: #f5f5f5;
  border-radius: 6px;
  border: 1px solid #d9d9d9;
}

.markdown-editor-textarea-wrapper {
  width: 100%;
}

.markdown-editor-textarea {
  width: 100%;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}

.markdown-editor-split-view {
  display: flex;
  gap: 16px;
  width: 100%;
}

.markdown-editor-split-pane {
  flex: 1;
  min-width: 0;
}

.markdown-editor-pane-label {
  font-weight: 500;
  margin-bottom: 8px;
  color: #595959;
  font-size: 13px;
}

.markdown-editor-preview {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
}

.markdown-editor-preview h1 {
  font-size: 32px;
  font-weight: bold;
  margin: 16px 0 12px 0;
  padding: 0;
  border-bottom: 2px solid #e8e8e8;
  padding-bottom: 8px;
}

.markdown-editor-preview h2 {
  font-size: 28px;
  font-weight: bold;
  margin: 14px 0 10px 0;
  padding: 0;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 6px;
}

.markdown-editor-preview h3 {
  font-size: 24px;
  font-weight: bold;
  margin: 12px 0 8px 0;
  padding: 0;
}

.markdown-editor-preview h4 {
  font-size: 20px;
  font-weight: bold;
  margin: 10px 0 8px 0;
  padding: 0;
}

.markdown-editor-preview h5 {
  font-size: 16px;
  font-weight: bold;
  margin: 8px 0 6px 0;
  padding: 0;
}

.markdown-editor-preview h6 {
  font-size: 14px;
  font-weight: bold;
  margin: 8px 0 6px 0;
  padding: 0;
  color: #666;
}

.markdown-editor-preview p {
  margin: 12px 0;
}

.markdown-editor-preview a {
  color: #1890ff;
  text-decoration: none;
}

.markdown-editor-preview a:hover {
  text-decoration: underline;
}

.markdown-editor-preview code {
  background-color: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 3px;
  padding: 2px 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 13px;
  color: #c7254e;
}

.markdown-editor-preview pre {
  background-color: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  margin: 12px 0;
}

.markdown-editor-preview pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  color: #333;
  font-size: 13px;
  line-height: 1.6;
}

.markdown-editor-preview blockquote {
  border-left: 4px solid #1890ff;
  margin: 12px 0;
  padding: 8px 16px;
  background-color: #f0f8ff;
  color: #595959;
}

.markdown-editor-preview blockquote p {
  margin: 4px 0;
}

.markdown-editor-preview ul {
  list-style: disc;
  padding-left: 32px;
  margin: 12px 0;
}

.markdown-editor-preview ol {
  list-style: decimal;
  padding-left: 32px;
  margin: 12px 0;
}

.markdown-editor-preview li {
  margin: 4px 0;
}

.markdown-editor-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  border: 1px solid #e8e8e8;
}

.markdown-editor-preview th {
  background-color: #fafafa;
  border: 1px solid #e8e8e8;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
}

.markdown-editor-preview td {
  border: 1px solid #e8e8e8;
  padding: 8px 12px;
}

.markdown-editor-preview tr:nth-child(even) {
  background-color: #fafafa;
}

.markdown-editor-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 12px 0;
}

.markdown-editor-preview hr {
  border: none;
  border-top: 2px solid #e8e8e8;
  margin: 20px 0;
}

/* Task list styles (GFM) */
.markdown-editor-preview input[type="checkbox"] {
  margin-right: 8px;
}

/* Strikethrough (GFM) */
.markdown-editor-preview del {
  text-decoration: line-through;
  color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
  .markdown-editor-split-view {
    flex-direction: column;
  }

  .markdown-editor-toolbar {
    gap: 2px;
  }
}
