/* PulseBot v21.7.6 — topbar rebuilt from scratch.
   This component uses isolated pb-global-* classes so legacy navbar rules
   cannot alter its geometry or active states. */

:root {
  --pb-topbar-h: 64px;
}

body#pulsebot-app .pb-global-nav,
body#pulsebot-app .pb-global-nav * {
  box-sizing: border-box;
}

body#pulsebot-app .pb-global-nav {
  position: sticky;
  top: 0;
  z-index: 1500;
  width: 100%;
  height: var(--pb-topbar-h);
  min-height: var(--pb-topbar-h);
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.075);
  background-color: #0e0f12;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 68px 68px;
  background-position: center top;
  box-shadow: 0 1px 0 rgba(0,0,0,.28);
  color: #ececec;
  font-family: var(--pb-font, "Inter", ui-sans-serif, system-ui, sans-serif);
  isolation: isolate;
}

body#pulsebot-app .pb-global-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14,15,18,.72), rgba(14,15,18,.91));
}

body#pulsebot-app .pb-global-nav-inner {
  position: relative;
  width: 100%;
  height: var(--pb-topbar-h);
  margin: 0;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  align-items: center;
  gap: 18px;
}

/* Brand */
body#pulsebot-app .pb-global-brand {
  grid-column: 1;
  justify-self: start;
  height: var(--pb-topbar-h);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f1f2f4;
  text-decoration: none;
  white-space: nowrap;
}

body#pulsebot-app .pb-global-brand-mark {
  width: 24px;
  height: 24px;
  min-width: 24px;
  display: grid;
  place-items: center;
}

body#pulsebot-app .pb-global-brand-mark img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

body#pulsebot-app .pb-global-brand-name {
  color: #f1f2f4;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.012em;
}

/* Desktop links */
body#pulsebot-app .pb-global-links {
  grid-column: 2;
  justify-self: center;
  height: var(--pb-topbar-h);
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
}

body#pulsebot-app .pb-global-link {
  position: relative;
  height: var(--pb-topbar-h);
  min-width: 0;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9ca1aa;
  box-shadow: none;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transform: none;
  transition: color .14s ease;
}

body#pulsebot-app .pb-global-link:hover,
body#pulsebot-app .pb-global-link:focus-visible {
  color: #d9dce1;
  background: transparent;
}

body#pulsebot-app .pb-global-link.active,
body#pulsebot-app .pb-global-link[aria-current="page"] {
  color: #f3f4f6;
  background: transparent;
  font-weight: 500;
}

body#pulsebot-app .pb-global-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: #3a6df0;
  opacity: 0;
  transform: none;
}

body#pulsebot-app .pb-global-link.active::after,
body#pulsebot-app .pb-global-link[aria-current="page"]::after {
  opacity: 1;
}

/* Actions */
body#pulsebot-app .pb-global-actions {
  grid-column: 3;
  justify-self: end;
  height: var(--pb-topbar-h);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

body#pulsebot-app .pb-global-discord,
body#pulsebot-app .pb-global-login {
  min-height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #aeb3bb;
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .14s ease, background-color .14s ease;
}

body#pulsebot-app .pb-global-discord:hover,
body#pulsebot-app .pb-global-login:hover {
  color: #f0f1f3;
  background: rgba(255,255,255,.035);
}

body#pulsebot-app .pb-global-language,
body#pulsebot-app .pb-global-account {
  position: relative;
}

body#pulsebot-app .pb-global-language-button,
body#pulsebot-app .pb-global-account-button {
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 6px;
  background: rgba(255,255,255,.018);
  color: #c8ccd2;
  box-shadow: none;
  font: inherit;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color .14s ease, border-color .14s ease, background-color .14s ease;
}

body#pulsebot-app .pb-global-language-button:hover,
body#pulsebot-app .pb-global-language-button[aria-expanded="true"],
body#pulsebot-app .pb-global-account-button:hover,
body#pulsebot-app .pb-global-account-button[aria-expanded="true"] {
  color: #f0f1f3;
  border-color: rgba(255,255,255,.145);
  background: rgba(255,255,255,.033);
}

body#pulsebot-app .pb-global-language-button {
  min-width: 68px;
}

body#pulsebot-app .pb-global-account-button {
  max-width: 150px;
}

body#pulsebot-app .pb-global-nav .flag-icon {
  width: 18px;
  height: 12px;
  min-width: 18px;
  border-radius: 2px;
  overflow: hidden;
}

body#pulsebot-app .pb-global-language-code {
  min-width: 16px;
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
}

body#pulsebot-app .pb-global-caret {
  color: #727781;
  font-size: .7rem;
  line-height: 1;
}

body#pulsebot-app .pb-global-account-avatar {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #1b1d22;
  color: #d7d9de;
  font-size: .68rem;
}

body#pulsebot-app .pb-global-account-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body#pulsebot-app .pb-global-account-name {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdowns */
body#pulsebot-app .pb-global-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1700;
  min-width: 220px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.095);
  border-radius: 8px;
  background-color: #111317;
  background-image:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 34px 34px;
  box-shadow: 0 18px 42px rgba(0,0,0,.42);
}

body#pulsebot-app .pb-global-dropdown[hidden] {
  display: none;
}

body#pulsebot-app .pb-global-language-option,
body#pulsebot-app .pb-global-account-menu > a {
  width: 100%;
  min-height: 42px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #b8bdc5;
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .12s ease, background-color .12s ease;
}

body#pulsebot-app .pb-global-language-option:hover,
body#pulsebot-app .pb-global-language-option:focus-visible,
body#pulsebot-app .pb-global-account-menu > a:hover,
body#pulsebot-app .pb-global-account-menu > a:focus-visible {
  color: #f1f2f4;
  background: rgba(255,255,255,.04);
}

body#pulsebot-app .pb-global-language-option.active {
  color: #e7ebf9;
  background: rgba(58,109,240,.07);
}

body#pulsebot-app .pb-global-language-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

body#pulsebot-app .pb-global-language-main > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body#pulsebot-app .pb-global-language-main strong {
  color: inherit;
  font-size: .82rem;
  font-weight: 500;
}

body#pulsebot-app .pb-global-language-main small {
  color: #747a84;
  font-size: .68rem;
}

body#pulsebot-app .pb-global-language-check {
  color: #6f91ff;
}

body#pulsebot-app .pb-global-account-head {
  margin: -1px -1px 5px;
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}

body#pulsebot-app .pb-global-account-head span,
body#pulsebot-app .pb-global-account-head strong {
  display: block;
}

body#pulsebot-app .pb-global-account-head span {
  color: #777d87;
  font-size: .68rem;
}

body#pulsebot-app .pb-global-account-head strong {
  margin-top: 3px;
  color: #eceef1;
  font-size: .82rem;
  font-weight: 600;
}

body#pulsebot-app .pb-global-account-menu > a.danger {
  color: #e26370;
}

/* Menu trigger is only visible below desktop breakpoint. */
body#pulsebot-app .pb-global-menu-toggle {
  display: none;
}

@media (max-width: 1120px) {
  body#pulsebot-app .pb-global-nav-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding-inline: 14px;
  }

  body#pulsebot-app .pb-global-brand {
    grid-column: 1;
  }

  body#pulsebot-app .pb-global-actions {
    grid-column: 2;
    justify-self: end;
  }

  body#pulsebot-app .pb-global-menu-toggle {
    grid-column: 3;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: grid;
    place-content: center;
    gap: 5px;
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 6px;
    background: rgba(255,255,255,.018);
    color: #c8ccd2;
    cursor: pointer;
  }

  body#pulsebot-app .pb-global-menu-toggle span {
    width: 15px;
    height: 1px;
    display: block;
    background: currentColor;
  }

  body#pulsebot-app .pb-global-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 14px;
    width: min(310px, calc(100vw - 28px));
    height: auto;
    padding: 6px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border: 1px solid rgba(255,255,255,.095);
    border-radius: 8px;
    background-color: #111317;
    background-image:
      linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
    background-size: 34px 34px;
    box-shadow: 0 18px 42px rgba(0,0,0,.42);
  }

  body#pulsebot-app .pb-global-links.open {
    display: flex;
  }

  body#pulsebot-app .pb-global-link {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 16px;
    justify-content: flex-start;
    color: #aeb3bb;
  }

  body#pulsebot-app .pb-global-link::after {
    left: 5px;
    right: auto;
    bottom: 13px;
    width: 2px;
    height: 16px;
  }
}

@media (max-width: 820px) {
  body#pulsebot-app .pb-global-discord {
    display: none;
  }
}

@media (max-width: 620px) {
  body#pulsebot-app .pb-global-account-name,
  body#pulsebot-app .pb-global-account-button .pb-global-caret {
    display: none;
  }

  body#pulsebot-app .pb-global-account-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  body#pulsebot-app .pb-global-account-menu,
  body#pulsebot-app .pb-global-language-menu {
    position: fixed;
    top: calc(var(--pb-topbar-h) + 8px);
    right: 12px;
    left: 12px;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 460px) {
  body#pulsebot-app .pb-global-nav-inner {
    padding-inline: 10px;
    gap: 7px;
  }

  body#pulsebot-app .pb-global-brand-name {
    display: none;
  }

  body#pulsebot-app .pb-global-language-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
    gap: 0;
  }

  body#pulsebot-app .pb-global-language-code,
  body#pulsebot-app .pb-global-language-button .pb-global-caret {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body#pulsebot-app .pb-global-nav *,
  body#pulsebot-app .pb-global-nav *::before,
  body#pulsebot-app .pb-global-nav *::after {
    animation: none !important;
    transition: none !important;
  }
}
