@use "sass:map";
@use "src/css/quasar.variables.scss";

.q-editor-custom {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  background: #{map.get($colors, "surface")};
}

.q-editor-custom :deep(.q-editor__toolbar) {
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

.q-editor-custom :deep(.q-editor__content) {
  min-height: 200px;
  padding: 16px;
}

.q-editor-custom :deep(.q-editor__content p) {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.q-editor-custom :deep(.q-editor__content ul),
.q-editor-custom :deep(.q-editor__content ol) {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.q-editor-custom :deep(.q-editor__content li) {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.q-editor-custom :deep(.q-editor__content h1),
.q-editor-custom :deep(.q-editor__content h2),
.q-editor-custom :deep(.q-editor__content h3),
.q-editor-custom :deep(.q-editor__content h4),
.q-editor-custom :deep(.q-editor__content h5),
.q-editor-custom :deep(.q-editor__content h6) {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.q-editor-custom :deep(.q-editor__content h1) {
  font-size: 1.75rem;
}

.q-editor-custom :deep(.q-editor__content h2) {
  font-size: 1.5rem;
}

.q-editor-custom :deep(.q-editor__content h3) {
  font-size: 1.25rem;
}

.q-editor-custom :deep(.q-editor__content blockquote) {
  border-left: 4px solid #1976d2;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
}

.q-editor-custom :deep(.q-editor__content a) {
  color: #1976d2;
  text-decoration: underline;
}

.q-editor-custom :deep(.q-editor__content a:hover) {
  color: #1565c0;
}

.q-editor-custom :deep(.q-editor__content hr) {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
  .q-editor-custom :deep(.q-editor__toolbar) {
    flex-wrap: wrap;
  }

  .q-editor-custom :deep(.q-editor__toolbar .q-btn-group) {
    margin: 2px;
  }
}
