/* Logs page specifics — main content + right-side version nav */
.logs-layout {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 2rem;
  align-items: start;
}

.log-entry { }
.log-entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-bottom: 0.3rem; }
.log-entry__version { font-size: 1.6rem; font-weight: 800; color: var(--ink-900); letter-spacing: -0.02em; }
.log-entry__date { color: var(--ink-400); font-size: 0.9rem; }

.log-section { margin-top: 1.6rem; }
.log-section h3 { display: flex; align-items: center; gap: 0.5rem; }
.log-tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.16rem 0.55rem; border-radius: 999px;
}
.log-tag--new { color: #1f7a54; background: rgba(31,122,84,0.12); }
.log-tag--improve { color: var(--accent-strong); background: var(--accent-soft); }
.log-tag--note { color: #9a6b16; background: rgba(154,107,22,0.12); }

/* Right-side version navigation */
.logs-nav {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.logs-nav h4 {
  margin: 0 0 0.8rem;
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-400);
}
/* Space each product's heading off the list above it. Previously an inline
   style repeated on every heading of all 24 log pages. */
.logs-nav h4 + * + h4,
.logs-nav ul + h4 { margin-top: 1.2rem; }
.logs-nav__back {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-400);
}
/* The hidden attribute only sets display:none through a UA rule, which the
   display declarations below would otherwise beat. Without this, the lists
   js/site.js hides stay on the page. */
.logs-nav [hidden] { display: none; }

/* Product picker. The dropdown names the product, so js/site.js hides each
   list's own heading once it has read the option labels off them.

   Built from a button and a list rather than a <select>, because a native
   select's options are drawn by the operating system and cannot be styled.
   The look mirrors the header's Platforms dropdown (.nav__dd in
   shared/layout.css) so the site has one dropdown, not two. */
.logs-picker { position: relative; margin-bottom: 0.8rem; }

.logs-picker__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--glass-strong);
  color: var(--ink-900);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.logs-picker__toggle::after {
  content: "▾";
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 0.16s ease;
}
.logs-picker.is-open .logs-picker__toggle::after { transform: rotate(180deg); }
.logs-picker__toggle:hover { background: var(--white); border-color: var(--silver-400); }

.logs-picker__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 5;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.logs-picker__option {
  /* Overrides the global li margin in main.css, which would otherwise space
     the options apart like list items. */
  margin: 0;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--ink-700);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.logs-picker__option:hover,
.logs-picker__option:focus {
  background: var(--glass);
  color: var(--ink-900);
  outline: none;
}
.logs-picker__option[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.logs-picker__toggle:focus-visible,
.logs-picker__option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.logs-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }

/* Longer lists scroll instead of running down the page. js/site.js adds this
   class and sets the max-height from the measured position of the fifth row.
   The height is deliberately not computed here: row spacing also depends on the
   global `li { margin: 0.3em 0 }` in main.css, which grid does not collapse, so
   arithmetic in this file would be wrong the moment that rule moved. */
.logs-nav ul.is-scrollable {
  overflow-y: auto;
  /* Room for the scrollbar so it never sits on top of the "Latest" pill. */
  padding-right: 0.4rem;
  /* Firefox and modern Chromium. The WebKit rules below cover Safari, which
     has no support for these two and needs the pseudo-elements instead. */
  scrollbar-width: thin;
  scrollbar-color: var(--silver-400) transparent;
}
.logs-nav ul.is-scrollable::-webkit-scrollbar { width: 8px; }
.logs-nav ul.is-scrollable::-webkit-scrollbar-track { background: transparent; }
.logs-nav ul.is-scrollable::-webkit-scrollbar-thumb {
  /* A transparent border clipped to the content box insets the thumb, so it
     reads as a slim pill rather than filling the whole gutter. */
  background: var(--silver-400);
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
.logs-nav ul.is-scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--silver-600);
  background-clip: content-box;
}
.logs-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: var(--ink-700);
  font-weight: 600; font-size: 0.92rem;
}
.logs-nav a:hover { text-decoration: none; background: var(--glass-strong); color: var(--ink-900); }
.logs-nav a.is-current { background: var(--accent-soft); color: var(--accent-strong); }
.logs-nav a .latest { font-size: 0.66rem; font-weight: 700; color: #1f7a54; background: rgba(31,122,84,0.12); padding: 0.1rem 0.4rem; border-radius: 999px; }

@media (max-width: 860px) {
  .logs-layout { grid-template-columns: 1fr; }
  .logs-nav { position: static; order: -1; }
}
