/*
 * Bernays Academy — Gutenberg / Block Editor Styles
 * Ensures the block editor matches front-end typography.
 */

/* ── Editor container width ─────────────────────────────── */
.editor-styles-wrapper {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

/* ── Headings ───────────────────────────────────────────── */
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
  font-family: 'DM Serif Display', Georgia, serif;
  color: #2f4379;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.editor-styles-wrapper h1 { font-size: 2.75rem; }
.editor-styles-wrapper h2 { font-size: 2rem; }
.editor-styles-wrapper h3 { font-size: 1.5rem; }
.editor-styles-wrapper h4 { font-size: 1.1875rem; }

/* ── Paragraph ──────────────────────────────────────────── */
.editor-styles-wrapper p {
  font-weight: 300;
  margin-bottom: 1.5em;
}

/* ── Links ──────────────────────────────────────────────── */
.editor-styles-wrapper a {
  color: #2f4379;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.editor-styles-wrapper a:hover { color: #81a5d8; }

/* ── Blockquote ─────────────────────────────────────────── */
.editor-styles-wrapper blockquote,
.wp-block-quote {
  border-left: 3px solid #81a5d8 !important;
  padding: 16px 24px !important;
  background: #f7f8fc;
  border-radius: 0 4px 4px 0;
  margin: 32px 0 !important;
}
.editor-styles-wrapper blockquote p,
.wp-block-quote p {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #2f4379;
  font-weight: 400;
}
.wp-block-quote cite {
  font-size: 0.875rem;
  color: #9e9e9e;
  font-style: normal;
}

/* ── Lists ──────────────────────────────────────────────── */
.editor-styles-wrapper ul:not([class]),
.editor-styles-wrapper ol:not([class]) {
  padding-left: 1.5rem;
  margin-bottom: 1.5em;
}
.editor-styles-wrapper ul:not([class]) li,
.editor-styles-wrapper ol:not([class]) li {
  margin-bottom: 0.5em;
  font-weight: 300;
}
.editor-styles-wrapper ul:not([class]) { list-style: disc; }

/* ── Images ─────────────────────────────────────────────── */
.editor-styles-wrapper figure img,
.wp-block-image img {
  border-radius: 8px;
}
.wp-block-image figcaption {
  font-size: 0.8125rem;
  color: #9e9e9e;
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* ── Separator ──────────────────────────────────────────── */
.wp-block-separator {
  border: none;
  border-top: 1.5px solid #e8e8e8;
  margin: 40px 0;
}
.wp-block-separator.is-style-wide { border-color: #81a5d8; opacity: 0.3; }

/* ── Buttons ────────────────────────────────────────────── */
.wp-block-button .wp-block-button__link {
  background: #81a5d8;
  color: #fff;
  border-radius: 4px;
  padding: 14px 28px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s;
}
.wp-block-button .wp-block-button__link:hover {
  background: #a8c3e8;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1.5px solid #2f4379;
  color: #2f4379;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #2f4379;
  color: #fff;
}

/* ── Cover block ────────────────────────────────────────── */
.wp-block-cover {
  border-radius: 8px;
  overflow: hidden;
}

/* ── Code ───────────────────────────────────────────────── */
.editor-styles-wrapper code,
.wp-block-code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background: #f7f8fc;
  border: 1px solid #e8e8e8;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.875em;
  color: #2f4379;
}
.wp-block-code {
  padding: 20px 24px;
  border-radius: 6px;
  overflow-x: auto;
}

/* ── Table ──────────────────────────────────────────────── */
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.wp-block-table th {
  background: #2f4379;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.wp-block-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;
  font-weight: 300;
  color: #333;
}
.wp-block-table tr:nth-child(even) td { background: #f7f8fc; }

/* ── Block colours ──────────────────────────────────────── */
.has-navy-color           { color: #2f4379 !important; }
.has-navy-background-color{ background-color: #2f4379 !important; }
.has-steel-color          { color: #81a5d8 !important; }
.has-steel-background-color { background-color: #81a5d8 !important; }
.has-white-color          { color: #ffffff !important; }
.has-white-background-color { background-color: #ffffff !important; }
.has-charcoal-color       { color: #212121 !important; }
.has-charcoal-background-color { background-color: #212121 !important; }
.has-grey-color           { color: #9e9e9e !important; }
