@import "common";

body {
  .mixin (@b) when not (@b = darwin) {
    background-color: darken(@theme-default-bg, 5%);
  }
  .mixin (@node-platform);
}

nav {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 38px 0;
  -webkit-app-region: drag;
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 8px;
  }

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

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

      a {
        padding: 8px 20px;
        display: block;
        cursor: pointer;
        text-decoration: none;

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

      .close-button {
        float: right;
      }
    }
  }
}

main {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  &.loading {
    background-color: @theme-default-bg;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  webview {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    visibility: hidden;

    &[loading] {
      transform: translateX(100%);
      visibility: visible;
    }

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