/* Public /blog frontend: stark white, Times New Roman, pink (#F37EB5, the
   favicon dot's color) for the section-header banner. Deliberately its own
   visual language, unrelated to the pastel/Inter look used everywhere else
   on the site (including /blog/admin, styled by assets/blog-admin.css) --
   same content classes (.blog-banner, .potato, img sizes, ...), two skins. */

.blog-page {
  background: #fff;
  font-family: "Times New Roman", Times, serif;
  color: #000;
}

.blog-page .header {
  background: #fff;
  outline: none;
  box-shadow: none;
  border-bottom: 1px solid #000;
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
}

.blog-page .header .nav-link {
  font-family: "Times New Roman", Times, serif;
  background: #fff;
  outline: 1px solid #000;
}

/* ---------------------------------------------------------
   layout: diet column first in DOM (naturally first on mobile),
   gallery+post column second (naturally on the right on desktop).
   --------------------------------------------------------- */
.blog-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 28px;
}

@media (min-width: 701px) {
  .blog-layout { flex-direction: row; align-items: flex-start; }
  .diet-col { flex: 0 0 35%; min-width: 0; }
  .blog-main-col { flex: 0 0 65%; min-width: 0; }
}

/* ---------------------------------------------------------
   diet ("garden") tiles
   --------------------------------------------------------- */
.diet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diet-tile {
  border: 1px solid #000;
  padding: 14px 16px;
}

.diet-tile-label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.diet-tile-text { margin-top: 4px; font-size: 1.02rem; }
.diet-tile-empty { margin-top: 4px; font-style: italic; }

.diet-history-toggle {
  display: block;
  margin-top: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  color: inherit;
}

.diet-history {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dotted #000;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diet-history-item { font-size: 0.85rem; display: flex; gap: 6px; }
.diet-history-date { font-style: italic; flex-shrink: 0; }

.post-list-empty { font-style: italic; }

/* ---------------------------------------------------------
   gallery (React + motion) -- structural/layout CSS only; the
   3D transforms themselves are inline styles driven by React state.
   --------------------------------------------------------- */
.gallery-wrap {
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  perspective: 1200px;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.gallery-item {
  display: block;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  outline: 1px solid #000;
}

.gallery-fallback {
  aspect-ratio: 3 / 4;
  background: #F37EB5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  outline: 1px solid #000;
}

.gallery-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}

.gallery-controls button {
  background: none;
  border: none;
  cursor: pointer;
  color: #000;
  padding: 4px;
  display: flex;
}

.gallery-dots { display: flex; align-items: center; gap: 6px; }

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: width 0.25s ease;
}
.gallery-dot.active { width: 20px; border-radius: 4px; }

.blog-gallery-empty {
  text-align: center;
  font-style: italic;
  padding: 40px 0;
}

/* title line stays a plain line of text above the scroll box; the
   gallery itself never moves regardless of what's selected */
.blog-post-titleline {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 24px 0 6px;
}

.blog-post-scrollbox {
  max-height: 48vh;
  overflow-y: auto;
  border: 1px solid #000;
  padding: 20px;
}

/* ---------------------------------------------------------
   content authored by the /blog/admin editor -- these classes are
   what the toolbar actually inserts, styled here for the public site
   --------------------------------------------------------- */
.blog-article { font-size: 1.05rem; line-height: 1.7; }
/* Enter in the editor's contenteditable produces bare <div>s, not <p>s
   (confirmed empirically -- browsers don't reliably honor
   execCommand('defaultParagraphSeparator')), so real saved content is
   div-wrapped lines; style those like paragraphs too. */
.blog-article p, .blog-article div { margin: 0 0 1em; }
.blog-article a { color: #000; }

.blog-article blockquote {
  margin: 1em 0;
  padding: 4px 18px;
  border-left: 2px solid #000;
  font-style: italic;
}

.blog-article code {
  background: #f0f0f0;
  padding: 1px 5px;
  font-family: "Courier New", monospace;
}

.blog-article mark {
  background: #F37EB5;
  color: #fff;
  padding: 0 2px;
}

.blog-article .potato {
  font-style: italic;
  text-decoration: underline wavy #000;
}

.blog-banner {
  background: #F37EB5;
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 14px 20px;
  margin: 24px 0;
  font-family: "Times New Roman", Times, serif;
}

.blog-article img { display: block; outline: 1px solid #000; }
.blog-article .img-sm { max-width: 40%; margin: 1em auto; }
.blog-article .img-md { max-width: 65%; margin: 1em auto; }
.blog-article .img-lg { max-width: 90%; margin: 1em auto; }
.blog-article .img-full { width: 100%; margin: 1em 0; }

.yt-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  outline: 1px solid #000;
  margin: 1em 0;
  cursor: pointer;
}

.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.yt-embed .yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 40px;
  background: #ff0000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-embed .yt-play::after {
  content: '';
  border-style: solid;
  border-width: 9px 0 9px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}
