/* ==========================================================================
   EDITOR - tokens, fonts, typography and block styles for the block editor.
   WordPress scopes this file to the editor canvas.
   ========================================================================== */
@import 'variable.less';
@import 'fonts.less';
@import 'typography.less';
@import 'button.less';
@import 'wp.less';
@import 'wp-polish.less';
@import 'design-extras.less';
@import 'blocks.less';

body {
  padding: var(--space-2);
}

.editor-post-title__input,
.wp-block-post-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-h1);
  line-height: var(--lh-tight);
}

/* Quote: the front-end look (accent bar, heading font). On the site this
   lives inside .entry-content, which the editor canvas does not have. */
.wp-block-quote:not(.is-style-plain) {
  margin: 0 0 var(--space-4);
  padding: var(--space-1) 0 var(--space-1) var(--space-3);
  border-left: 0.1875rem solid var(--color-secondary);
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  line-height: var(--lh-snug);

  p:last-child {
    margin-bottom: 0;
  }

  cite {
    display: block;
    margin-top: var(--space-1);
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-style: normal;
    color: var(--color-text-muted);
  }
}

.wp-block {
  max-width: 50rem;
}

/* Left / right aligned blocks float at the edge of the text column, as on
   the front end, not at the edge of the editor canvas. */
.is-root-container > .alignleft,
.is-root-container > [data-align='left'] {
  margin-left: max(0px, calc((100% - 50rem) / 2));
}

.is-root-container > .alignright,
.is-root-container > [data-align='right'] {
  margin-right: max(0px, calc((100% - 50rem) / 2));
}

.wp-block[data-align='wide'] {
  max-width: 82.5rem;
}

.wp-block[data-align='full'] {
  max-width: none;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
