#header {
    box-sizing: border-box;
    padding: 1em 1ex;
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
}

#header.open {
    border-radius: 0 1em 1em 0;
    width: 250px;
    padding: 1em;
}

#header,
#header .submenu ul {
    background: var(--menu);
}

#header hr {
    color: var(--heading);
}

#header .bar {
    font-size: 16px;
    font-weight: 500;
    box-sizing: border-box;
    height: 100%;
    position: relative;
}

#header .bar a {
    border-radius: 1ex;
    color: white;
    display: block;
    height: 3em;
    line-height: 3;
    margin-right: 0;
    opacity: 0.5;
    text-decoration: none;
}

#header .bar .submenu a {
    border-radius: 0;
}

#header .bar a span {
    display: none;
}

#header.open .bar a span {
    display: inline;
    padding-right: 1em;
}

#header .bar .options {
    min-width: 60px;
}

#header .bar .options > a {
    padding-left: 1ex;
    margin-bottom: 1ex;
}

#header .bar a.menu-icon {
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px;
    padding-left: 60px;
}

#header.open .bar a.menu-icon,
#header .bar .submenu a.menu-icon {
    background-position-x: 1em;
}

#header .bar a:hover {
    opacity: 1;
}

#header .bar .menu-icon[href^="search"] { background-image: url("../img/search.svg"); }
#header .bar .menu-icon[href^="search"]:hover { background-image: url("../img/search-active.svg"); }
#header .bar .menu-icon.selected[href^="search"] { background-image: url("../img/search-selected.svg"); }

#settings { fill: red; }
#header .bar .menu-icon[href^="colors"],
#header .bar .menu-icon[href^="editor"] { background-image: url("../img/settings.svg"); }
#header .bar .menu-icon[href^="colors"]:hover,
#header .bar .menu-icon[href^="editor"]:hover { background-image: url("../img/settings-active.svg"); }
#header .bar .menu-icon.selected[href^="colors"],
#header .bar .menu-icon.selected[href^="editor"] { background-image: url("../img/settings-selected.svg"); }

#header .bar .menu-icon[href^="accounts"] { background-image: url("../img/accounts.svg"); }
#header .bar .menu-icon[href^="accounts"]:hover { background-image: url("../img/accounts-active.svg"); }
#header .bar .menu-icon.selected[href^="accounts"] { background-image: url("../img/accounts-selected.svg"); }

#header .bar .menu-icon[href^="login"],
#header .bar .menu-icon[href^="logout"] { background-image: url("../img/logout.svg"); background-color: var(--active); color: var(--text); }
#header .bar .menu-icon[href^="login"]:hover,
#header .bar .menu-icon[href^="logout"]:hover { background-image: url("../img/logout-active.svg"); color: var(--heading); }
#header .bar .menu-icon.selected[href^="login"] { background-image: url("../img/logout-selected.svg"); }

#header .bar a.selected,
#header .bar a.selected:hover {
    color: var(--active);
}

#header .bar a.selected {
    background-color: var(--heading);
}

#header .bar a img {
    margin: 0 1em;
    vertical-align: middle;
}

#header .profile .circle {
    width: 40px;
    height: 40px;
}

#header.open .profile .circle {
    display: inline-block;
}

#header .profile .circle,
#header .submenu .company {
    vertical-align: middle;
}

#header .submenu {
    background: url('../img/dots-v.svg') no-repeat right center / contain;
    cursor: pointer;
    padding-right: 0;
    position: relative;
}

#header.open .submenu {
    background-image: url('../img/dots-h.svg');
    padding-right: 64px;
}

#header .submenu .company {
    color: white;
    display: none;
    font-size: 11px;
    margin-left: 1ex;
    max-width: 100px;
    max-height: 40px;
    overflow: hidden;
    text-transform: uppercase;
}

#header.open .submenu .company {
    display: inline-block;
}

#header .submenu ul {
    border: thin solid var(--active);
    display: none;
    line-height: normal;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 100%;
    top: 0;
    text-align: left;
    white-space: nowrap;
    z-index: 1;
}

#header .submenu ul a {
    display: block;
    padding: 0 1em;
    margin: 0;
}

#header .submenu.open ul {
    display: block;
}

#header .bottom {
    position: absolute;
    left: 0;
    bottom: 3em;
    width: 100%;
    white-space: nowrap;
}

#header #logo {
    display: inline-block;
    overflow: hidden;
    width: 24px;
    height: 80px;
    vertical-align: middle;
}

#header.open #logo {
    width: auto;
    height: auto;
}

#header #logo img {
    position: relative;
    top: -50px;
    width: 200px;
}

#header #toggle {
    display: inline;
    padding-left: 1ex;
    position: relative;
    top: 1em;
    vertical-align: top;
}

#header #toggle::before {
    content: '\276f';
}

#header.open #toggle::before {
    content: '\276e';
}
