@charset "UTF-8";
/* ==========================================================================
   sidebar-navigation.css — sidebar header/search, nav list, tabs, branding,
   active states, and the sidebar's responsive / off-canvas behaviour.
   ========================================================================== */

/* ---- Learn theme base ---- */
#header {
  background: #1694CA;
  color: #fff;
  text-align: center;
  padding: 1rem; }
  #header a {
    display: inline-block; }

.searchbox {
  margin-top: 0.5rem;
  position: relative;
  border: 1px solid #19a5e1;
  background: #1383b3;
  border-radius: 4px; }
  .searchbox label {
    color: rgba(255, 255, 255, 0.8);
    position: absolute;
    left: 10px;
    top: 3px; }
  .searchbox span {
    color: rgba(255, 255, 255, 0.6);
    position: absolute;
    right: 10px;
    top: 3px;
    cursor: pointer; }
    .searchbox span:hover {
      color: rgba(255, 255, 255, 0.9); }
  .searchbox input {
    display: inline-block;
    color: #fff;
    width: 100%;
    height: 30px;
    background: transparent;
    border: 0;
    padding: 0 25px 0 30px;
    margin: 0;
    font-weight: 400; }
    .searchbox input::-webkit-input-placeholder {
      color: rgba(255, 255, 255, 0.6); }
    .searchbox input::-moz-placeholder {
      color: rgba(255, 255, 255, 0.6); }
    .searchbox input:-moz-placeholder {
      color: rgba(255, 255, 255, 0.6); }
    .searchbox input:-ms-input-placeholder {
      color: rgba(255, 255, 255, 0.6); }

#sidebar-toggle {
  display: none; }
  @media only all and (max-width: 47.938em) {
    #sidebar-toggle {
      display: inline-block; } }

#sidebar {
  background-color: #38424D;
  position: fixed;
  top: 0;
  width: 300px;
  bottom: 0;
  left: 0;
  font-weight: 500;
  font-size: 15px; }
  #sidebar a {
    color: #bbbbbb; }
    #sidebar a:hover {
      color: #d5d5d5; }
    #sidebar a.subtitle {
      color: rgba(187, 187, 187, 0.6); }
  #sidebar hr {
    border-bottom: 1px solid #323a44; }
  #sidebar a.padding {
    padding: 0 1rem; }
  #sidebar h5 {
    margin: 2rem 0 0;
    position: relative;
    line-height: 2; }
    #sidebar h5 a {
      display: block;
      margin-left: 0;
      margin-right: 0;
      padding-left: 1rem;
      padding-right: 1rem; }
    #sidebar h5 i {
      color: rgba(187, 187, 187, 0.6);
      position: absolute;
      right: 0.6rem;
      top: 0.7rem;
      font-size: 80%; }
    #sidebar h5.parent a {
      background: #293038;
      color: #c8c8c8 !important; }
    #sidebar h5.active a {
      background: #fff;
      color: #555 !important; }
    #sidebar h5.active i {
      color: #555 !important; }
  #sidebar h5 + ul.topics {
    display: none;
    margin-top: 0; }
  #sidebar h5.parent + ul.topics, #sidebar h5.active + ul.topics {
    display: block; }
  #sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0; }
    #sidebar ul.searched a {
      color: #888888; }
    #sidebar ul.searched .search-match a {
      color: #d5d5d5; }
      #sidebar ul.searched .search-match a:hover {
        color: #eeeeee; }
    #sidebar ul.topics {
      margin: 0 1rem; }
      #sidebar ul.topics.searched ul {
        display: block; }
      #sidebar ul.topics ul {
        display: none;
        padding-bottom: 1rem; }
        #sidebar ul.topics ul ul {
          padding-bottom: 0; }
      #sidebar ul.topics li.parent ul, #sidebar ul.topics > li.active ul {
        display: block; }
      #sidebar ul.topics > li > a {
        line-height: 2rem;
        font-size: 1.1rem; }
        #sidebar ul.topics > li > a b {
          opacity: 0.5;
          font-weight: normal; }
        #sidebar ul.topics > li > a .fa {
          margin-top: 9px; }
      #sidebar ul.topics > li.parent, #sidebar ul.topics > li.active {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem; }
    #sidebar ul li.active > a {
      background: #fff;
      color: #555 !important;
      margin-left: -1rem;
      margin-right: -1rem;
      padding-left: 1rem;
      padding-right: 1rem; }
    #sidebar ul li {
      padding: 0; }
      #sidebar ul li.visited + span {
        margin-right: 16px; }
      #sidebar ul li a {
        display: block;
        padding: 2px 0; }
        #sidebar ul li a span {
          text-overflow: ellipsis;
          overflow: hidden;
          white-space: nowrap;
          display: block; }
      #sidebar ul li > a {
        padding: 4px 0; }
      #sidebar ul li .fa {
        display: none;
        float: right;
        font-size: 13px;
        min-width: 16px;
        margin: 4px 0 0 0;
        text-align: right; }
      #sidebar ul li.visited > a .read-icon {
        color: #1694CA;
        display: inline; }
      #sidebar ul li li {
        padding-left: 1rem;
        text-indent: 0.2rem; }


@media only all and (max-width: 59.938em) {
  #sidebar {
    width: 230px; } }
@media only all and (max-width: 47.938em) {
  #sidebar {
    width: 230px;
    left: -230px; }

  .sidebar-hidden {
    overflow: hidden; }
    .sidebar-hidden #sidebar {
      left: 0; }
    .sidebar-hidden #body {
      margin-left: 230px;
      overflow: hidden; }
    .sidebar-hidden #overlay {
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      z-index: 10;
      background: rgba(255, 255, 255, 0.5);
      cursor: pointer; } }

/* ---- TTG branding ---- */
#header {
    background: var(--ttg-header);
}

.searchbox {
    border: 1px solid var(--ttg-line);
    background: var(--ttg-search-bg);
}

#sidebar {
    background-color: var(--ttg-sidebar);
}
#sidebar hr {
    border-bottom: 1px solid var(--ttg-line);
}
#sidebar h5.parent a {
    background: var(--ttg-h5-parent);
}
#sidebar ul li.visited > a .read-icon {
    color: var(--ttg-read-icon);
}

#header #logo-img {
    display: block;
    width: 9rem;
    height: 9rem;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 8px;
}


/* ---- TTG nav items ---- */
#sidebar .topics { padding: 0; }
#sidebar .nav-header {
    list-style: none;
    color: rgba(255,255,255,.55);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .9rem 1rem .2rem;
    margin: 0;
}
#sidebar .topics li.dd-item { list-style: none; }
#sidebar .topics li.dd-item > a {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .3rem 1rem;
    font-size: .85rem;
}
#sidebar .topics li.dd-item > a .mdi {
    font-size: 1.15rem;
    width: 1.4em;
    text-align: center;
    flex: 0 0 auto;
}
#sidebar .topics li.dd-item.active > a { font-weight: 700; }

/* All sidebar + tab text (and icons, which use currentColor) pure white.
   !important kept: overrides the theme's own !important link-colour rules
   (#sidebar h5.active a, #sidebar ul li.active > a, etc.). */
#sidebar,
#sidebar a,
#sidebar .nav-header,
#sidebar h5,
#sidebar h5 a,
#sidebar .topics li.dd-item > a,
#sidebar .topics li.dd-item > a span,
#sidebar .topics li.dd-item > a .mdi,
#sidebar .sidebar-tabs li a,
#sidebar .page-tree .tree-item a,
#sidebar .page-tree .tree-toggle {
    color: #fff !important;
}

/* Active nav item: light highlight fills the full-height row, with a darker
   band on each edge drawn as left/right borders. We reset the compiled
   theme's negative-margin bleed (margin:-1rem) and the <a>'s own white
   background — these custom rules now follow the theme rules in source order
   (and carry equal-or-higher specificity), so no !important is needed. */
#sidebar ul.topics > li.active {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border-left: 1rem solid transparent;
    border-right: 1rem solid transparent;
    box-sizing: border-box;
}

#sidebar ul.topics > li.parent {
    background: var(--ttg-parent);
}
#sidebar ul.topics li.active > a,
#sidebar h5.active a {
    background: transparent;
    color: #fff !important; /* overrides theme's color:#555 !important */
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;   /* 1rem border + 0 padding = icon aligns with inactive rows */
    padding-right: 0;
    border-radius: 0;
    box-shadow: none;
}
#sidebar h5.active {
    background: var(--ttg-active);
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border-left: 1rem solid var(--ttg-active-edge);
    border-right: 1rem solid var(--ttg-active-edge);
    box-sizing: border-box;
}
#sidebar .sidebar-tabs li.active > a {
    margin-left: 0;
    margin-right: 0;
}


/* ---- TTG sidebar tabs ---- */
/* ==========================================================================
   Sidebar tabs
   ========================================================================== */
#sidebar ul.sidebar-tabs {
    display: flex;
    gap: .6rem;
    margin: 0;
    padding: .85rem .85rem;
    list-style: none;
    box-sizing: border-box;
    width: 100%;
    background: var(--ttg-tabs-bar);
    border-bottom: 1px solid rgba(0,0,0,.18);
}
#sidebar ul.sidebar-tabs li { padding: 0; }
#sidebar ul.sidebar-tabs li.tab-home { flex: 0 0 auto; }
#sidebar ul.sidebar-tabs li.tab-browse { flex: 1; min-width: 0; }
#sidebar ul.sidebar-tabs li a {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .6rem .9rem;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: .01em;
    border: none;
    border-radius: 8px;
    background: var(--ttg-tab);
    transition: background .15s, box-shadow .15s;
    box-sizing: border-box;
}
#sidebar ul.sidebar-tabs li a span {
    display: inline;
    overflow: visible;
}
#sidebar ul.sidebar-tabs li.tab-home a { padding: .6rem; }
#sidebar ul.sidebar-tabs li a:hover {
    background: var(--ttg-tab-hover);
}
#sidebar ul.sidebar-tabs li.active > a {
    background: var(--ttg-tab);
    box-shadow: none;
}
#sidebar ul.sidebar-tabs li.active > a,
#sidebar ul.sidebar-tabs li.active > a .mdi {
    color: #fff !important; /* overrides theme's color:#555 !important */
}
#sidebar ul.sidebar-tabs li a .mdi { font-size: 1.25rem; line-height: 1; }

/* Sidebar tab panels */
.sidebar-panel { display: none; }
.sidebar-panel.active { display: block; }


/* ---- TTG sidebar responsive (must follow the Learn responsive rules) ---- */
@media (min-width: 48em) {
    #sidebar {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        width: 300px;
        flex: 0 0 300px;
        min-height: calc(100vh - 54px);
        overflow: visible !important; /* beats scrollbar JS inline overflow */
    }
    #sidebar .highlightable {
        overflow: visible !important; /* beats scrollbar JS inline overflow */
        box-sizing: border-box;
        max-width: 100%;
        margin-top: 0;
        padding-top: 0;
    }
}

@media (max-width: 47.99em) {
    #sidebar {
        top: 54px;
        bottom: 0;
        overflow-y: auto !important; /* beats scrollbar JS inline overflow */
        -webkit-overflow-scrolling: touch;
    }
}
