/* topnav */
.topnav {
  background-color: #555;
  position: fixed;
  width: 100%;
  top: 0px;
  border-bottom: 1px solid #555;
  z-index: 100;
}
.topnav .logo {
  height: 35px;
  float: right;
  padding: 5px 10px;
}
.topnav a, .topnav a:link, .topnav a:visited {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: calc(var(--menu_height) / 2 - 16px) 16px;
  text-decoration: none;
  font-size: 17px;
}
.topnav a.topnav-icon {
  padding: 4px;
  cursor: help;
}
.topnav a.topnav-icon img {
  width: calc(var(--menu_height) - 24px);
  height: calc(var(--menu_height) - 24px);
}
.topnav .active {
  background: var(--clr_secondary_bg);
  color: var(--clr_secondary_fg)!important;
}
.topnav .icon {
  display: none;
  height: 17px;
}
.topnav .dropdown {
  float: left;
  overflow: hidden;
}
.topnav .dropdown .dropbtn {
  font-size: 17px;
  border: none;
  outline: none;
  color: var(--clr_primary_fg);
  padding: calc(var(--menu_height) / 2 - 16px) 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
}
.topnav .dropdown .dropbtn.img {
  padding: 0px;
}
.topnav .dropdown .dropbtn img {
  width: calc(var(--menu_height) - 24px);
  height: calc(var(--menu_height) - 24px);
  padding: 3px;
}
.topnav .dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  margin-top: 1;
}
@media screen and (min-width: 800px) {
  .topnav .dropdown-content {
    transform: scaleY(0);
    transform-origin:top;
    transition: transform 0.2s linear;
    display: block;
  }
}
.topnav .dropdown-content a {
  float: none;
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}
.topnav a:hover, .topnav .dropdown:hover .dropbtn, .topnav .dropdown-content a:hover {
  background: var(--clr_primary_bg);
  color: var(--clr_primary_fg)!important;
}
.topnav .dropdown:hover .dropdown-content {
  display: block;
  transform: scaleY(1);
}
@media screen and (max-width: 800px) {
  .topnav {
    border-bottom: none;
  }
  .topnav a, .topnav .dropdown .dropbtn {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
  }
  .topnav.responsive {
    position: relative;
    position: fixed;
    width: 100%;
    top: 0px;
  }
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  .topnav.responsive .dropdown {
    float: none;
  }
  .topnav.responsive .dropdown-content {
    position: relative;
  }
  .topnav.responsive .dropdown .dropbtn {
    display: block;
    width: 100%;
    text-align: left;
  }
}

/* notifications */
.topnav .dropdown.notification {
  width: 80px;
}
.topnav .dropdown.notification .dropbtn {
  padding: 0;
  min-width: 0;
  width: 60px;
  position: relative;
  display: inline-block;
}
.topnav .dropdown.notification .dropbtn img {
  width: 35px;
  height: 35px;
  padding: 5px;
}
.topnav .dropdown.notification .dropbtn .badge {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 15px;
  height: 15px;
  padding: 3px;
  line-height: 15px;
  text-align: center;
  border-radius: 50%;
  background: #ff744f;
  color: white;
}
.topnav .dropdown.notification .dropdown-content {
  max-height: 300px;
  width: 500px;
  overflow-y: scroll;
}
.topnav .dropdown.notification .dropdown-content a {
  border-bottom: 1px solid grey;
  padding: 10px 5px;
  cursor: pointer;
}
.topnav .dropdown.notification .dropdown-content a:last-child {
  border-bottom: none;
}
.topnav .dropdown.notification .dropdown-content a div {
  display: table-cell;
}
.topnav .dropdown.notification .dropdown-content a .notfication-text {
  width: 380px;
  font-size: 85%;
  padding-right: 5px;
  vertical-align: middle;
}
.topnav .dropdown.notification .dropdown-content a .notfication-time {
  width: 90px;
  font-size: 80%;
  font-style: italic;
  vertical-align: middle;
}
.topnav .dropdown.notification .dropdown-content a .notfication-type {
  vertical-align: middle;
}
.topnav .dropdown.notification .dropdown-content a .notfication-type::after {
  display: block;
  content: "";
  width: 10px;
  height: 10px;
  background: #ff744f;
  border-radius: 50%;
}
.topnav .dropdown.notification .dropdown-content a:hover .notfication-type::after {
  background: white;
}

/* content */
#content {
  padding-top: var(--menu_height);
  font-size: 14px;
}

/* button bar */
.buttonbar {
  height: 40px;
  width: calc(100% - 10px);
  padding: 5px 5px;
  z-index: 10;
  background-color: #aaa;
}
.buttonbar button.save {
  background: var(--btn_primary_bg);
  color: var(--btn_primary_fg);
  float: right;
}
@media screen and (min-width: 800px) {
  .buttonbar {
    position: fixed;
    bottom: 0px;
  }
  .topnav a.icon {
    display: none;
  }
}

.buttonbar .btngrp {
  position: relative;
  display: inline-block;
}
.buttonbar .btngrp .dropbtn {
  padding: 7px;
}
.buttonbar .btngrp .btngrp-content {
  display: none;
  position: absolute;
  bottom: 30px;
  background-color: #f1f1f1;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}
.buttonbar .btngrp:hover .btngrp-content {
  display: block;
}
