/*
 * Complex Gaming site navigation: announcement strip, sticky bar, Servers and
 * Guides mega menus, Community dropdown, phone sheet.
 *
 * Self-contained so the XenForo theme can load this same file. Every class is
 * prefixed cx- and every token is --cx-*, so nothing here depends on or
 * collides with mode.css. To restyle, change the tokens below; the markup lives
 * in nav-partial.html and the behaviour in nav.js.
 *
 * The host page must load the "Bowlby One SC" and "Stack Sans Text" fonts.
 */
:root {
  --cx-bg: #16171a;
  --cx-panel: #1d1e21;
  --cx-deep: #111214;
  --cx-slab: #2a2b30;
  --cx-line: #303136;
  --cx-line-strong: #4a4b52;
  --cx-text: #bdbdbd;
  --cx-soft: #e6e6e6;
  --cx-title: #ffffff;
  --cx-gold: #fbcc46;
  --cx-gold-ink: #4a3b0b;
  --cx-gold-hi: #fde08a;
  --cx-gold-lo: #c99f2a;
  --cx-green: #93e15b;
  --cx-green-ink: #14290a;
  --cx-discord: #5b64ea;
  --cx-discord-hi: #8a91f5;
  --cx-discord-lo: #444cc0;
  --cx-display: "Bowlby One SC", "Arial Black", Impact, sans-serif;
  --cx-body: "Stack Sans Text", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --cx-bar-h: 89px;
}

:root { --gutter: 30px; }
@media (max-width: 620px) { :root { --gutter: 18px; } }

/* Layout wrapper (the prototype's .in) */
.cx-in { width: 100%; max-width: 1280px; margin-inline: auto; padding-left: max(var(--gutter, 30px), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter, 30px), env(safe-area-inset-right, 0px)); }

/* News strip */
.cx-news { background: var(--cx-deep); border-bottom: 1px solid var(--cx-line); font-size: 13px; }
.cx-news .cx-in { min-height: 36px; padding-block: 4px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.cx-news-badge { flex-shrink: 0; padding: 2px 8px; border-radius: 4px; background: var(--cx-green); color: var(--cx-green-ink); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cx-news-title { min-width: 0; color: var(--cx-soft); font-weight: 600; }
.cx-news-link { flex-shrink: 0; color: var(--cx-gold); font-weight: 700; text-decoration: none; }
.cx-news-x { flex-shrink: 0; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--cx-text); cursor: pointer; }
.cx-news-x:hover { background: var(--cx-slab); color: var(--cx-title); }

/* Bar */
.cx-bar, .cx-news, .cx-joinstrip { font-family: var(--cx-body); font-size: 15px; line-height: 1.5; color: var(--cx-text); }
.cx-bar *, .cx-news *, .cx-joinstrip * { box-sizing: border-box; }
/* :where() keeps these resets at zero specificity so component rules win. */
:where(.cx-bar, .cx-news) a { color: inherit; }
:where(.cx-bar, .cx-news) button { font: inherit; color: inherit; }
.cx-bar :focus-visible, .cx-news :focus-visible { outline: 2px solid var(--cx-gold); outline-offset: 2px; }
.cx-bar [hidden], .cx-news[hidden], .cx-joinstrip [hidden] { display: none !important; }
.cx-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--cx-bg); border-bottom: 1px solid var(--cx-line); }
.cx-bar-in { height: var(--cx-bar-h); display: flex; align-items: center; gap: 24px; }
.cx-logo { flex-shrink: 0; display: flex; align-items: center; }
.cx-logo img { display: block; width: 150px; height: auto; }
.cx-nav { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; }
.cx-nav-item { height: 44px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--cx-title); font-family: var(--cx-display); font-size: 14px; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; }
.cx-nav-item:hover { background: var(--cx-slab); }
.cx-nav-item[aria-expanded="true"] { background: var(--cx-slab); color: var(--cx-gold); }
.cx-nav-item svg { transition: transform .15s; }
.cx-nav-item[aria-expanded="true"] svg { transform: rotate(180deg); }
.cx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cx-green); }
.cx-nav-pop { position: relative; display: flex; }
.cx-actions { flex-shrink: 0; display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cx-pill { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 6px 0 14px; background: var(--cx-deep); border: 1px solid var(--cx-line); border-radius: 8px; }
.cx-pill-text { display: flex; flex-direction: column; gap: 2px; }
.cx-ip { color: var(--cx-title); font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.cx-count { display: inline-flex; align-items: center; gap: 6px; color: var(--cx-green); font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.cx-live { width: 7px; height: 7px; border-radius: 50%; background: var(--cx-green); }
.cx-btn { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 6px; font-family: var(--cx-display); font-size: 13px; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; }
.cx-btn.cx-gold { background: var(--cx-gold); color: var(--cx-gold-ink); box-shadow: inset 2px 2px 0 var(--cx-gold-hi), inset -2px -2px 0 var(--cx-gold-lo); }
.cx-btn.cx-gold:hover { filter: brightness(1.06); }
.cx-btn.cx-gold.cx-done { background: var(--cx-green); color: var(--cx-green-ink); box-shadow: none; }
.cx-pill .cx-btn { min-height: 40px; }
.cx-btn.cx-discord { background: var(--cx-discord); color: var(--cx-title); box-shadow: inset 2px 2px 0 var(--cx-discord-hi), inset -2px -2px 0 var(--cx-discord-lo); }
.cx-btn.cx-discord:hover { filter: brightness(1.08); }
.cx-btn.cx-ghost { border: 1px solid var(--cx-line-strong); background: transparent; color: var(--cx-soft); }
.cx-burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--cx-title); cursor: pointer; }

/* Menus */
.cx-mega { position: absolute; top: 100%; left: 0; right: 0; }
.cx-mega-panel { margin-top: 10px; padding: 22px; display: grid; gap: 22px; max-height: calc(100dvh - 140px); overflow-y: auto; background: var(--cx-panel); border: 1px solid var(--cx-line); border-radius: 10px; box-shadow: 0 24px 48px rgba(0, 0, 0, .55); }
.cx-mega-servers { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 270px; }
.cx-mega-guides { grid-template-columns: repeat(3, minmax(0, 1fr)) 280px; }
.cx-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cx-col-head { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.cx-col-head img { width: 34px; height: 34px; object-fit: contain; }
.cx-col-title { color: var(--cx-title); font-family: var(--cx-display); font-size: 16px; text-transform: uppercase; line-height: 1.2; }
.cx-col-sub { font-size: 13px; }
.cx-chip { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--cx-deep); color: var(--cx-green); font-size: 12px; font-weight: 700; white-space: nowrap; }
.cx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-tiles.cx-one { grid-template-columns: minmax(0, 1fr); }
.cx-tile { min-height: 76px; padding: 12px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--cx-line); border-radius: 8px; background: var(--cx-bg); text-decoration: none; }
.cx-tile:hover { border-color: var(--cx-gold); }
.cx-tile img { flex-shrink: 0; width: 44px; height: 44px; object-fit: contain; }
.cx-tile-text { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.cx-tile-name { color: var(--cx-title); font-family: var(--cx-display); font-size: 16px; text-transform: uppercase; line-height: 1.1; }
.cx-tile-desc { color: var(--cx-text); font-size: 13px; line-height: 1.35; }
.cx-tile-count { flex-shrink: 0; color: var(--cx-green); font-size: 12px; font-weight: 700; white-space: nowrap; }
.cx-more { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; color: var(--cx-gold); font-size: 14px; font-weight: 700; text-decoration: none; }
.cx-side { padding: 18px; background: var(--cx-bg); border-radius: 8px; gap: 4px; }
.cx-list-title { margin-bottom: 4px; color: var(--cx-gold); font-family: var(--cx-display); font-size: 14px; text-transform: uppercase; line-height: 1.2; }
.cx-side .cx-list-title { color: var(--cx-title); }
.cx-list { display: flex; flex-direction: column; }
.cx-list a { min-height: 44px; padding-block: 6px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--cx-line); color: var(--cx-soft); font-size: 14px; font-weight: 600; text-decoration: none; }
.cx-list a:last-child { border-bottom: 0; }
.cx-list a:hover { color: var(--cx-gold); }
.cx-list img { width: 22px; height: 22px; object-fit: contain; }
.cx-port { margin-top: 8px; padding: 10px 12px; border-radius: 6px; background: var(--cx-panel); font-size: 13px; }
.cx-port b { color: var(--cx-title); }
.cx-search { display: flex; gap: 8px; }
.cx-search input { flex: 1 1 0; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--cx-line-strong); border-radius: 6px; background: var(--cx-deep); color: var(--cx-title); font-family: var(--cx-body); font-size: 14px; }
.cx-search input::placeholder { color: #9a9ca3; }
.cx-search button { flex-shrink: 0; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: var(--cx-slab); color: var(--cx-title); cursor: pointer; }
.cx-search-note { margin: 0; color: var(--demo); font-size: 12px; }
.cx-small-menu { position: absolute; top: calc(100% + 24px); left: 0; width: 320px; padding: 6px 18px; background: var(--cx-panel); border: 1px solid var(--cx-line); border-radius: 10px; box-shadow: 0 24px 48px rgba(0, 0, 0, .55); }
.cx-small-menu a { min-height: 48px; font-size: 15px; }

/* Phone join strip and sheet */
.cx-joinstrip { display: none; min-height: 44px; padding: 10px max(var(--gutter, 30px), calc((100% - 1220px) / 2)); align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 2px 18px; background: var(--cx-deep); border-bottom: 1px solid var(--cx-line); font-size: 12px; font-weight: 600; }
.cx-joinstrip .cx-ip { font-size: 12px; }
.cx-sheet { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 60px); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; background: var(--cx-bg); border-bottom: 1px solid var(--cx-line); box-shadow: 0 24px 48px rgba(0, 0, 0, .6); }
.cx-join-card { padding: 16px 16px 6px; display: flex; flex-direction: column; gap: 10px; background: var(--cx-panel); border: 1px solid var(--cx-line); border-radius: 10px; }
.cx-join-card .cx-ip { font-size: 19px; font-weight: 800; }
.cx-join-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; font-weight: 600; }
.cx-join-card .cx-btn { min-height: 48px; font-size: 15px; }
.cx-join-card .cx-more { align-self: center; }
.cx-sheet-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-sheet-tiles a { min-height: 56px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--cx-line); border-radius: 8px; background: var(--cx-panel); color: var(--cx-title); font-family: var(--cx-display); font-size: 15px; text-transform: uppercase; text-decoration: none; }
.cx-sheet-tiles img { width: 32px; height: 32px; object-fit: contain; }
@media (max-width: 400px) {
  .cx-sheet-tiles a { padding: 0 8px; gap: 6px; font-size: 13px; }
  .cx-sheet-tiles img { width: 28px; height: 28px; }
}
.cx-sheet-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-sheet-links a { min-height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 8px; border-radius: 6px; background: var(--cx-slab); color: var(--cx-title); font-family: var(--cx-display); font-size: 14px; text-transform: uppercase; text-decoration: none; }
.cx-sheet-links a.cx-discord { background: var(--cx-discord); box-shadow: inset 2px 2px 0 var(--cx-discord-hi), inset -2px -2px 0 var(--cx-discord-lo); }

/* Narrower desktop */
@media (max-width: 1310px) {
  .cx-bar-in { gap: 14px; }
  .cx-nav-item { padding: 0 8px; font-size: 13px; }
  .cx-logo img { width: 128px; }
  }
@media (max-width: 1135px) {
  .cx-btn.cx-discord { display: none; }
  .cx-mega-servers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-mega-servers .cx-side { grid-column: 1 / -1; }
  .cx-mega-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1030px) {
  .cx-pill-text { display: none; }
  .cx-pill { height: auto; padding: 0; border: 0; background: transparent; }
  .cx-pill .cx-btn { min-height: 44px; }
}
@media (min-width: 900px) and (max-width: 1030px) {
  .cx-joinstrip { display: flex; }
}
/* Phone and tablet */
@media (max-width: 899px) {
  .cx-bar-in { height: 64px; gap: 8px; }
  .cx-logo img { width: 119px; }
  .cx-nav, .cx-btn.cx-discord, .cx-pill-text, .cx-mega { display: none; }
  .cx-pill { height: auto; padding: 0; border: 0; background: transparent; }
  .cx-pill .cx-btn { min-height: 44px; }
  .cx-burger { display: inline-flex; }
  .cx-actions { gap: 4px; }
  .cx-news-title { overflow-wrap: anywhere; line-height: 1.3; }
}
/* Phone: the IP sits in the logo row when it fits (the longer the address, the wider the phone
   it needs), so there is no separate IP strip under the bar. The Copy IP button turns into an
   icon (its label stays for screen readers). Narrower phones keep the labelled button; the IP is
   in the menu and the page. */
@media (max-width: 430px) {
  .cx-logo img { width: 96px; }
  .cx-burger { width: 40px; }
}
@media (min-width: 365px) and (max-width: 899px) {
  .cx-bar[data-cx-net="vanilla"] .cx-pill { gap: 8px; }
  .cx-bar[data-cx-net="vanilla"] .cx-pill-text { display: flex; min-width: 0; }
  .cx-bar[data-cx-net="vanilla"] .cx-pill-text .cx-ip { font-size: 12px; }
  .cx-bar[data-cx-net="vanilla"] .cx-pill-text .cx-count { font-size: 11px; }
  .cx-bar[data-cx-net="vanilla"] .cx-pill .cx-btn { width: 44px; padding: 0; }
  .cx-bar[data-cx-net="vanilla"] .cx-pill .cx-btn [data-cx-copy-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 380px) and (max-width: 899px) {
  .cx-bar[data-cx-net="pixelmon"] .cx-pill { gap: 8px; }
  .cx-bar[data-cx-net="pixelmon"] .cx-pill-text { display: flex; min-width: 0; }
  .cx-bar[data-cx-net="pixelmon"] .cx-pill-text .cx-ip { font-size: 12px; }
  .cx-bar[data-cx-net="pixelmon"] .cx-pill-text .cx-count { font-size: 11px; }
  .cx-bar[data-cx-net="pixelmon"] .cx-pill .cx-btn { width: 44px; padding: 0; }
  .cx-bar[data-cx-net="pixelmon"] .cx-pill .cx-btn [data-cx-copy-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 420px) and (max-width: 899px) {
  .cx-bar[data-cx-net="cobblemon"] .cx-pill { gap: 8px; }
  .cx-bar[data-cx-net="cobblemon"] .cx-pill-text { display: flex; min-width: 0; }
  .cx-bar[data-cx-net="cobblemon"] .cx-pill-text .cx-ip { font-size: 12px; }
  .cx-bar[data-cx-net="cobblemon"] .cx-pill-text .cx-count { font-size: 11px; }
  .cx-bar[data-cx-net="cobblemon"] .cx-pill .cx-btn { width: 44px; padding: 0; }
  .cx-bar[data-cx-net="cobblemon"] .cx-pill .cx-btn [data-cx-copy-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 900px) {
  .cx-sheet { display: none; }
}
@media (max-width: 520px) {
  /* Badge, title and close on one row; the link sits under the title. */
  .cx-news .cx-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "badge title close" ". link close"; align-items: start; gap: 0 10px; padding-block: 8px 6px; }
  .cx-news { font-size: 12px; }
  .cx-news-badge { grid-area: badge; margin-top: 1px; padding: 1px 6px; font-size: 10px; }
  .cx-news-title { grid-area: title; font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .cx-news-link { grid-area: link; justify-self: start; padding-block: 2px; font-size: 11px; }
  .cx-news-x { grid-area: close; margin-top: -8px; }
  .cx-news .cx-in { padding-block: 6px 4px; }
}
@media (prefers-reduced-motion: reduce) { .cx-bar * { transition: none !important; } }

/* Space for the strip is held while the latest update loads, so the page does
   not jump when it appears. */
/* No fragment, no strip (the inline script also hides a dismissed one before first paint). */
.cx-news:not(:has(.cx-news-title)) { display: none; }
.cx-pill, .cx-pill-text, .cx-join-card > div:first-child { cursor: pointer; }

/* Phone sheet: the menu links as collapsed groups, so every link the desktop
   menus have is on the phone too. */
.cx-sheet-groups { display: flex; flex-direction: column; gap: 8px; }
.cx-sheet-group { border: 1px solid var(--cx-line); border-radius: 8px; background: var(--cx-panel); }
.cx-sheet-group summary { min-height: 52px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--cx-title); font-family: var(--cx-display); font-size: 14px; text-transform: uppercase; cursor: pointer; list-style: none; }
.cx-sheet-group summary::-webkit-details-marker { display: none; }
.cx-sheet-group summary::after { content: "+"; color: var(--cx-gold); font-size: 20px; line-height: 1; }
.cx-sheet-group[open] summary::after { content: "\2212"; }
.cx-sheet-body { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.cx-sheet-body .cx-list-title { margin-top: 8px; }
.cx-sheet-body .cx-port { margin: 8px 0 0; padding: 10px 12px; border-radius: 6px; background: var(--cx-bg); font-size: 13px; }
.cx-sheet-body .cx-port b { color: var(--cx-title); }
.cx-sheet-body .cx-search { margin: 4px 0 8px; }
.cx-sheet > .cx-col > .cx-more { margin-top: 4px; }

/* Touch targets */
.cx-logo { min-height: 44px; }
@media (max-width: 899px) {
  .cx-news-x { width: 44px; height: 44px; }
}

/* The live count keeps its space while it loads, so nothing shifts when it
   arrives. */
.cx-count[data-cx-state="loading"] { visibility: hidden; }
.cx-count[data-cx-state="loading"] [data-cx-count] { display: inline-block; min-width: 4ch; }
/* Restored sub-nav bar without the IP pill (the IP is in the main bar): chooser left, account links right. */
.xf-subnav-inner { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 620px) { .cx-joinstrip { justify-content: space-between; gap: 2px 8px; } }
/* The restored bar keeps the same side gutter as the page on phones too (the generic .container rule adds 20px there). */
.xf-subnav .xf-subnav-inner { padding-inline: var(--gutter, 30px); }

/* Popular guides: titles and links only, from the add-on's guides-*.html files
   (SSI, in the first HTML). A column with no list stays hidden. */
main > section.guide-block { width: min(1280px, calc(100% - 2 * var(--gutter, 30px))); margin: 0 auto; padding: 8px 0 40px; }
.guide-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.guide-col { padding: 18px 20px; border: 1px solid var(--border, #303136); border-top: 2px solid color-mix(in srgb, var(--mode-color, var(--accent, #fbcc46)) 65%, var(--border, #303136)); border-radius: 10px; background: var(--content-bg, #1a1b1e); }
.guide-col h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--mode-color, var(--accent, #fbcc46)); }
.guide-list { margin: 0; padding: 0; list-style: none; }
.guide-list li + li { border-top: 1px solid var(--border, #303136); }
.guide-list a { display: block; padding: 10px 0; color: #fff; font-weight: 700; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.guide-list a:hover, .guide-list a:focus-visible { color: var(--mode-color, var(--accent, #fbcc46)); }
.guide-col:not(:has(.guide-list)) { display: none; }
main > section.guide-block:not(:has(.guide-list)) { display: none; }

/* Get Modpack (Cobblemon and Pixelmon networks only; the markup is added by build-nav.sh).
   Beside Copy IP and Discord on desktop; a full button under Copy IP in the phone menu.
   Discord is icon-only on these networks. On desktop the IP box lives in the sub-nav, so the bar keeps room for these. */
.cx-discord-ico { display: none; }
.cx-btn.cx-modpack { background: transparent; color: var(--cx-gold); box-shadow: inset 0 0 0 2px var(--cx-gold); }
.cx-btn.cx-modpack:hover { background: color-mix(in srgb, var(--cx-gold) 14%, transparent); }
.cx-join-card .cx-btn.cx-modpack-sheet { width: 100%; }
@media (min-width: 1031px) {
  .cx-bar[data-cx-net="cobblemon"] .cx-btn.cx-discord, .cx-bar[data-cx-net="pixelmon"] .cx-btn.cx-discord { width: 40px; padding: 0; }
  .cx-bar[data-cx-net="cobblemon"] .cx-btn.cx-discord .cx-discord-ico, .cx-bar[data-cx-net="pixelmon"] .cx-btn.cx-discord .cx-discord-ico { display: block; }
  .cx-bar[data-cx-net="cobblemon"] .cx-btn.cx-discord .cx-discord-lbl, .cx-bar[data-cx-net="pixelmon"] .cx-btn.cx-discord .cx-discord-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 1030px) { .cx-btn.cx-modpack:not(.cx-modpack-sheet) { display: none; } }

/* Guide search dropdown (titles and links only, filled by nav.js) */
.cx-search { position: relative; }
.cx-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; margin: 0; padding: 4px; max-height: 320px; overflow-y: auto; list-style: none; background: var(--cx-panel); border: 1px solid var(--cx-line-strong); border-radius: 8px; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); }
.cx-suggest[hidden] { display: none; }
.cx-suggest a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--cx-title); font-size: 14px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.cx-suggest a:hover, .cx-suggest a:focus-visible { background: var(--cx-slab); color: var(--cx-gold); outline: none; }
.cx-suggest-none { padding: 10px 12px; color: var(--cx-soft); font-size: 13px; }

/* XenForo's stylesheet has `a:hover { color: white; text-decoration: underline }`. No underline anywhere in
   the bar, menus, strip or search dropdown, and the gold links and the Modpack button keep their colour. */
html body .cx-bar a:hover, html body .cx-news a:hover, html body .cx-mega a:hover, html body .cx-sheet a:hover,
html body .cx-suggest a:hover, html body .guide-block a:hover { text-decoration: none; }
html body .cx-bar a.cx-more:hover, html body .cx-mega a.cx-more:hover, html body .cx-sheet a.cx-more:hover, html body .cx-news a.cx-news-link:hover { color: var(--cx-gold); }
html body .cx-bar a.cx-btn.cx-modpack:hover, html body .cx-sheet a.cx-btn.cx-modpack:hover { color: var(--cx-gold); }
html body .cx-bar a.cx-btn.cx-discord:hover, html body .cx-sheet a.cx-discord:hover { color: var(--cx-title); }

/* Desktop (1031px and up): the IP box (IP, players online and the Copy IP button) sits in the middle of the
   sub-nav instead of the main bar, which keeps Get Modpack and Discord and frees room. The sub-nav copy is
   written into the first HTML by build-nav.sh (subnav-ip-partial.html). The sub-nav is sticky under the
   bar. Below 1031px the bar keeps its own IP box. */
.cx-pill-sub { display: none; }
@media (min-width: 1031px) {
  .cx-actions > .cx-pill { display: none; }
  .cx-nav { justify-content: center; }
  .xf-subnav { position: sticky; top: calc(var(--cx-bar-h) + 1px + env(safe-area-inset-top, 0px)); }
  .xf-subnav .xf-subnav-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .xf-subnav .cx-pill-sub { display: flex; justify-self: center; height: 44px; padding: 0 5px 0 16px; }
  .xf-subnav .cx-pill-sub .cx-pill-text { flex-direction: row; align-items: center; gap: 12px; }
  .xf-subnav .cx-pill-sub .cx-btn { min-height: 34px; padding: 0 12px; }
  .xf-subnav .subnav-links { justify-self: end; }
}

/* The nav links are centred on the page, in line with the IP in the sub-nav, once there is room
   (logo left, buttons right). Between 1031px and 1199px they are centred between the logo and the buttons. */
@media (min-width: 1200px) {
  .cx-bar-in { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); }
  .cx-bar-in > .cx-logo { justify-self: start; }
  .cx-bar-in > .cx-actions { justify-self: end; margin-left: 0; }
}

/* Sub-nav IP display: shows "Copied" in place of the IP and count for a moment after a click on the text. */
.cx-pill-sub .cx-pill-text { position: relative; }
.cx-pill-sub.cx-copied { border-color: var(--cx-green); }
.cx-pill-sub.cx-copied .cx-pill-text > * { visibility: hidden; }
.cx-pill-sub.cx-copied .cx-pill-text::after { content: "Copied"; position: absolute; inset: 0; display: flex; align-items: center; color: var(--cx-green); font-size: 14px; font-weight: 700; }
