.wb_wiki_tabs{
    display:flex;
    flex-wrap:nowrap;
    width:100%;
    border-left:none;
    border-right:none;
}
.wb_wiki_tabs>.wb-wiki-buttons-wrapper{
    flex-grow:0;
    flex-shrink:0;
}
.wb_wiki_tabs>.wb-wiki-content{
    flex-grow:1;
    width:100%;
}

.wb-wiki-buttons-inner{
    position:relative;
}

.wb-wiki-buttons-item{
    background:var(--wp--preset--color--secondary);
    border: 1px solid #fff;
    border-right:none;
    position:relative;
    color:#fff !important;
    display:block;
}
.wb-wiki-buttons-item:hover{
    color:#fff !important;
}
.wb-wiki-buttons-item:first-child{
    border-top:none;
}
.wb-wiki-buttons-item:last-child{
    border-bottom:none;
}

.wb-wiki-buttons-item h4{
    padding:1em;
    margin:0 !important;
    font-size:18px;
    text-align:center;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform:rotate(180deg);
    min-height:140px;
    color:inherit;
}

.wb_wiki_tabs .wb-wiki-buttons-item-active{
    background:#fff;
    color:inherit !important;
}

.wb-wiki-content *[data-tab]{
    display:none;
}
.wb-wiki-content *[data-tab].wb-wiki-active{
    display:block;
}

.wiki_tabs_nav{
    margin-top:2em;
    font-size:1.6em;
}
.wiki_tabs_nav .nav-previous,
.wiki_tabs_nav .nav-next{
    cursor:pointer;
}

.wiki_tabs_nav svg{
    position:relative;
    top:0.35em;
    font-size:1.5em;
    margin:0 0.5em;
}

/* Handbook template */
.handbook_wrapper{
    display:flex;
    flex-wrap: nowrap;
    align-items:stretch;
}
.handbook_wrapper>#handbook_sidebar{
    width:80%;
    max-width:38px;
    transition: max-width 0.4s ease;
    background:#ededed;
    overflow:hidden;
}
.handbook_wrapper>#primary{
    flex-grow:1;
    width:100%;
}
.handbook_chapters{
    display:flex;
    flex-direction:column;
}
.handbook_chapters .chapter_wrap{
    display:flex;
    align-items:center;
    align-content:center;
    
}
#handbook_sidebar:hover,
#handbook_sidebar.toggled_open{
    max-width:300px;
}
.chapter_wrap,
.sub_chapters{
    opacity:0;
    transition: opacity 0.4s ease;
    min-width:300px;
}
#handbook_sidebar:hover .chapter_wrap,
#handbook_sidebar.toggled_open .chapter_wrap,
#handbook_sidebar:hover .sub_chapters,
#handbook_sidebar.toggled_open .sub_chapters{
    opacity:1;
}
.handbook_chapters a.chapter{
    padding: 8px 8px 8px 13px;
    text-decoration: none;
    transition: background-color 0.1s ease;
    transition: color 0.1s ease, background-color 0.1s ease;
    width:100%;
    flex-grow:1;
    flex-shrink:1;
}
.handbook_chapters a.chapter.chapter_active{
    background:var(--wp--preset--color--secondary);;
    color:#fff !important;
}
.handbook_chapters a:hover{
    background:var(--wp--preset--color--secondary);
    color:#fff !important;
}
.chapter_expander{
    padding: 8px 12px 12px;
    flex-grow:0;
    flex-shrink:0;
    color:#aaa;
    cursor:pointer;
}
.chapter_expander svg{
    display: block;
}
.chapter_expanded .chapter_expander{
    transform:rotate(180deg);
}
.handbook_chapters .sub_chapters{
    margin-left: 12px;
    border-left: 2px solid var(--wp--preset--color--secondary);;
    
    display:flex;
    flex-direction:column;
    
    transition:max-height 0.4s ease;
    transition:max-height 0.4s ease, margin 0.4s ease, opacity 0.4s ease;
    
    max-height:0;
    margin-top:0;
    margin-bottom:0;
    overflow:hidden;
}
.handbook_chapters .chapter_expanded+.sub_chapters{
    max-height:800px;
    max-height:var(--opened-height);
    margin-top:8px;
    margin-bottom:8px;
}
.handbook_chapters a.sub_chapter{
    font-size:0.9em;
}

.close_chapter_nav{
    display:inline-block;
    padding: 8px 12px 12px;
    color:#aaa;
    cursor:pointer;
    /* border-bottom:1px solid #aaa; */
    text-align:right
}
#handbook_sidebar.toggled_open #chapters_solid_bars{
    display:inline-block !important;
}
#handbook_sidebar.toggled_open #chapters_half_bars{
    display:none;
}
