/* Blog article sidebar (post.hbs <aside>, partials/blog-sidebar.hbs).
 *
 * Own classes, not Tailwind: site.css is a compiled Tailwind bundle from the
 * old Next.js site, so a utility class it never used does not exist in it.
 *
 * Phone and tablet (< 1024px): the aside is full width below the article.
 * The 4 article cards (.bs-desk) are hidden there, as before.
 * Desktop: the aside is 260px and as tall as the article, so the reading
 * progress card (.bs-sticky) can stay on screen while the rest scrolls.
 */
.bs-aside { width: 100%; }
.bs-desk { display: none; }

@media (min-width: 1024px) {
  .bs-aside { width: 260px; align-self: stretch; }
  .bs-desk { display: block; }
  .bs-sticky { position: sticky; top: 7rem; z-index: 2; }
  /* Opaque, so the cards that scroll up under it do not show through. */
  .bs-sticky > div {
    background: linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03)), var(--color-background, #050505) !important;
  }
}

.bs-card {
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bs-h {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 215, 0, 0.6);
  margin: 0 0 1rem;
}
.bs-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Search */
.bs-search { display: flex; }
.bs-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  font-size: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 0;
  border-radius: 0.75rem 0 0 0.75rem;
  outline: none;
}
.bs-search-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.bs-search-input:focus { border-color: rgba(255, 215, 0, 0.5); }
.bs-search-btn {
  padding: 0 1rem;
  font-size: 13px;
  font-weight: 600;
  color: #000;
  background: #ffd700;
  border-radius: 0 0.75rem 0.75rem 0;
  cursor: pointer;
}
.bs-search-btn:hover { background: #ffe44d; }
.bs-results { margin-top: 0.75rem; font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.bs-results ul { list-style: none; margin: 0; padding: 0; }
.bs-results li + li { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.bs-results a { display: block; padding: 0.5rem 0; color: rgba(255, 255, 255, 0.85); }
.bs-results a:hover { color: #ffd700; }

/* Latest posts */
.bs-latest { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.bs-latest-link { display: flex; gap: 0.75rem; align-items: flex-start; }
.bs-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bs-latest-text { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.bs-latest-title {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bs-latest-link:hover .bs-latest-title { color: #ffd700; }
.bs-date { font-size: 11px; color: rgba(255, 255, 255, 0.4); }

/* Categories */
.bs-cats { list-style: none; margin: 0; padding: 0; }
.bs-cats li { border-bottom: 1px dashed rgba(255, 255, 255, 0.1); }
.bs-cats li:last-child { border-bottom: 0; }
.bs-cats a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}
.bs-cats a::before {
  content: "";
  border: 4px solid transparent;
  border-left: 5px solid rgba(255, 215, 0, 0.7);
  border-right: 0;
}
.bs-cats a:hover { color: #ffd700; }

/* Tags */
.bs-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bs-tag {
  padding: 0.35rem 0.75rem;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
}
.bs-tag:hover { color: #ffd700; border-color: rgba(255, 215, 0, 0.5); }
