/* Wiki Sidebar — Game Info Navigation */

/* Flex layout wrapper (injected by sidebar.js) */
.wiki-layout {
  display: flex;
  gap: 0;
}

/* Desktop sidebar */
.wiki-sidebar {
  width: 260px;
  min-width: 260px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.85);
  border-right: 1px solid rgba(200, 200, 25, 0.2);
  padding: 1.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

.wiki-sidebar::-webkit-scrollbar {
  width: 5px;
}

.wiki-sidebar::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

/* Hub link at top */
.wiki-sidebar .wiki-hub-link {
  display: block;
  padding: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
  color: #c8c819;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(200, 200, 25, 0.15);
  padding-bottom: 0.75rem;
}

.wiki-sidebar .wiki-hub-link:hover {
  color: #fff;
}

.wiki-sidebar .wiki-hub-link i {
  margin-right: 0.4rem;
}

/* Section headers */
.wiki-sidebar .wiki-section-title {
  color: #c8c819;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.25rem 0.25rem;
  margin: 0;
}

/* Page links */
.wiki-sidebar .wiki-nav-link {
  display: block;
  padding: 0.35rem 1.25rem 0.35rem 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.85rem;
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.wiki-sidebar .wiki-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.wiki-sidebar .wiki-nav-link.active {
  color: #fff;
  font-weight: 600;
  border-left-color: #c8c819;
  background: rgba(200, 200, 25, 0.08);
}

/* Content area takes remaining space */
.wiki-layout > .container {
  flex: 1;
  min-width: 0;
}

/* Mobile: hide desktop sidebar, show toggle */
@media (max-width: 991.98px) {
  .wiki-sidebar.wiki-sidebar-desktop {
    display: none;
  }

  .wiki-layout {
    display: block;
  }
}

/* Mobile toggle button */
.wiki-sidebar-toggle {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(200, 200, 25, 0.4);
  color: #c8c819;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 0.4rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, color 0.2s;
}

.wiki-sidebar-toggle:hover {
  border-color: #c8c819;
  color: #fff;
}

@media (max-width: 991.98px) {
  .wiki-sidebar-toggle {
    display: flex;
  }
}

/* Offcanvas overrides for dark theme */
.offcanvas.wiki-offcanvas {
  background: rgba(15, 15, 15, 0.97);
  border-right: 1px solid rgba(200, 200, 25, 0.2);
  max-width: 280px;
}

.offcanvas.wiki-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(200, 200, 25, 0.15);
  padding: 1rem 1.25rem;
}

.offcanvas.wiki-offcanvas .offcanvas-title {
  color: #c8c819;
  font-weight: 700;
  font-size: 1rem;
}

.offcanvas.wiki-offcanvas .btn-close {
  filter: invert(1);
}

.offcanvas.wiki-offcanvas .offcanvas-body {
  padding: 0;
}

/* Reuse same link/section styles inside offcanvas */
.offcanvas.wiki-offcanvas .wiki-section-title {
  color: #c8c819;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.25rem 0.25rem;
  margin: 0;
}

.offcanvas.wiki-offcanvas .wiki-nav-link {
  display: block;
  padding: 0.45rem 1.25rem 0.45rem 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.offcanvas.wiki-offcanvas .wiki-nav-link:hover {
  color: #fff;
}

.offcanvas.wiki-offcanvas .wiki-nav-link.active {
  color: #fff;
  font-weight: 600;
  border-left-color: #c8c819;
  background: rgba(200, 200, 25, 0.08);
}

.offcanvas.wiki-offcanvas .wiki-hub-link {
  display: block;
  padding: 0.65rem 1.25rem;
  color: #c8c819;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(200, 200, 25, 0.15);
}

.offcanvas.wiki-offcanvas .wiki-hub-link:hover {
  color: #fff;
}

/* Print: hide all sidebar elements */
@media print {
  .wiki-sidebar,
  .wiki-sidebar-toggle,
  .offcanvas.wiki-offcanvas {
    display: none !important;
  }
}
