/* === Global Dark Theme === */
html, body {
  background: #0f172a !important;  /* dark slate background */
  color: #e5e7eb !important;       /* light text */
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

/* Navigation bar (top) */
nav, .navbar, .md-header, .md-nav {
  background: #1e293b !important;
  color: #e5e7eb !important;
}

/* Sidebar */
.md-sidebar, .sidebar {
  background: #0f172a !important;
  color: #cbd5e1 !important;
}

/* Links */
a { color: #7fb0ff !important; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Headings */
h1, h2, h3, h4, h5 {
  color: #e8edf7 !important;
  margin: 1em 0 0.4em;
  line-height: 1.3;
}

/* Paragraphs */
p { color: #d1d5db !important; margin: 0.5em 0; }

/* Lists */
ul, ol { margin: 0.35em 0 1em 1.2em; }
li { margin: 0.2em 0; color: #dbeafe; }

/* Horizontal Rule */
hr { border: none; height: 1px; background: #233657; margin: 1em 0; }

/* Code & Pre */
code, pre {
  background: #111827 !important;
  color: #e0f2fe !important;
  font-family: Consolas, "Courier New", monospace;
}
pre { padding: 0.6em; border-radius: 6px; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { border: 1px solid #233657; padding: 0.5em; }
th { background: #1e293b; color: #f1f5f9; }
tbody tr:nth-child(odd) { background: #0f1a2a; }

/* === Collapsible Sections (Custom Drops, Patch Notes, Guides) === */
details {
  margin: 0.6em 0 1em;
  border: 1px solid #2a4474;
  border-radius: 8px;
  background: #0e1b32;
}
summary {
  padding: 0.5em 0.8em;
  font-weight: 700;
  color: #cfe3ff;
  cursor: pointer;
}
details[open] summary {
  background: #10213b;
  border-bottom: 1px solid #233657;
}
details > *:not(summary) {
  padding: 0.6em 1em;
  color: #e2e8f0 !important;
}

/* === Custom Drops Item Highlight === */
.drop-item {
  color: #ffca28 !important;   /* gold */
  font-weight: 700;
}

/* === Patch Notes Box === */
.pa-pn {
  background: #0e1b32 !important;
  border: 1px solid #2a4474;
  border-radius: 8px;
  margin: 0.6em 0 1em;
}
.pa-pn p { color: #e2e8f0 !important; line-height: 1.65; }

/* === Guides & Fixes Box === */
.pa-guide {
  background: #0e1b32 !important;
  border: 1px solid #2a4474;
  border-radius: 8px;
  margin: 0.6em 0 1em;
  padding: 0.8em 1em;
}
.pa-guide h3, .pa-guide h2 { color: #93c5fd !important; }
.pa-guide p, .pa-guide li { color: #e2e8f0 !important; }

/* Blockquotes (used in Guides) */
blockquote {
  margin: 0.8em 0;
  padding: 0.5em 0.75em;
  border-left: 4px solid #30518c;
  background: #0c1a30;
  color: #cbd5e1;
}

/* === Force dark theme for "??? note" collapsibles (pymdownx.details) === */
details.admonition,
details.admonition.note,
.admonition.note {
  background: #0e1b32 !important;
  border: 1px solid #2a4474 !important;
  border-radius: 8px !important;
  margin: 0.6em 0 1em !important;
  color: #e2e8f0 !important;
}

details.admonition > summary.admonition-title,
.admonition > summary.admonition-title {
  background: #10213b !important;
  color: #cfe3ff !important;
  font-weight: 700 !important;
  padding: 0.55em 0.85em !important;
  border-bottom: 1px solid #233657 !important;
  cursor: pointer;
  list-style: none;
}

details.admonition > *:not(summary),
.admonition > *:not(summary) {
  padding: 0.6em 1em !important;
  color: #e2e8f0 !important;
}

/* Headings & lists inside the boxes */
details.admonition h2, details.admonition h3,
.admonition h2, .admonition h3 { color: #e8edf7 !important; }
details.admonition ul, .admonition ul { margin-left: 1.15rem !important; }
details.admonition li, .admonition li { color: #dbeafe !important; line-height: 1.55; }

/* Blockquotes, code inside */
details.admonition blockquote, .admonition blockquote {
  border-left: 4px solid #30518c !important;
  background: #0c1a30 !important;
  color: #cbd5e1 !important;
  margin: 0.8em 1em !important;
  padding: 0.55em 0.8em !important;
}
details.admonition code, .admonition code,
details.admonition pre, .admonition pre {
  background: #111827 !important;
  color: #e0f2fe !important;
}

/* Make sure our plain <details> boxes also stay dark (Custom Drops) */
details { background: #0e1b32 !important; border: 1px solid #2a4474 !important; }
details > summary { background: #10213b !important; color: #cfe3ff !important; border-bottom: 1px solid #233657 !important; }

/* Highlight item names (unchanged) */
.drop-item { color: #ffca28 !important; font-weight: 700; }

/* --- Opaque backdrop for legacy in-game browser (Chrome 43) --- */
html, body {
  background: #0f172a !important;    /* your dark base */
  height: 100%;
}

body::before {
  content: "";
  position: fixed;     /* cover the whole webview */
  top: 0; left: 0; right: 0; bottom: 0;
  background: #0f172a; /* solid, no transparency */
  z-index: 0;          /* stay behind actual content */
}

/* ensure all main content paints above the backdrop */
header, nav, .navbar, .container, .content, .row, .col-md-9, .col-md-12,
main, article, section, footer, #content, #main_content {
  position: relative;
  z-index: 1;
}

/* Global text & link color (force over Bootstrap defaults) */
body, p, li, td, th { color:#e5e7eb !important; }
h1, h2, h3, h4 { color:#f1f5f9 !important; }

a { color:#7fb0ff !important; }
a:hover { color:#a8c7ff !important; text-decoration: underline; }

/* Make admonition (??? note) summaries and bodies dark */
details.admonition,
details.admonition.note,
.admonition.note {
  background:#0e1b32 !important;
  border:1px solid #2a4474 !important;
  border-radius:8px !important;
  margin:0.6em 0 1em !important;
  color:#e2e8f0 !important;
}
details.admonition > summary.admonition-title,
.admonition > summary.admonition-title {
  background:#10213b !important;
  color:#cfe3ff !important;
  font-weight:700 !important;
  padding:0.55em 0.85em !important;
  border-bottom:1px solid #233657 !important;
}
details.admonition > *:not(summary),
.admonition > *:not(summary) {
  padding:0.6em 1em !important;
  color:#e2e8f0 !important;
}

/* Plain <details> (Custom Drops) keep the same dark style */
details {
  background:#0e1b32 !important;
  border:1px solid #2a4474 !important; border-radius:8px !important;
}
details > summary {
  background:#10213b !important; color:#cfe3ff !important;
  border-bottom:1px solid #233657 !important;
}

/* Lists inside boxes */
details ul, .admonition ul { margin-left:1.15rem !important; }
details li, .admonition li { color:#dbeafe !important; line-height:1.55; }

/* Code blocks readable on dark */
code, pre { background:#111827 !important; color:#e0f2fe !important; }

/* Custom Drops item highlight */
.drop-item { color:#ffca28 !important; font-weight:700; }

/* Navbar / top menu (classic theme) */
.navbar,
.navbar-default {
  background: #1e293b !important;
  border: 0 !important;
  position: relative;
  z-index: 3; /* above everything */
}

.navbar-default .navbar-brand,
.navbar-default .navbar-nav > li > a,
.navbar-default .navbar-text {
  color: #e5e7eb !important;
}

.navbar-default .navbar-brand:hover,
.navbar-default .navbar-nav > li > a:hover {
  color: #ffffff !important;
  background: #0f172a !important;
}

/* The search form in the classic theme */
.navbar-form,
.navbar-form .form-control,
#search-query {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
}

#search-query::placeholder { color: #94a3b8; }

/* Dropdown menus (e.g., Events) */
.dropdown-menu {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
}
.dropdown-menu > li > a { color: #e5e7eb !important; }
.dropdown-menu > li > a:hover { background: #1e293b !important; color: #fff !important; }

/* Nav bar & brand */
.navbar, .navbar-default { background:#1e293b !important; border:0 !important; z-index:3; }
.navbar-default .navbar-brand,
.navbar-default .navbar-nav > li > a,
.navbar-default .navbar-text { color:#e5e7eb !important; }

/* Collapsed (mobile / small viewport) hamburger button */
.navbar-toggle { border:1px solid #334155 !important; background:#0f172a !important; margin:8px; }
.navbar-toggle .icon-bar {
  display:block; width:22px; height:2px; margin:4px 0;
  background:#e5e7eb !important;     /* <- the three bars */
}

/* Dropdown / collapsed menu panel */
.navbar-collapse, .collapse.navbar-collapse {
  background:#0f172a !important; border:1px solid #334155 !important;
}
.navbar-default .navbar-nav > li > a:hover { background:#0f172a !important; color:#ffffff !important; }

/* Dropdown menus */
.dropdown-menu { background:#0f172a !important; border:1px solid #334155 !important; }
.dropdown-menu > li > a { color:#e5e7eb !important; }
.dropdown-menu > li > a:hover { background:#1e293b !important; color:#fff !important; }

/* Search input in the navbar (classic theme) */
.navbar-form, .navbar-form .form-control, #search-query {
  background:#0f172a !important; color:#e5e7eb !important; border:1px solid #334155 !important; box-shadow:none !important;
}
#search-query::placeholder { color:#94a3b8; }

/* MkDocs classic search modal (Bootstrap) */
#mkdocs-search-modal .modal-content { background:#0f172a !important; color:#e5e7eb !important; border:1px solid #334155 !important; }
#mkdocs-search-modal .modal-header,
#mkdocs-search-modal .modal-footer { border-color:#334155 !important; }
#mkdocs-search-modal .modal-title { color:#e5e7eb !important; }
#mkdocs-search-modal .form-control { background:#0f172a !important; color:#e5e7eb !important; border:1px solid #334155 !important; }
.modal-backdrop { background:#000 !important; opacity:0.6 !important; }

/* === Heading sizes: H1≈old H2; H2≈old H3; H3 a bit above text === */
h1 { font-size: 1.6rem !important; }
h2 { font-size: 1.3rem !important; }
h3 { font-size: 1.12rem !important; font-weight: 600 !important; }

/* ===== Lite navbar dropdown on hover (legacy safe) ===== */

/* No bullets in nav or dropdown */
.navbar-nav, .navbar-nav ul {
  list-style: none !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Main row tidy */
.navbar-nav { display: block !important; }
.navbar-nav > li { display: inline-block !important; margin: 0 8px 0 0 !important; }
.navbar-nav > li > a { display: inline-block !important; padding: 4px 8px !important; font-size: 13px !important; }

/* Right-side controls in row 2 */
.navbar-nav + .navbar-nav {
  display: block !important;
  text-align: right !important;
  margin-top: 6px !important;
}
.navbar-nav + .navbar-nav > li { display: inline-block !important; margin-left: 12px !important; }

/* Dropdown hidden by default, shown on hover */
.navbar-nav li.dropdown { position: relative !important; }
.navbar-nav li.dropdown > ul {
  display: none !important;
  position: absolute !important;
  top: 100% !important; left: 0 !important;
  min-width: 180px !important;
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  padding: 4px 0 !important;
  z-index: 10 !important;
}
/* REMOVE this: it forces the dropdown open everywhere */
/* .navbar-nav li.dropdown:hover > ul { display: block !important; } */

.navbar-nav li.dropdown > ul > li > a {
  display: block !important;
  padding: 6px 12px !important;
  color: #e5e7eb !important;
  text-decoration: none !important;
}
.navbar-nav li.dropdown > ul > li > a:hover {
  background: #1e293b !important;
  color: #fff !important;
}

/* --- Force dropdown hover menu (no JS) --- */
.navbar-nav li {
  position: relative !important;
}

.navbar-nav li ul.dropdown-menu {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  min-width: 180px !important;
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  padding: 4px 0 !important;
  z-index: 999 !important;
}

.navbar-nav li:hover > ul.dropdown-menu {
  display: block !important;
}

.navbar-nav li ul.dropdown-menu li a {
  display: block !important;
  padding: 6px 12px !important;
  color: #e5e7eb !important;
  text-decoration: none !important;
}
.navbar-nav li ul.dropdown-menu li a:hover {
  background: #1e293b !important;
  color: #fff !important;
}

/* Lite local left menu for Events */
.lite-localmenu { 
  margin: 10px 0 16px; 
  padding: 10px 12px; 
  border: 1px solid #334155; 
  border-radius: 8px; 
  background: #0f172a;
}

.lite-localmenu__title {
  font-weight: 700;
  color: #cfe3ff;
  margin-bottom: 6px;
}

.lite-localmenu .nav.flex-column { margin: 0; padding: 0; list-style: none; }
.lite-localmenu .nav-link { 
  display: block; 
  padding: 6px 4px; 
  color: #9db6d7 !important; 
  text-decoration: none !important; 
}
.lite-localmenu .nav-link:hover { color: #ffffff !important; background: #1e293b; border-radius: 6px; }
.lite-localmenu .nav-link.active { color: #ffffff !important; font-weight: 700; }

/* Events sidebar (flows with content; no overlay) */
#eventsSidebar {
  display: none;           /* only on event pages (via body.show-events) */
  float: left;             /* push content to the right */
  width: 220px;
  margin: 10px 16px 10px 0;
  padding: 8px 0;
  background: #0e1b32;
  border: 1px solid #2a4474;
  border-radius: 8px;
}
#eventsSidebar .ev-title {
  font-weight: 700;
  color: #cfe3ff;
  padding: 8px 12px;
  border-bottom: 1px solid #233657;
  margin-bottom: 6px;
}
#eventsSidebar a {
  display: block;
  padding: 8px 12px;
  color: #e5e7eb;
  text-decoration: none;
  border-radius: 6px;
}
#eventsSidebar a:hover { background: #1e293b; color: #fff; }

/* When the sidebar is visible */
body.show-events #eventsSidebar { display: block; }

/* Clear float at end of content so footer doesn’t wrap oddly */
.ev-clear { clear: both; height: 1px; }

/* Hide any caret added by Bootstrap */
.navbar-nav .caret,
.navbar-nav .dropdown-toggle::after { display: none !important; content: none !important; }

/* Final override: never open dropdowns on hover in Lite */
.navbar-nav li:hover > ul.dropdown-menu,
.navbar-nav li.dropdown:hover > ul { display: none !important; }

/* Make the Events box scroll when it grows */
#eventsSidebar {
  max-height: calc(100vh - 140px); /* stay within the viewport */
  overflow: auto;                  /* show a scrollbar as needed */
}

/* Sidebar shell */
#eventsSidebar{
  float:left;
  width: 260px;                 /* a bit wider for long names */
  margin: 10px 16px 10px 0;
  padding: 0;
  background: #0e1b32;
  border: 1px solid #2a4474;
  border-radius: 8px;
}

/* Title stays visible while the list scrolls */
#eventsSidebar .ev-title{
  font-weight: 700;
  color: #cfe3ff;
  padding: 10px 12px;
  border-bottom: 1px solid #233657;
  position: sticky;
  top: 0;
  background: #0e1b32;
  z-index: 2;
}

/* The actual scrolling area */
#eventsSidebar .ev-list{
  max-height: 60vh;             /* primary cap */
  height: 220px;                /* fallback for old browsers */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 8px;
}

/* Links inside the scroller */
#eventsSidebar .ev-list a{
  display:block;
  padding: 8px 12px;
  color: #e5e7eb;
  text-decoration:none;
  border-radius: 6px;
  white-space: nowrap;          /* keep one line */
  overflow: hidden;             /* clip if too long */
  text-overflow: ellipsis;
}
#eventsSidebar .ev-list a:hover{
  background:#1e293b;
  color:#fff;
}

/* optional: slimmer legacy scrollbar */
#eventsSidebar .ev-list::-webkit-scrollbar{ width:10px; }
#eventsSidebar .ev-list::-webkit-scrollbar-thumb{ background:#334155; border-radius:6px; }
#eventsSidebar .ev-list::-webkit-scrollbar-track{ background:#0f172a; }


