/*
 * Break-In archive page and [breakin_issue] shortcode.
 * Registered as style "breakin" in inc/breakin.php.
 */

/* Year navigation (archive page) */
.archive-year-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1em;
  margin: 2em 0;
}
.archive-year-nav__prev { justify-self: start; }
.archive-year-nav__next { justify-self: end; }
.archive-year-nav__select { margin: 0; }
.archive-year-nav select {
  padding: 0.4em 0.8em;
  font-size: 1em;
  min-width: 7em;
  text-align: center;
}
.archive-year-nav a { text-decoration: none; }

/* Cache refresh notice (archive page, editors only) */
.bi-notice {
  padding: 0.6em 1em;
  border-left: 4px solid #46b450;
  background: #f0f8f0;
}
.bi-notice--error { border-left-color: #dc3232; background: #fbeaea; }

/* Cover images (archive page and shortcode) */
.bi-cover {
  display: block;
  max-width: 100%;
  height: auto;
  aspect-ratio: 250 / 353;
  object-fit: cover;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.bi-image-link { display: block; line-height: 0; }
.bi-image-link:hover .bi-cover,
.bi-image-link:focus-visible .bi-cover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

/* [breakin_issue] shortcode: inline-block so the container's text alignment
   (e.g. Divi's Text Alignment setting) positions the cover; a caption
   follows the same alignment. */
.bi-issue {
  display: inline-block;
  vertical-align: top;
}
/* The shortcode uses <span>s (so it can sit inside a <p>); make the figure
   and caption spans behave like the <figure>/<figcaption> they stand for. */
.bi-issue .bi-figure,
.bi-issue .bi-caption { display: block; }

/* Cover captions */
.bi-figure { margin: 0; }
.bi-caption {
  margin-top: 0.6em;
  font-size: 0.85em;
  line-height: 1.4;
  color: #666;
}

/* Description layout (archive page) */
.bi-description { margin: 0.5em 0 1.5em; }
.bi-description--with-image {
  display: flex;
  gap: 2em;
  align-items: flex-start;
}
.bi-description__main { flex: 1 1 auto; min-width: 0; }
.bi-description__images {
  flex: 0 0 250px;
  display: flex;
  flex-direction: column;
  gap: 1em;
}
.bi-toc { margin: 0.5em 0 0 1.2em; padding: 0; }
.bi-toc li { margin-bottom: 0.3em; }
.bi-title { font-weight: 600; }
.bi-author { font-style: italic; }
.bi-author::before { content: "\2014\00a0"; font-style: normal; }

@media (max-width: 700px) {
  .bi-description--with-image { flex-direction: column; }
  .bi-description__images { flex-basis: auto; }
}
