/* =========================================================
   TrustBoxx Knowledge Base — sidebar (matches dev.trustboxx.com)
   All classes are prefixed tbx-kb- so doc pages are not affected
   ========================================================= */

.tbx-kb-sidebar,
.tbx-kb-sidebar *,
.tbx-kb-pill,
.tbx-kb-pill * {
  box-sizing: border-box;
}

/* ---------- Sidebar ---------- */
.tbx-kb-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 194, 255, .08), transparent 40%),
    #141219;
  border-right: 1px solid #ffffff1a;
  font-family: "Montserrat", sans-serif;
  color: #fff;
  transition: transform .3s ease;
}

.tbx-kb-sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(45deg, #00c2ff 0%, #eebdff 96%);
}

/* ---------- Top row (hide button on desktop, title + close on mobile) ---------- */
.tbx-kb-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px 18px 8px;
}

.tbx-kb-sheet-title,
.tbx-kb-close {
  display: none;
}

/* ---------- Hide / show buttons ---------- */
.tbx-kb-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin: 0 -4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #5f2bd7;
  box-shadow: none;
  color: #fff;
  opacity: .9;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

/* .tbx-kb-collapse:hover {
  color: #fff;
  background: #ffffff1a;
} */

.tbx-kb-collapse svg {
  width: 12px;
  height: 12px;
}

.tbx-kb-expand {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #5f2bd7;
  color: #fff;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

/* .tbx-kb-expand:hover {
  color: #fff;
  background: #2a2733;
} */

.tbx-kb-expand svg {
  width: 12px;
  height: 12px;
}

.tbx-kb-expand {
  position: fixed;
  top: 22px;
  left: 16px;
  z-index: 1000;
  box-shadow: 0 6px 18px #00000059;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, color .2s ease, background .2s ease;
}

.tbx-kb-expand:focus-visible {
  outline: 2px solid #00c2ff;
  outline-offset: 2px;
}

/* ---------- Navigation ---------- */
.tbx-kb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 18px 28px 24px;
  scrollbar-width: thin;
  scrollbar-color: #ffffff22 transparent;
}

/* Scoped under .tbx-kb-sidebar so global details/summary/a styles of the
   doc pages cannot draw boxes or borders around the menu */
.tbx-kb-sidebar .tbx-kb-group {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #ffffff1a;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.tbx-kb-sidebar .tbx-kb-group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  list-style: none;
  cursor: pointer;
  user-select: none;
  color: #f5f5f5aa;
  font-family: "Raleway", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: color .2s ease;
}

.tbx-kb-sidebar .tbx-kb-group summary::-webkit-details-marker {
  display: none;
}

/* Slim chevron: points down when closed, up when open */
.tbx-kb-sidebar .tbx-kb-group summary::after {
  content: "";
  flex-shrink: 0;
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: .9;
  transition: transform .25s ease;
}

.tbx-kb-sidebar .tbx-kb-group summary:hover {
  color: #fff;
}

.tbx-kb-sidebar .tbx-kb-group[open] summary {
  color: #fff;
  border: 0;
}

.tbx-kb-sidebar .tbx-kb-group[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.tbx-kb-links {
  list-style: none;
  margin: -4px 0 0;
  padding: 0 0 12px;
}

.tbx-kb-links li {
  margin: 0;
  padding: 0;
}

.tbx-kb-sidebar .tbx-kb-links a {
  position: relative;
  display: block;
  padding: 7px 0 7px 14px;
  border: 0;
  border-radius: 0;
  background: none;
  color: #f5f5f5aa;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  text-decoration: none;
  transition: color .2s ease;
}

.tbx-kb-sidebar .tbx-kb-links a:hover {
  color: #fff;
}

.tbx-kb-sidebar .tbx-kb-links a.is-active {
  color: #00c2ff;
  font-weight: 600;
}

.tbx-kb-sidebar .tbx-kb-links a.is-active::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 2px;
  height: 16px;
  margin-top: -8px;
  border-radius: 2px;
  background: linear-gradient(180deg, #00c2ff, #eebdff);
}

.tbx-kb-sidebar :focus-visible,
.tbx-kb-pill:focus-visible {
  outline: 2px solid #00c2ff;
  outline-offset: 2px;
}

/* ---------- Right side: HTML page ---------- */
.tbx-kb-main {
  display: block;
  margin-left: 280px;
  min-height: 100vh;
  transition: margin-left .3s ease;
}

/* ---------- Lightweight footer (replaces the page's own footer) ---------- */
.tbx-kb-footer {
  clear: both;
  width: 100%;
  padding: 22px 32px;
  background: #141219;
  border-top: 1px solid #ffffff1a;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

.tbx-kb-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  max-width: 90rem;
  margin: 0 auto;
}

.tbx-kb-footer p {
  margin: 0;
  color: #f5f5f5aa;
  font-size: 13px;
  line-height: 1.5;
}

.tbx-kb-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tbx-kb-footer li {
  margin: 0;
  padding: 0;
}

.tbx-kb-footer a {
  color: #f5f5f5aa;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  transition: color .2s ease;
}

.tbx-kb-footer a:hover {
  color: #fff;
}

.tbx-kb-footer a:focus-visible {
  outline: 2px solid #00c2ff;
  outline-offset: 3px;
}

/* Footer on phones: links stacked, copyright below */
@media (max-width: 640px) {
  .tbx-kb-footer {
    padding: 22px 20px;
  }

  .tbx-kb-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .tbx-kb-footer ul {
    flex-direction: column;
    gap: 8px;
  }

  .tbx-kb-footer p {
    order: 2;
  }
}

/* ---------- Desktop: sidebar hidden ---------- */
@media (min-width: 901px) {
  html.tbx-kb-collapsed .tbx-kb-sidebar {
    transform: translateX(-100%);
  }

  html.tbx-kb-collapsed .tbx-kb-main {
    margin-left: 0;
  }

  html.tbx-kb-collapsed .tbx-kb-expand {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* ---------- Mobile only ---------- */
.tbx-kb-pill,
.tbx-kb-scrim {
  display: none;
}

@media (max-width: 900px) {

  .tbx-kb-pill i {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
  }

  /* Floating menu button: small round icon, bottom right (keeps the reading area clear) */
  .tbx-kb-pill {
    position: fixed;
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 990;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid #ffffff26;
    border-radius: 50%;
    background: #5f2bd7;
    box-shadow: 0 10px 26px #000000a0;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .25s ease, transform .25s ease, visibility 0s;
  }

  html.tbx-kb-open .tbx-kb-pill {
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }

  .tbx-kb-pill svg {
    width: 20px;
    height: 20px;
    color: #fff;
  }

  .tbx-kb-pill span,
  .tbx-kb-pill i {
    display: none;
  }

  /* Menu: slides up from the bottom as a sheet */
  .tbx-kb-sidebar {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: min(84vh, 640px);
    z-index: 1001;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-right: 0;
    border-top: 1px solid #ffffff1f;
    border-radius: 22px 22px 0 0;
    visibility: hidden;
    transform: translateY(105%);
    transition: transform .3s ease, visibility 0s linear .3s;
  }

  html.tbx-kb-open .tbx-kb-sidebar {
    visibility: visible;
    transform: none;
    box-shadow: 0 -20px 60px #00000080;
    transition: transform .3s ease, visibility 0s;
  }

  .tbx-kb-head {
    justify-content: space-between;
    padding: 20px 12px 10px 24px;
    border-bottom: 1px solid #ffffff1a;
  }

  .tbx-kb-collapse,
  .tbx-kb-expand {
    display: none;
  }

  .tbx-kb-sheet-title {
    display: block;
    color: #fff;
    font-family: "Raleway", sans-serif;
    font-size: 15px;
    font-weight: 600;
  }

  .tbx-kb-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #f5f5f5aa;
    cursor: pointer;
  }

  .tbx-kb-close svg {
    width: 18px;
    height: 18px;
  }

  .tbx-kb-nav {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 22px 24px;
  }

  .tbx-kb-sidebar .tbx-kb-group summary {
    padding: 17px 0;
  }

  .tbx-kb-sidebar .tbx-kb-links a {
    padding: 9px 0 9px 14px;
    font-size: 14.5px;
  }

  .tbx-kb-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #000000aa;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }

  html.tbx-kb-open .tbx-kb-scrim {
    opacity: 1;
    visibility: visible;
  }

  html.tbx-kb-open,
  html.tbx-kb-open body {
    overflow: hidden;
  }

  .tbx-kb-main {
    margin-left: 0;
    /* padding-bottom: 84px; */
  }
}

/* ---------- Main site menu (small screens): full-screen, slides in from the right ---------- */
@media (max-width: 900px) {
  /* Request a Demo is already inside the menu */
  .nav-right > .btn {
    display: none;
  }

  /* backdrop-filter would trap the fixed panel inside the pill, so drop it while open */
  .nav-inner:has(details.menu[open]) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  html:has(details.menu[open]) {
    overflow: hidden;
  }

  html:has(details.menu[open]) .tbx-kb-pill {
    display: none;
  }

  /* Hamburger: no circle, centred in its 44px box (same spot open or closed) */
  details.menu > summary {
    justify-content: center;
    border: 0;
  }

  details.menu[open] > summary {
    position: relative;
    z-index: 2;
    border: 1px solid #fff;
  }

  details.menu[open] > .panel {
    position: fixed;
    inset: 0;
    z-index: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 110px 40px 40px;
    border: 0;
    border-radius: 0;
    background: #000;
    box-shadow: none;
    animation: tbx-kb-menu-in .4s cubic-bezier(.22, .8, .3, 1);
  }

  details.menu[open] .panel a {
    padding: 12px 0;
    border-radius: 0;
    background: none;
    font-size: 20px;
    font-weight: 500;
  }

  details.menu[open] .panel a:hover {
    background: none;
    color: #cfc4ff;
  }

  details.menu[open] .panel a.menu-cta {
    display: inline-block;
    margin-top: 24px;
    padding: 16px 40px;
    border-radius: 160px;
    background: #5f2bd7;
    font-size: 17px;
    font-weight: 700;
  }

  details.menu[open] .panel a.menu-cta:hover {
    background: #7340ea;
    color: #fff;
  }
}

details.menu.tbx-kb-menu-out > .panel {
  animation: tbx-kb-menu-out .35s ease forwards;
}

@keyframes tbx-kb-menu-out {
  to { transform: translateX(100%); }
}

@keyframes tbx-kb-menu-in {
  from { transform: translateX(100%); }
  to   { transform: none; }
}

/* ---------- Section chips (page's own .spec-nav): active state ---------- */
.spec-nav a.is-active {
  border-color: #00c2ff;
  background: rgba(0, 194, 255, .12);
  color: #00c2ff;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .tbx-kb-sidebar,
  .tbx-kb-main,
  .tbx-kb-expand,
  .tbx-kb-pill,
  .tbx-kb-scrim,
  .tbx-kb-group summary::after {
    transition: none;
  }
}