// See COPYRIGHT.md for copyright information

@import url("form-controls.less");

#ixv #inspector {
  .menu {
    position: absolute;
    right: 0;
    top: 0;
    line-height: @top-bar-height;
    cursor: pointer;

    .menu-title {
      padding-right: 3.2rem;
      position: relative;
    }

    .menu-title::after {
      .icon-chevron-down();

      font-size: 1.8rem;
      position: absolute;
      right: 1rem;
    }

    .content-container {
      // Fixed position so that we can scroll if the menu is taller than the
      // remaining page space, but this means we need to calculate the top
      // position manually.
      position: fixed;
      top: (@top-bar-height + 3.2rem + 2 * 0.8rem);
      right: 0;
      bottom: 0;
      display: none;
      z-index: 5;

      .content {
        line-height: initial;
        background: #fff;
        border: solid 1px @border-grey;
        max-height: 100%;
        overflow-y: auto;

        .group {
          border-bottom: solid 1px @border-grey;
          border-top: solid 1px @border-grey;
        }

        .item {
          position: relative;
          padding: 10px 25px 10px 30px;
          white-space: nowrap;
          text-align: left;

          &:hover {
            background: @border-grey;
          }

          &.menu-checkbox {
            cursor: pointer;
            user-select: none;
            position: relative;
            display: block;

            // Hide the standard checkbox
            input {
              position: absolute;
              opacity: 0;
              cursor: pointer;
              height: 0;
              width: 0;
            }

            input:checked ~ .checkmark::before {
              .icon-tick();

              position: absolute;
              top: 1.1rem;
              left: 1rem;
            }
          }
        }

        a.item {
          display: block;
          color: @text;

          &:hover {
            text-decoration: none;
          }
        }
      }
    }
  }

  .toolbar-menu {
    .menu-checkbox {
      .wk-checkbox();

      margin-left: 1.8rem;
    }
  }
}
