$primary: #5867dd;
$secondary: #e1e1ef;
$text: #8a8a8a;

@import 'button';
@import 'table';
@import 'dashboard';

a {
    color: $text;
    &:hover {
        color: $primary;
    }
}

::-webkit-scrollbar {
  width: 8px;
}
/* Track */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 6px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}

.primary {
    color: $primary;
}

form .aligned p.help, form .aligned div.help {
    clear: initial;
}

.breadcrumbs {
    white-space: nowrap;
    overflow: hidden;
}

#left-box__header h1 {
    font-weight: bold;
}

.juss-filter-select {
    background-color: #eee;
    border: none !important;
}

.inline-group .tabular tr td.original p {
    display: none;
}

/** when is popup **/
.popup {
    #container {
        display: initial;
        min-width: initial;
    }
    #content {
        margin-top: 0;
    }
}

#left-box {
  width: 280px;
  min-width: 280px;
  height: 100vh;
  background: #1e2129;
  box-sizing: border-box;
}
#left-box__header {
  height: 3.5rem;
  line-height: 3.5rem;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0,0,0,0.12);
}
#left-box__header h1 {
  color: white;
  margin: 0;
}
#left-box > ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
  padding: 1rem 0;
  box-sizing: border-box;
  height: calc(100vh - 3.5rem);
  overflow-y: auto;
  & > li {
    & > a {
      color: rgba(255,255,255,0.95);
      font-weight: bold;
      padding: 0 1rem;
      line-height: 2.8rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      letter-spacing: 2px;
      &:hover {
        background: #2d323e;
        color: rgba(255,255,255,1);
        //background: rgba(0,0,0,0.2);
      }
      svg {
        transition: all .25s;
        width: 14px;
        height: 14px;
      }
    }
    & + .active {
      & > ul {
        transition: all .25s;
        padding: .5rem 0;
        height: auto;
      }
      & > a {
        background: #2d323e;
      }
      svg {
        transform: rotate(90deg);
      }
      & .active > a {
        border-color: var(--primary);
      }
    }
    & > ul {
      overflow: hidden;
      height: 0;
      margin: 0;
      padding: 0;
      list-style-type: none;
      & > li {
        & > a {
          display: block;
          line-height: 2.25rem;
          padding: 0 2rem;
          color: rgba(255,255,255,0.85);
          border-left: 5px solid transparent;
          &:hover, &:active {
            border-color: var(--primary);
            color: rgba(255,255,255,0.95);
          }
        }
      }
    }
  }
}
/**
#left-box dl {
  margin: 0;
  padding: 0;
  list-style-type: none;
  background: #2d323e;
  padding: 1rem 0;
  box-sizing: border-box;
  height: calc(100vh - 3.5rem);
  overflow-y: auto;
}
#left-box dt {
  height: 2rem;
  line-height: 2rem;
  padding: 0 1rem;
  margin-top: 1rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#left-box dl dd {
  padding-right: 1rem;
}
#left-box dl dd a {
  text-decoration: none;
  display: block;
  padding: 0 1rem;
  line-height: 2rem;
  height: 2rem;
  color: white;
}
#left-box dl dd:hover {
  background: rgba(255,255,255,0.05);
}
#left-box dl .active a {
  background: var(--primary);
  border-radius: 0 2rem 2rem 0;
}
**/
#right-box {
  flex: 1;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  height: 100vh;
  overflow-y: auto;
  &::-webkit-scrollbar-track {
    background: transparent;
  }
  &::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 6px;
  }
  &::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.15);
  }
}


/** change-list-view **/
#changelist .paginator {
  border: none !important;
  margin-top: 1rem !important;
}

.paginator a:link, .paginator a:visited {
  background-color: var(--primary) !important;
}
.paginator a.showall {
  color: var(--primary) !important;
  background-color: transparent !important;
}

#user-tools2 {
  margin: 0;
  padding: 0;
}
#user-tools2 > li {
  display: inline-block;
  position: relative;
}
#user-tools2 > li > a {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}
#user-tools2 > li:hover > a {
  background-color: rgba(77,89,149,.06);
  color: var(--primary);
}
#user-tools2 > li > ul {
  display: none;
  position: absolute;
  top: 2rem;
  right: 0;
  background-color: var(--white);
  box-shadow: 1px 2px var(--light);
  margin: 0;
  padding: 0;
  list-style-type: none;
  border-radius: 0.25rem;
  z-index: 9999;
}
#user-tools2 > li > ul > li{
  display: block;
  border-bottom: 1px solid rgba(0,0,0,0.12);
}
#user-tools2 > li > ul > li:last-child {
  border-bottom: none !important;
}
#user-tools2 > li > ul > li > a{
  display: block;
  padding: 0.5rem 1.5rem;
  white-space: nowrap;
}
#user-tools2 > li:hover > ul {
  display: inline-block !important;
}


#changelist-filter {
  z-index: auto !important;
  padding: 0.5rem !important;
  background-color: var(--light) !important;
  white-space: nowrap;
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
  &::-webkit-scrollbar {
    display: none;
  }
}

.juss-filter {
  display: inline-block;
  margin: 0 .5rem 0 0;
}

#content {
  position: relative;
  margin-top: 3.5rem;
  padding: 0;
  #inner {
      & > p {
          // logout
          margin: 0;
          padding: .5rem 1rem;
          background-color: white;
          &:first-child {
              padding-top: 1rem;
              border-radius: 0.25rem 0.25rem 0 0;
          }
          &:last-child {
              padding-bottom: 1rem;
              border-radius: 0 0 0.25rem 0.25rem;
          }
      }
  }

#content-main {
  float: initial;
  flex: 1;
  padding: 1rem;
  box-sizing: border-box;
  background-color: white;
  border-radius: 0.25rem;
  // 对象操作按钮
  .object-tools {
    position: absolute;
    top: 4.75rem;
    right: 1.5rem;
    display: block;
    white-space: nowrap;
    overflow-x: auto;
    z-index: 8;
    float: initial;
    text-align: right;
    height: auto;
    &::webkit-scrollbar {
      display: none;
    }
    li {
      display: inline-block;
      float: initial;
      height: auto;
      a {
        display: inline-block !important;
        float: initial !important;
        background-color: transparent;
        border: 1px solid $secondary !important;
        &:focus, &:hover {
          background-color: $secondary !important;
          color: $primary;
          border-color: transparent !important;
        }
      }
    }
  }
}
}


@media (max-width:768px) {
  #content {
    margin-top: 3rem;
    overflow-x: hidden;
    & > h1, #inner, #footer {
      width: 100vw;
      max-width: 100vw;
      box-sizing: border-box;
    }
    .object-tools {
        a {
            background-color: $secondary;
            border: none;
        }
    }
  }
}
