/* === COLOR VARIABLES === */
:root {
  --primary-color: #8C7EFF;
  --secondary-color: #555878;
  --highlight-color: #A89CFF;
  --nav-bg: #ffffff;
  --nav-text: #555878;
  --nav-hover: #8C7EFF;
  --nav-bg-overlay: rgba(255, 255, 255, 0.98);
  --primary-rgb: 140,126,255;
  --border-color: rgba(0,0,0,0.12);
}

/* === BASE === */
html {
    max-width: 100%;
    overflow-x: hidden;
}
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}
a, a:link, a:visited, a:active {
  text-decoration: none !important;
}
ul, ul li {
  list-style: none;
}
a, .nav-link, .dropdown-item {
  -webkit-tap-highlight-color: transparent;
}
a, .navbar-brand {
  text-decoration: none;
  color: var(--secondary-color);
  transition: color 0.2s;
}
a:hover, .navbar-brand:hover {
  color: var(--primary-color);
}
.fab {
  color: var(--secondary-color);
  transition: color 0.2s;
}
.fab:hover {
  color: var(--primary-color);
}
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-primary:active, .btn-primary:hover, .btn-primary:focus {
  background-color: var(--highlight-color) !important;
  border-color: var(--highlight-color) !important;
}
.btn-outline-primary {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}
.btn-outline-primary:active, .btn-outline-primary:hover, .btn-outline-secondary:hover {
  color: #fff !important;
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}
.btn-outline-secondary {
  color: #999999;
  border-color: #999999;
}
.btn.btn-md {
  font-size: 0.95rem;
  padding: 0.5rem 1.25rem;
}
.card{
  --bs-card-border-color: var(--border-color);
  --bs-card-border-width: 1px;
  --bs-card-border-radius: .75rem;
}
.btn-close,
.toast .btn-close,
.toast .btn-close:focus,
.toast .btn-close:active {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* === NAVIGATION COLOR RESET === */
.nav-link,
.dropdown-item {
  color: var(--secondary-color) !important;
  background-color: transparent !important;
  font-weight: 500;
  transition: color 0.3s ease, background-color 0.3s ease;
}
.nav-link:focus,
.nav-link:active,
.dropdown-item:focus,
.dropdown-item:active {
  color: var(--secondary-color) !important;
  background-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}
.nav-link:hover,
.dropdown-item:hover {
  color: var(--primary-color) !important;
  background-color: rgba(140, 126, 255, 0.05);
}

/* === NAVBAR === */
.navbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0.1rem 1rem;

  top: 0;
  transition: top 0.3s ease-in-out;
  background-color: var(--nav-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: none !important;
}
.toggle-btn,
.navbar-brand {
  display: flex;
  align-items: center;
}

/* === DROPDOWN === */
.dropdown-menu {
  margin-top: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  box-shadow: none !important;
}
.dropdown-item {
  transition: background-color 0.2s, color 0.2s;
}

/* === TOGGLE BUTTON (Custom) === */
.toggle-btn {
  border: none;
  background: none;
  color: var(--primary-color);
  position: relative;
  z-index: 110;
  width: 2.5rem;
  height: 2.5rem;
}
.toggle-btn i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
  font-size: 1.5rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
}
.toggle-btn .fa-bars {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}
.toggle-btn .fa-times {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5) rotate(-45deg);
}
.toggle-btn.active .fa-bars {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5) rotate(45deg);
}
.toggle-btn.active .fa-times {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

/* Footer */
.footer h6 {
  margin-bottom: 1rem;
}
.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Home page */
#community .btn-primary .fab,
#community .btn-dark .fab {
  color: #fff;
}
#community .btn-outline-primary:hover .fab {
  color: #fff;
}
#globeViz canvas {
   touch-action: pan-y !important; /* Allow vertically scroll */
    background: transparent !important;
}

/* Docs */
.code-block{
  position: relative;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: .5rem;
  overflow: hidden;
  margin-bottom: 1rem;
}
pre[class*="language-"]{
  margin: 0;
  padding-top: 3rem;
  border-radius: 0;
}
.docs code[class*="language-"]{
  font-size: .82rem;
  line-height: 1;
  font-family: monospace;
}
.code-lang{
  position: absolute;
  top: .45rem;
  left: .75rem;
  font-size: .7rem;
  line-height: 1;
  padding: .2rem .5rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: rgba(var(--primary-rgb), .15);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: .35rem;
  pointer-events: none;
}
.copy-btn{
  position: absolute;
  top: .45rem;
  right: .6rem;
  opacity: 1;
  transition: opacity .2s;
}
.toc{
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  overflow: hidden;
}
.toc.sticky-top{
  top: 60px;
}
.toc .list-group-item,
.toc-mobile .list-group-item,
.toc .list-group-item:focus,
.toc-mobile .list-group-item:focus{
  border: 0;
  color: var(--secondary-color);
  background: transparent;
  border-left: .25rem solid transparent;
  transition: color .15s, background .15s, border-left-color .15s;
}
.toc .list-group-item + .list-group-item,
.toc-mobile .list-group-item + .list-group-item{
  border-top: 1px solid var(--border-color);
}
.toc .list-group-item:hover,
.toc-mobile .list-group-item:hover{
  color: var(--primary-color);
  background: rgba(var(--primary-rgb), .08);
}
.toc .list-group-item.active,
.toc-mobile .list-group-item.active{
  color: var(--primary-color);
  background: rgba(var(--primary-rgb), .08);
  border-left-color: var(--primary-color);
  font-weight: 600;
}
.toc-fab{
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1040;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 .25rem .5rem rgba(0,0,0,.15);
}
.toc-fab:active, .toc-fab:hover, .toc-fab:focus {
  background-color: var(--highlight-color) !important;
  border-color: var(--highlight-color) !important;
}

/* === RESPONSIVE === */
/* Extra Small screen only */
@media only screen and (max-width: 576px) {

}

/* Small screen only */
@media only screen and (min-width: 576px) and (max-width: 768px) {

}

/* Medium down */
@media only screen and (max-width: 768px) {

}

/* Medium only */
@media only screen and (min-width: 768px) and (max-width: 992px) {

}

/* Medium down */
@media only screen and (max-width: 992px) {

}

/* Medium up */
@media only screen and (min-width: 992px) {

}

/* Large down */
@media only screen and (max-width: 992px) {
  .navbar-brand {
    width: 100px;
  }
  .navbar.retract {
    top: -60px;
  }
  .navbar-brand {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
  .dropdown-item {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .dropdown-menu {
    box-shadow: none !important;
    border: none !important;
    position: static !important;
    display: none;
    float: none;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
  }
  .dropdown-menu.show {
    display: block;
  }
}

/* Large up */
@media only screen and (min-width: 992px) {
  .toggle-btn {
    display: none !important;
  }
  .navbar.retract {
    top: -60px;
  }
  .navbar-brand {
    width: 120px;
  }
  .dropdown { position: relative; }
  .dropdown-menu {
    display: block;
    position: absolute;
    top: 100%; left: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
  }
  .dropdown-toggle:hover + .dropdown-menu,
  .dropdown-menu:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .dropdown-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
  }
  .nav-item {
    padding-left: 0.5em;
  }

  #hero .section-max-width, #community .section-max-width  {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
  }
}
