/* Dark Mode (NVDA add-on) product page: only what the root stylesheet does
   not already provide - the hero's version line and the Change Log dialog.
   Everything else (hero card, carousel, feature sections, buttons, tags)
   comes from ../../style.css. */

.darkmode-subtitle {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--accent-pink);
  font-weight: 600;
}
.product-page .hero h1:has(+ .darkmode-subtitle) {
  margin-bottom: 8px;
}

.darkmode-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 10px;
}
/* Both buttons ship with margin-top: 12px for the card layout; in this flex
   row that made the heart's box taller and pushed it below the centre line. */
.darkmode-actions .btn,
.darkmode-actions .coa-favorite-btn {
  margin: 0;
}

/* Version, update date and Change Log link: between the subtitle and the summary. */
.darkmode-version {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text-color);
}
.darkmode-subtitle:has(+ .darkmode-version) {
  margin-bottom: 6px;
}

.changelog-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent-green);
  text-decoration: underline;
  cursor: pointer;
}
.changelog-link:hover,
.changelog-link:focus-visible {
  color: var(--focus-color);
}

/* Change Log dialog: same flex-split shape as the site's nav modal (a
   non-scrolling header plus a separately scrolling body) - a confirmed
   Chromium bug lets scrolled content paint above a position:sticky header
   inside a position:fixed dialog, so the header is kept out of the scroll
   box entirely. */
.changelog-dialog {
  padding: 0;
  border: 2px solid var(--divider-color);
  border-radius: 12px;
  background-color: var(--surface-color);
  color: var(--text-color);
  width: min(680px, calc(100% - 48px));
  max-height: 85vh;
  overflow: hidden;
}
.changelog-dialog[open] {
  display: flex;
  flex-direction: column;
}
.changelog-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.changelog-dialog-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 2px solid var(--divider-color);
}
/* The dialog title is an h1 for structure (h1 > h2 per release > h3 New /
   Fixes) but sized like every other dialog title on the site. */
.changelog-dialog-header h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}
.changelog-close-btn {
  flex-shrink: 0;
  width: 2.3em;
  height: 2.3em;
  background: transparent;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-color);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.changelog-close-btn:hover,
.changelog-close-btn:focus-visible {
  background-color: var(--border-light);
  color: var(--bg-color);
}
.changelog-dialog-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 22px 22px;
}

/* One <details> per release; the summary carries the <h2> so heading
   navigation walks the versions directly while they still collapse. */
.changelog-entry {
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.changelog-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.changelog-entry > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.changelog-entry > summary::-webkit-details-marker { display: none; }
.changelog-entry > summary::before {
  content: "+";
  color: var(--accent-green);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.changelog-entry[open] > summary::before { content: "\2212"; }
.changelog-entry > summary h2 {
  margin: 0;
  font-size: 19px;
  color: var(--accent-pink);
}
.changelog-entry h3 {
  font-size: 15px;
  color: var(--accent-green);
  margin: 16px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.changelog-entry ul {
  margin: 8px 0 0;
  padding-left: 22px;
}
.changelog-entry li {
  margin-bottom: 9px;
  font-size: 15.5px;
  line-height: 1.5;
}
.changelog-entry li:last-child { margin-bottom: 0; }
