/* Basic editor styles */
.tiptap {
  :first-child {
    margin-top: 0;
  }

  /* List styles */
  ul, 
  ol {
    padding: 0 1rem;
    margin: 1.25rem 1rem 1.25rem 0.4rem;
    
    li p {
      margin-top: 0.25em;
      margin-bottom: 0.25em;
    }
  }

  /* Heading styles */
  h1, 
  h2, 
  h3, 
  h4, 
  h5, 
  h6 {
    line-height: 1.1;
    margin-top: 2.5rem;
    text-wrap: pretty;
  }

  h1, 
  h2 {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
  }

  h1 { 
    font-size: 1.4rem; 
  }

  h2 { 
    font-size: 1.2rem; 
  }

  h3 { 
    font-size: 1.1rem; 
  }

  h4, 
  h5, 
  h6 { 
    font-size: 1rem; 
  }

  /* Code and preformatted text styles */
  code {
    background-color: var(--purple-light);
    border-radius: 0.4rem;
    color: var(--black);
    font-size: 0.85rem;
    padding: 0.25em 0.3em;
  }

  pre {
    background: var(--black);
    border-radius: 0.5rem;
    color: var(--white);
    font-family: 'JetBrainsMono', monospace;
    margin: 1.5rem 0;
    padding: 0.75rem 1rem;

    code {
      background: none;
      color: inherit;
      font-size: 0.8rem;
      padding: 0;
    }
  }

  blockquote {
    border-left: 3px solid var(--gray-3);
    margin: 1.5rem 0;
    padding-left: 1rem;
  }

  hr {
    border: none;
    border-top: 1px solid var(--gray-2);
    margin: 2rem 0;
  }
}

/* Demo styling */
#app {
  gap: 1rem;
  padding: 1.5rem;
}

/* Textarea styling */
textarea,
.textarea {
  border-radius: 0.5rem;
  border: 1px solid var(--gray-3);
  color: var(--black);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  padding: 0.375rem 0.625rem;
  transition: all .2s cubic-bezier(0.65,0.05,0.36,1);

  &:hover {
    border-color: var(--gray-4);
    color: var(--black-contrast);
  }

  &[disabled] {
    background: var(--gray-1);
    color: var(--gray-4);
  }

  &:checked {
    accent-color: var(--purple);
  }

  &::placeholder {
    color: var(--gray-4);
  }

  &:focus-visible, 
  &:focus {
    border-color: var(--purple);
    outline: none;
  }

  &.primary {
    background: var(--black);
    color: var(--white);

    &:hover {
      background-color: var(--black-contrast);
    }

    &[disabled] {
      background: var(--gray-1);
      color: var(--gray-4);
    }
  }

  &.is-active {
    background: var(--purple);
    color: var(--white);

    &:hover {
      background-color: var(--purple-contrast);
      color: var(--white);
    }
  }
}
