@import "common";

@header-height: 60px;
@tab-height: 32px;

header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: @header-height;
  background: @theme-lighter-bg;

  input[type=text] {
    border: none;
    border-bottom: 1px solid @theme-selection-bg;
  }

  span {
    padding: 12px;
  }

  span.button {
    background: none;
    border: none;
    color: @theme-default-fg;
    cursor: pointer;

    i {
      line-height: 30px;
    }
  }
}

nav.frame-list {
  position: absolute;
  top: @header-height;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0;
  -webkit-app-region: drag;
  overflow-y: scroll;

  .padding {
    background-color: @theme-default-bg;
    background-size: 100% 100%;
    image-rendering: pixelated;
  }

  div.container {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    overflow: hidden;
  }

  div.frame {
    position: absolute;
    left: 0;
    right: 0;
    padding: 5px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid @theme-default-bg;
    border-right: 1px solid @theme-default-bg;
    box-sizing: border-box;

    div.header {
      display: flex;
      width: 100%;
      flex-grow: 0;

      span {
        flex-grow: 1;
      }
      span.right {
        text-align: right;
      }
    }

    div.content {
      display: flex;
      width: 100%;
      flex-grow: 1;
    }
  }

  &::-webkit-scrollbar {
    background-color: @theme-lighter-bg;
    background-size: 100% 100%;
    image-rendering: pixelated;
  }

  &::-webkit-scrollbar-thumb {
    background: fade(@theme-selection-bg, 20%);
    border: 3px solid @theme-default-fg;
  }
}

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

  .detail-view {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow-y: scroll;
    padding: 20px;
  }

  .tool-view {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid @theme-lighter-bg;

    .tab-container {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      height: @tab-height;
      border-bottom: 1px solid @theme-lighter-bg;

      span {
        -webkit-user-select: none;
        cursor: pointer;
        display: inline-block;
        line-height: 32px;
        padding: 0 20px;

        &[active] {
          background: @theme-lighter-bg;
        }
      }
    }

    .panel-container {
      position: absolute;
      top: @tab-height;
      right: 0;
      left: 0;
      bottom: 0;
    }

    .panel-wrapper {
      visibility: hidden;

      &[active] {
        visibility: visible;
      }
    }
  }

  ul {
    list-style: none;
    padding-left: 5px;

    summary.attribute {
      &::-webkit-details-marker {
        display: none;
      }
    }

    summary.layer {
      font-size: 1em;
      border-radius: 2px;
      padding: 5px;
      margin: 10px 0;
      transform: translateX(-5px);
      cursor: default;
      &::-webkit-details-marker {
        display: none;
      }
    }

    details > summary {
      i.fa-circle-o {
        display: inline;
      }
      i.fa-arrow-circle-down, i.fa-arrow-circle-right {
        display: none;
      }
    }

    details > summary.children {
      i.fa-arrow-circle-right {
        display: inline;
      }
      i.fa-arrow-circle-down, i.fa-circle-o {
        display: none;
      }
    }

    details[open] > summary.children {
      i.fa-arrow-circle-right, i.fa-circle-o {
        display: none;
      }
      i.fa-arrow-circle-down {
        display: inline;
      }
    }

    li {
      padding-left: 5px;
      cursor: default;
    }

    span {
      opacity: 0.8;
      display: inline-block;
    }

    span.label {
      min-width: 200px;
      display: inline-block;
      margin-left: 10px;
      color: @theme-keywords;

      &.summary {
        color: @theme-classes;
      }

      &.error {
        color: @theme-error;
      }
    }
  }
}

.dialog {
  label {
    margin: 5px 0;
    display: block;
  }

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

  li {
    padding: 6px 0;
  }
}
