/* =====================================================================
   Elit Gastro — block editor styles

   Loaded by `add_editor_style('resources/css/editor.css')` in app/setup.php.
   Goal: make the Gutenberg editing canvas look like a clean preview of
   the published page — same fonts, same heading scale, same spacing.
   This file deliberately covers only the editing canvas (block content),
   never the Gutenberg chrome around it.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --eg-ink:        #000000;
  --eg-ink-soft:   #000000;
  --eg-muted:      #000000;
  --eg-gold:       #f4c241;
  --eg-paper:      #FFFFFF;
  --eg-paper-tint: #FAFAF7;
  --eg-line:       #ececec;

  --eg-font-display: 'Bricolage Grotesque', ui-serif, Georgia, serif;
  --eg-font-body:    'Manrope', ui-sans-serif, system-ui, sans-serif;
}

/* Editor canvas — applies to the block list and the post title. */
.editor-styles-wrapper,
.block-editor-block-list__layout {
  font-family: var(--eg-font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--eg-ink);
}

/* Post title — match the front-end hero/title scale */
.editor-post-title__input,
.editor-post-title,
.wp-block-post-title,
h1.wp-block-post-title {
  font-family: var(--eg-font-display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--eg-ink);
  margin-bottom: 0.5em;
}

/* --- 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: var(--eg-font-display);
  font-weight: 600;
  color: var(--eg-ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
}
.editor-styles-wrapper h1 { font-size: 40px; letter-spacing: -0.02em; }
.editor-styles-wrapper h2 { font-size: 30px; }
.editor-styles-wrapper h3 { font-size: 24px; }
.editor-styles-wrapper h4 { font-size: 20px; }
.editor-styles-wrapper h5 { font-size: 16px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--eg-muted); }
.editor-styles-wrapper h6 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em;  color: var(--eg-muted); }

/* First heading in a block should not push the whole flow down. */
.editor-styles-wrapper > * > h1:first-child,
.editor-styles-wrapper > * > h2:first-child,
.editor-styles-wrapper > * > h3:first-child { margin-top: 0; }

/* --- Body text ---------------------------------------------------- */
.editor-styles-wrapper p {
  margin: 0 0 1em;
  font-family: var(--eg-font-body);
}
.editor-styles-wrapper p.has-large-font-size { line-height: 1.4; }
.editor-styles-wrapper p.has-x-large-font-size { line-height: 1.25; }

/* --- Inline ------------------------------------------------------- */
.editor-styles-wrapper a {
  color: var(--eg-ink);
  text-decoration: underline;
  text-decoration-color: var(--eg-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
.editor-styles-wrapper a:hover { color: var(--eg-gold); }

.editor-styles-wrapper strong, .editor-styles-wrapper b { font-weight: 600; }
.editor-styles-wrapper em, .editor-styles-wrapper i { font-style: italic; }

.editor-styles-wrapper mark {
  background: rgba(253,191,0,0.25);
  padding: 0 3px;
  border-radius: 2px;
}

.editor-styles-wrapper code,
.editor-styles-wrapper kbd,
.editor-styles-wrapper samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--eg-paper-tint);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--eg-line);
}

/* --- Lists -------------------------------------------------------- */
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
.editor-styles-wrapper li { margin: 0.35em 0; }
.editor-styles-wrapper li > ul,
.editor-styles-wrapper li > ol { margin: 0.35em 0 0; }

/* --- Quotes ------------------------------------------------------- */
.editor-styles-wrapper blockquote,
.editor-styles-wrapper .wp-block-quote {
  margin: 1.5em 0;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--eg-gold);
  color: var(--eg-ink-soft);
  font-style: normal;
}
.editor-styles-wrapper blockquote p,
.editor-styles-wrapper .wp-block-quote p {
  font-family: var(--eg-font-display);
  font-size: 20px;
  line-height: 1.45;
  margin-bottom: 0.5em;
}
.editor-styles-wrapper .wp-block-quote cite,
.editor-styles-wrapper blockquote cite {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--eg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 8px;
}

.editor-styles-wrapper .wp-block-pullquote {
  border-top: 2px solid var(--eg-ink);
  border-bottom: 2px solid var(--eg-ink);
  padding: 28px 0;
  text-align: left;
}
.editor-styles-wrapper .wp-block-pullquote p {
  font-family: var(--eg-font-display);
  font-size: 26px;
  line-height: 1.3;
  font-weight: 500;
}

/* --- Code block --------------------------------------------------- */
.editor-styles-wrapper pre,
.editor-styles-wrapper .wp-block-code,
.editor-styles-wrapper .wp-block-preformatted {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--eg-paper-tint);
  border: 1px solid var(--eg-line);
  border-radius: 8px;
  padding: 14px 16px;
  line-height: 1.55;
  overflow-x: auto;
}
.editor-styles-wrapper pre code,
.editor-styles-wrapper .wp-block-code code {
  background: transparent;
  border: 0;
  padding: 0;
}

/* --- Tables ------------------------------------------------------- */
.editor-styles-wrapper .wp-block-table table,
.editor-styles-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 1em 0;
}
.editor-styles-wrapper th,
.editor-styles-wrapper td {
  padding: 10px 12px;
  border: 1px solid var(--eg-line);
  text-align: left;
  vertical-align: top;
}
.editor-styles-wrapper th {
  background: var(--eg-paper-tint);
  font-family: var(--eg-font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eg-muted);
}

/* --- Images + figures -------------------------------------------- */
.editor-styles-wrapper figure { margin: 1.2em 0; }
.editor-styles-wrapper figcaption,
.editor-styles-wrapper .wp-element-caption {
  font-size: 13px;
  color: var(--eg-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.45;
}
.editor-styles-wrapper img { border-radius: 6px; }

/* --- Buttons (block) --------------------------------------------- */
.editor-styles-wrapper .wp-block-button__link {
  font-family: var(--eg-font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--eg-ink);
  color: var(--eg-paper);
  text-decoration: none;
}
.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1.5px solid var(--eg-ink);
  color: var(--eg-ink);
}

/* --- Separator --------------------------------------------------- */
.editor-styles-wrapper hr,
.editor-styles-wrapper .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--eg-line);
  margin: 2em auto;
  max-width: 100%;
}
.editor-styles-wrapper .wp-block-separator.is-style-dots {
  border-top: 0;
  text-align: center;
  line-height: 1;
}
.editor-styles-wrapper .wp-block-separator.is-style-dots::before {
  content: "···";
  color: var(--eg-gold);
  font-size: 22px;
  letter-spacing: 0.4em;
}

/* --- Captions on cover/image blocks ------------------------------ */
.editor-styles-wrapper .wp-block-cover { border-radius: 12px; overflow: hidden; }

/* --- Sensible max-width inside the editor ------------------------ */
.editor-styles-wrapper .wp-block { max-width: 820px; }
.editor-styles-wrapper .wp-block[data-align="wide"]  { max-width: 1100px; }
.editor-styles-wrapper .wp-block[data-align="full"]  { max-width: none; }
