/* WRLD LOG - Version History panel.

   Deliberately styled to match the WRLD LOG splash modal it is reached from,
   rather than inventing a second look. The splash's own rules are the source of
   truth for the values used here:

     header      font-size 13, weight 700, #fcd34d, letter-spacing .5px, uppercase
     badge pill  rgba(252,211,77,.12) on rgba(252,211,77,.3), uppercase, 1.5px
     chip        rgba(255,255,255,.06) on rgba(255,255,255,.1), text .85 white
     note        10.5px, rgba(255,255,255,.55)
     close       no background, rgba(255,255,255,.3), 20px, white on hover
     dividers    rgba(255,255,255,.06)

   The palette is the splash's gold, not the cyan used elsewhere in this file's
   neighbours - a Version History panel that opened from the WRLD LOG and then
   turned a different colour read as two unrelated features.

   Two things worth knowing about the mobile half:

   1. Bottom navigation. The sheet must clear the 54px nav bar AND the
      home-indicator inset, or the last release is permanently underneath both
      and the list looks like it will not scroll to its end. --mbn-h is defined
      by player-settings.css; reusing it means the two cannot drift apart.

   2. Backdrop-filter. player-settings.css strips backdrop-filter from everything
      under 768px for performance. This panel opts back in with !important at the
      same specificity, or the glass silently vanishes on the device most likely
      to open it. */

.wrldlog-vh-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 7, 18, .35);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.wrldlog-vh-overlay.open { display: flex; }

.wrldlog-vh-panel {
  width: min(700px, 100%);
  max-height: min(84vh, 760px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid rgba(252, 211, 77, .14);
  background: linear-gradient(160deg, rgba(20, 16, 30, .93), rgba(12, 10, 20, .96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  overflow: hidden;
}

/* ---- header: mirrors .shortcuts-modal-header ---- */
.wrldlog-vh-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.wrldlog-vh-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fcd34d;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.wrldlog-vh-count {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, .55);
}
.wrldlog-vh-head-actions { display: flex; align-items: center; gap: 8px; }

/* Mirrors .shortcuts-close - bare glyph, no chrome, brightens on hover. */
.wrldlog-vh-close {
  background: 0 0;
  border: none;
  padding: 0 4px;
  line-height: 1;
  font-size: 20px;
  color: rgba(255, 255, 255, .3);
  cursor: pointer;
  transition: color .15s ease;
}
.wrldlog-vh-close:hover,
.wrldlog-vh-close:focus-visible { color: #fff; outline: none; }

/* The book-open trigger, as it sits in the WRLD LOG header. */
.wrldlog-vh-open {
  background: 0 0;
  border: none;
  padding: 0 2px;
  line-height: 1;
  font-size: 14px;
  color: rgba(252, 211, 77, .55);
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}
.wrldlog-vh-open:hover,
.wrldlog-vh-open:focus-visible { color: #fcd34d; outline: none; transform: translateY(-1px); }

/* ---- search ---- */
.wrldlog-vh-search {
  flex: 0 0 auto;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.wrldlog-vh-search input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font-size: 12px;
}
.wrldlog-vh-search input::placeholder { color: rgba(255, 255, 255, .35); }
.wrldlog-vh-search input:focus {
  outline: none;
  border-color: rgba(252, 211, 77, .45);
  box-shadow: 0 0 0 3px rgba(252, 211, 77, .1);
}

/* ---- list ---- */
.wrldlog-vh-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 12px 16px;
}

.wrldlog-vh-item { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.wrldlog-vh-item:last-child { border-bottom: 0; }
.wrldlog-vh-item[hidden] { display: none; }

.wrldlog-vh-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background .15s ease;
}
.wrldlog-vh-toggle:hover { background: rgba(255, 255, 255, .04); }
.wrldlog-vh-toggle:focus-visible { outline: 1px solid rgba(252, 211, 77, .6); outline-offset: -1px; }

/* Gold, uppercase, letter-spaced - the same treatment the splash gives its badge. */
.wrldlog-vh-v {
  flex: 0 0 auto;
  min-width: 44px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fcd34d;
}

/* Chip text colour, so a collapsed row reads at the same weight as a splash chip. */
.wrldlog-vh-title {
  flex: 1 1 auto;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wrldlog-vh-chev {
  flex: 0 0 auto;
  font-size: 11px;
  color: rgba(255, 255, 255, .3);
  transition: transform .18s ease, color .18s ease;
}
.wrldlog-vh-toggle[aria-expanded="true"] .wrldlog-vh-chev { transform: rotate(90deg); color: #fcd34d; }
.wrldlog-vh-toggle[aria-expanded="true"] .wrldlog-vh-v { color: #fde68a; }

.wrldlog-vh-notes {
  margin: 0;
  padding: 2px 8px 14px 64px;
  font-size: 11.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .6);
}

.wrldlog-vh-empty {
  padding: 30px 12px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, .45);
}

/* Compact summary that replaced the duplicated inline version list on the Vault.
   The full history now lives in exactly one place: this panel. */
.wrldlog-vh-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .85);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease;
}
.wrldlog-vh-summary:hover,
.wrldlog-vh-summary:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.wrldlog-vh-summary .wrldlog-vh-v { min-width: 0; }
.wrldlog-vh-summary-label { margin-left: auto; color: rgba(255, 255, 255, .55); font-weight: 500; white-space: nowrap; }

@media (max-width: 767px) {
  .wrldlog-vh-overlay {
    padding: 0;
    align-items: flex-end;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
  }
  .wrldlog-vh-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
  }
  /* Clear the bottom nav plus the home indicator so the final release is
     reachable rather than permanently hidden behind the nav. */
  .wrldlog-vh-list {
    padding-bottom: calc(20px + var(--mbn-h, 54px) + env(safe-area-inset-bottom, 0px));
  }
  .wrldlog-vh-notes { padding-left: 8px; }
  .wrldlog-vh-title { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .wrldlog-vh-chev,
  .wrldlog-vh-open { transition: none; }
}

/* Scroll lock. Its own class rather than the site-wide `.scroll-locked`, because
   reports.js, suggestions.js, account.js and user-menu.js toggle that one
   directly and would drop this lock on their way past - the same reason the
   Friends & Messages panel keeps its own. */
html.wrldlog-vh-scrolllock,
html.wrldlog-vh-scrolllock body { overflow: hidden !important; }