/* ==========================================================================
   Uncle Leo's Bakery - what only WordPress needs.

   styles.css is the hand-built site's stylesheet, used exactly as it was written and never edited. This file adds:
     1. the admin bar's offset for the fixed header (logged-in users only);
     2. the journal, search results, the 404 page and ordinary WordPress pages, built from the pieces styles.css
        already has (page hero, paper and kraft, section head, .cards / .card / .frame, note card, doors, buttons).
        Nothing here names a colour, a size or a texture: every value is one of styles.css's own tokens.

   It is not loaded for a visitor on a page made of sections: those pages get styles.css and nothing else.
   ========================================================================== */

/* ---------- 1. Admin bar ---------- */
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.admin-bar .skip-link:focus { top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--s-4)); }
html.admin-bar, .admin-bar { scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--strip-h) + 4.5rem); }
@media (max-width: 900px) {
  /* the phone menu is a full-screen sheet under the header: it starts under the admin bar too */
  .admin-bar .nav-list { top: var(--wp-admin--admin-bar--height, 46px); }
}
@media (max-width: 600px) {
  /* WordPress lets its bar scroll away on a phone; the header is fixed, so the bar stays with it */
  .admin-bar #wpadminbar { position: fixed; }
}

/* ---------- 2. Journal ---------- */

/* The cards of the home page's cabinet, as a grid (styles.css: .cards, .card, .frame) */
.journal-cards { align-items: start; }
.journal-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.journal-card-photo { display: block; width: 100%; }
.journal-card .card-name a { transition: color .3s; }
.journal-card .card-name a:hover { color: var(--gold-800); }
.journal-card .card-desc { max-width: none; }
.journal-card .link-arrow { margin-top: var(--s-4); }
.journal-card .card-fr time { font: inherit; }
/* An article without a photograph: the house seal on the photograph's own mat */
.journal-blank { display: grid; place-items: center; aspect-ratio: 4 / 5; }
.journal-blank::after { display: none; }
.journal-blank .logo-seal { width: 42%; color: var(--kraft-400); }
/* The green band of these pages (.journal-hero marks the ones the theme draws itself): a title of any length, on one line of words */
.journal-hero .hero-title { font-size: var(--text-2xl); line-height: 1.04; }
.journal-hero .hero-title em { display: inline; }

/* Newer / Page 1 of 3 / Older: the row under a carousel (styles.css: .btn, .carousel-btn, .carousel-arrow, .carousel-count) */
.journal-pages { margin-top: var(--s-8); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-4); }

/* Nothing here yet / nothing found: the order page's empty card */
.journal-empty { text-align: center; }
.journal-empty .btn { align-self: center; }

/* Search: one field and its button, as the enquiry form sets them */
.journal-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4); max-width: 40rem; margin-bottom: var(--s-8); }
.journal-search .field { flex: 1 1 16rem; }

/* One article */
.journal-layout { display: grid; gap: var(--s-8); justify-items: center; }
.journal-layout > * { width: 100%; max-width: 46rem; min-width: 0; }
.journal-layout > .journal-figure { max-width: 60rem; }
.journal-figure img { aspect-ratio: 3 / 2; height: auto; }
.journal-hero .hero-lede time { font: inherit; }
.journal-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--line-gold); }
.journal-nav p { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.journal-nav .journal-nav-next { align-items: flex-end; text-align: right; }
.journal-nav .card-fr { margin-top: 0; }
.journal-nav .link-arrow { margin-top: var(--s-2); text-transform: none; letter-spacing: 0; font: 400 var(--text-md)/1.3 var(--font-display); }
.link-arrow--back { flex-direction: row-reverse; }
.link-arrow--back::after { transform: scaleX(-1); }
.link-arrow--back:hover::after { transform: scaleX(-1) translateX(5px); }
.journal-parts { font-size: var(--text-sm); color: var(--ink-500); }

/* ---------- 3. An article's own content: core blocks in the site's type.
   .is-root-container is the same content in the block editor (this file is an editor style too), so an article is
   written in the type it will be read in. ---------- */
:is(.entry-content, .is-root-container) { color: var(--ink-700); font-size: var(--text-md); line-height: 1.7; }
.entry-content > * + * { margin-top: var(--s-5); }
.entry-content > :first-child { margin-top: 0; }
:is(.entry-content, .is-root-container) :is(h1, h2, h3, h4, h5, h6) { color: var(--green-900); font-family: var(--font-display); font-weight: 400; letter-spacing: -0.012em; }
:is(.entry-content, .is-root-container) :is(h1, h2) { font-size: var(--text-xl); line-height: 1.15; }
:is(.entry-content, .is-root-container) h3 { font-size: var(--text-lg); line-height: 1.2; }
:is(.entry-content, .is-root-container) :is(h4, h5, h6) { font: 500 var(--text-xs)/1.4 var(--font-body); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--gold-700); }
.entry-content > :is(h1, h2, h3, h4, h5, h6) { margin-top: var(--s-7); }
:is(.entry-content, .is-root-container) strong { font-weight: 500; color: var(--ink-900); }
:is(.entry-content, .is-root-container) a:not([class]) { color: var(--green-900); border-bottom: 1px solid var(--gold-500); transition: color .3s; }
:is(.entry-content, .is-root-container) a:not([class]):hover { color: var(--gold-800); }
:is(.entry-content, .is-root-container) :is(ul, ol):not([class*="blocks-gallery"]) { padding-left: 1.4em; }
:is(.entry-content, .is-root-container) ul:not([class*="blocks-gallery"]) { list-style: disc; }
:is(.entry-content, .is-root-container) ol { list-style: decimal; }
:is(.entry-content, .is-root-container) li + li { margin-top: var(--s-2); }
:is(.entry-content, .is-root-container) li::marker { color: var(--gold-700); }
/* A quotation: the house motto's line and italic, in the paper's ink */
:is(.entry-content, .is-root-container) blockquote { margin-inline: 0; padding-left: var(--s-5); border-left: 1px solid var(--gold-500); }
:is(.entry-content, .is-root-container) blockquote p { font: italic 400 var(--text-xl)/1.25 var(--font-display); color: var(--green-800); }
:is(.entry-content, .is-root-container) blockquote :is(cite, footer) { display: block; margin-top: var(--s-3); font: 400 var(--text-xs)/1.4 var(--font-body); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--gold-700); }
/* Photographs and their captions */
:is(.entry-content, .is-root-container) figure { margin-inline: 0; }
:is(.entry-content, .is-root-container) :is(.wp-block-image, .wp-block-gallery) img { height: auto; border-radius: var(--radius); background: var(--ivory-200); }
:is(.entry-content, .is-root-container) figcaption { margin-top: var(--s-3); font-size: var(--text-sm); line-height: 1.5; color: var(--ink-500); text-align: center; }
:is(.entry-content, .is-root-container) hr { height: 1px; margin-block: var(--s-7); border: 0; background: var(--line-gold); }
/* A table: ruled like the opening hours */
:is(.entry-content, .is-root-container) table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-gold); font-size: var(--text-base); }
:is(.entry-content, .is-root-container) :is(th, td) { padding: var(--s-3) var(--s-3) var(--s-3) 0; border: 0; border-bottom: 1px solid var(--line-gold-soft); text-align: left; font-weight: 400; }
:is(.entry-content, .is-root-container) th { color: var(--green-900); font-weight: 500; }
:is(.entry-content, .is-root-container) :is(code, pre) { font-size: var(--text-sm); background: var(--ivory-100); }
:is(.entry-content, .is-root-container) pre { padding: var(--s-5); overflow: auto; border: 1px dashed var(--kraft-400); }
/* A button block is the site's green button */
:is(.entry-content, .is-root-container) .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--control-h); padding: 0 var(--s-6);
  background: var(--green-900); color: var(--ivory-50); border: 1px solid var(--green-900); border-radius: var(--radius);
  font: 500 var(--text-xs)/1 var(--font-body); letter-spacing: var(--track-caps); text-transform: uppercase; text-decoration: none;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
:is(.entry-content, .is-root-container) .wp-block-button__link:hover { background: var(--green-700); border-color: var(--green-700); }
:is(.entry-content, .is-root-container) .wp-block-separator { opacity: 1; }
/* theme.json sets WordPress's own block gap to zero (it would push the header, the page and the footer apart);
   blocks that lay their children side by side get the site's gap back here */
:is(.entry-content, .is-root-container) :is(.wp-block-columns, .wp-block-gallery, .wp-block-buttons) { gap: var(--s-5); }
.entry-content .alignwide { width: min(100vw - 2 * var(--gutter), 60rem); max-width: none; margin-inline: calc((100% - min(100vw - 2 * var(--gutter), 60rem)) / 2); }
.entry-content .alignleft { float: left; margin: 0 var(--s-5) var(--s-4) 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: 0 0 var(--s-4) var(--s-5); max-width: 50%; }
.entry-content .aligncenter { margin-inline: auto; text-align: center; }
.entry-content::after { content: ""; display: block; clear: both; }
/* The password form of a protected page: the site's field and button */
.entry-content .post-password-form input[type="password"] { min-height: var(--control-h); padding: var(--s-3) var(--s-4); background: var(--ivory-50); border: 1px solid var(--ink-500); border-radius: var(--radius); }
.entry-content .post-password-form input[type="submit"] { min-height: var(--control-h); padding: 0 var(--s-6); background: var(--green-900); color: var(--ivory-50); border: 1px solid var(--green-900); border-radius: var(--radius); font: 500 var(--text-xs)/1 var(--font-body); letter-spacing: var(--track-caps); text-transform: uppercase; cursor: pointer; }

@media (max-width: 600px) {
  .journal-nav { grid-template-columns: 1fr; }
  .journal-nav .journal-nav-next { align-items: flex-start; text-align: left; }
  .journal-search .btn { width: 100%; }
  .entry-content .alignleft, .entry-content .alignright { float: none; max-width: none; margin: 0; }
}
@media print {
  .journal-pages, .journal-nav, .journal-search { display: none !important; }
}
