// Copyright 2017 Palantir Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0.

@import "../../common/variables";

.#{$ns}-select-popover {
  .#{$ns}-popover-content,
  .#{$ns}-popover2-content {
    // use padding on container rather than margin on input group
    // because top margin leaves some empty space with no background color.
    padding: $pt-grid-size * 0.5;
  }

  .#{$ns}-input-group {
    margin-bottom: 0;
  }

  .#{$ns}-menu {
    max-height: $select-popover-max-height;
    max-width: $select-popover-max-width;
    overflow: auto;
    padding: 0;

    &:not(:first-child) {
      // adjust padding to account for that on .#{$ns}-popover-content above
      padding-top: $pt-grid-size * 0.5;
    }
  }

  &.#{$ns}-popover2-match-target-width,
  &.#{$ns}-select-match-target-width { // deprecated: this class is only used by <Select>
    width: 100%;

    .#{$ns}-menu {
      max-width: none;
      min-width: 0;
    }
  }
}
