@import "ui-variables";

.menu {
  flex: 1;
  display: flex;
  flex-direction: column;

  .header-container {
    flex-shrink: 0; // Don't squish the header! There may be a search box here
    background-color: @background-color-secondary;
    border-bottom: 1px solid @base-border-color;
    padding: 3px;
    position: relative;
    input.search {
      border: 1px solid darken(@background-color-secondary, 10%);
      border-radius: 3px;
      padding-left: 0;
      background-color: white;
      background-repeat: no-repeat;
      background-image: url("../static/images/search/searchloupe@2x.png");
      background-size: 15px 15px;
      background-position: 7px 4px;
      text-indent: 31px;
      box-shadow: inset 0 1px 0 rgba(0,0,0,0.05), 0 1px 0 rgba(0,0,0,0.05)
    }
  }

  .footer-container {
    position: relative;
  }

  .content-container {
    background: @background-color-secondary;
    width: 100%;
    margin-top: -1px;
    overflow: auto;
  }

  .item {
    display: block;
    padding-left: @padding-base-horizontal;
    padding-top: @padding-base-vertical;
    padding-bottom: @padding-base-vertical;
    cursor: default;
    color: @text-color;
    width: 100%;
    overflow: hidden;

    .primary {
      max-width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    .secondary {
      max-width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      padding-left:5px;
      color:@text-color-very-subtle;
    }
  }

  .item.divider {
    font-weight:@headings-font-weight;
    color: @menu-divider-color;
    font-size: @font-size-small;
    text-transform: uppercase;
    margin-top: 10px;
    pointer-events: none;
  }

  .item.checked {
    background-image:url(./images/menu/checked@2x.png);
    background-size: 16px;
    background-position: right;
    background-repeat: no-repeat;
    background-position-x: 97%;
    margin-right: 20px;
    padding-right: 10%;
  }

  .item.selected.checked, .item.checked:hover {
    background-image:url(./images/menu/checked-selected@2x.png);
  }

  .item.selected, .item:hover, .item:active {
    text-decoration: none;
    background-color: @accent-primary;
    color: @text-color-inverse;
    .primary {
      color: @text-color-inverse;
    }
    .secondary {
      color: @text-color-inverse-very-subtle;
    }
  }
}
body.platform-win32 {
  .menu {
    .header-container {
      input.search {
        border-radius: 0;
      }
    }
  }
}
