@import "common";

@nav-width: 280px;

[disabled] {
  opacity: 0.6;
}

nav {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: @nav-width;
  padding: 0;
  -webkit-app-region: drag;
  overflow-y: hidden;
  border-right: 1px solid @theme-lighter-bg;

  .mode-selector {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 40px;
    display: flex;
    border-bottom: 1px solid @theme-lighter-bg;

    button {
      flex-grow: 1;
      border: none;
      color: @theme-default-fg;
      background-color: @theme-default-bg;

      &:hover {
        background: @theme-lighter-bg;
      }

      &[active] {
        color: @theme-default-bg;
        background-color: @theme-default-fg;
      }
    }
  }

  .registry-packages, .local-packages {
    position: absolute;
    top: 40px;
    right: 0;
    left: 0;
    bottom: 0;
    overflow-y: scroll;
  }

  ul {
    list-style: none;
    padding: 0;
    margin: 0;

    li {
      padding: 0;
      -webkit-user-select: none;

      h4 {
        font-size: 1.0em;
        margin: 0 0 5px 0;
      }

      span {
        white-space: nowrap;
        text-overflow: ellipsis;
        display: block;
        overflow: hidden;
      }

      a {
        padding: 10px 15px;
        display: block;
        cursor: pointer;
        text-decoration: none;

        &:hover {
          background: @theme-lighter-bg;
        }

        &[active] {
          color: @theme-default-bg;
          background-color: @theme-default-fg;

          h4 {
            color: @theme-default-bg;
          }
        }
      }
    }
  }
}

main {
  position: absolute;
  top: 0;
  bottom: 0;
  left: @nav-width;
  right: 0;
  overflow-y: scroll;

  span.version, span.schema-path {
    margin: 10px 25px;
    font-weight: normal;
    color: @theme-dark-fg;
  }

  input[type=button] {
    max-width: 120px;
  }
}
