.convos-main-menu,
.is-sidebar {
  width: 100%; // small screens
  background-color: $sidebar-bg;
  position: absolute;
  top: $navbar-height-mobile;
  bottom: 0;
  z-index: $z-index-header + 1;
  @include overflow;

  @media #{$large-and-up} {
    top: $navbar-height;
  }

  &.hidden { display: none !important; }
}

.convos-main-menu {
  left: 0; // small screen

  @media #{$large-and-up} {
    width: $main-menu-width;
    &.show-on-large {
      display: block !important;
    }
  }

  .link {
    display: block;
    position: relative;

    a {
      padding: $gutter-width / 2;
      display: block;
    }

    &:hover, &.focus {
      background-color: darken($sidebar-bg, 6%);
    }

    &.active {
      background-color: $body-bg;
      a {
        color: darken($link-color, 15%);
        font-weight: bold;
      }
    }

    &.frozen a {
      color: $error-text-color;
    }

    .material-icons { vertical-align: top; }
    &.simple .material-icons { vertical-align: bottom; }
  }

  .on {
    display: block;
    font-size: 0.9rem;
    color: lighten($text-color, 30%);
    margin-left: 28px;
    margin-bottom: -5px;
  }

  .close, .n-unread {
    color: #fff;
    font-weight: 300;
    min-width: auto;
    border-radius: 2px;
    top: $gutter-width / 2 + 0.1rem;
    right: $gutter-width / 2;
  }

  .n-unread {
    background-color: $badge-bg-color;
    font-size: 0.9rem;
  }

  .close {
    background-color: $error-text-color;
    font-size: 1.2rem;
    line-height: 1.35rem;
    padding: 0 4px;
    cursor: pointer;
    display: none;
  }
}

.is-sidebar {
  right: 0;
  @media #{$large-and-up} {
    width: $sidebar-width;
  }
}

.convos-sidebar-info,
.convos-notifications {
  .row {
    margin-bottom: $gutter-width / 2;
  }

  .menu-item {
    border-top: 1px solid darken($sidebar-bg, 5%);
    border-bottom: 1px solid darken($sidebar-bg, 5%);
    margin-top: -1px; // hack for collapsing borders
    padding: 0 $gutter-width / 2;
    overflow: hidden;

    &, i { line-height: 2.1rem;}
    &:hover { background-color: darken($sidebar-bg, 6%); }
    .material-icons { vertical-align: text-bottom; }

    > a:only-child { display: block; }
  }

  .btn-floating {
    box-shadow: none;
    vertical-align: middle;
    float: right;
    top: -6px;
  }

  .notification {
    display: block;
    cursor: pointer;
    padding-top: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid darken($sidebar-bg, 6%);

    h5, .secondary-content {
      font-size: $h6-fontsize;
      line-height: 110%;
      margin: ($h6-fontsize / 2) 0 ($h6-fontsize / 2.5) 0;
    }

    &.read { opacity: 0.7; }
  }
}

.on-connect-commands {
  textarea.materialize-textarea {
    padding: 0.6rem 0;
    height: 1.6rem;
    min-height: 1.6rem;
    max-height: 9.5rem;
    overflow: auto;
  }
}

header a.notifications {
  position: relative;

  i.active { // notifications
    position: relative;
  }

  b.n-notifications {
    color: darken($navbar-font-color, 10%);
    font-size: 1rem;
    line-height: 1rem;
    position: absolute;
    bottom: 5px;
    right: 5px;
  }
}

body.notouch .convos-main-menu {
  .link.dialog:hover {
    .close { display: block; }
    .close:hover { background-color: darken($error-text-color, 10%); }
    .n-unread { display: none; }
  }
}

body.no-header {
  .convos-main-menu,
  .is-sidebar {
    top: 0;
  }
}

body.no-menu {
  .convos-main-menu { display: none !important; }
}

body.no-sidebar {
  .is-sidebar { display: none !important; }
}
