@import 'themes/global-variables.less';

:host {
  // remove default popover padding so that component edges are flush with popover border
  display: block;
  margin: -@padding-sm -@popover-padding-horizontal;
}

:host ::ng-deep {
  .ant-card-body {
    // remove card body padding
    padding: 0;
    // card title has a -1 bottom margin for some reason, partially occluding nz-description's top border
    margin-top: 1px;
  }

  .ant-descriptions-view {
    // removes nz-description container border -
    // nz-card does provide an nzBordered option, but its label backgrounds
    // and compact mode are only applied when its borders are toggled on
    border: none;
    // adds a top border so that stacked nz-descriptions have a divider
    border-top: 1px solid @border-color-split;
  }
}
.popover-text {
  width: 100%;
  // add padding for paragraphs displayed in the card content area
  padding: @padding-sm;
  border-bottom: 1px solid @border-color-split;
}

// global default max dimensions for all popover contents.
// individual popover minimum dimensions are set in the entity-specific .less files.
// See note below for how min-width/heights are specified.
#popover-content {
  max-width: 500px;
  max-height: 700px;
  overflow: auto;
}
// NOTE: min-width/heights are specified in the styles for
// each individual popover component. The minimum dimensions of the popover
// before it is resized after content is loaded. The initial
// placement algorithm will use those dimensions to determine
// the best initial placement for the popover.
// So these should be set as close to the average popover size
// for this entity,without going over its smallest size (given
// the various ways it might be rendered). If there's a big
// difference between these estimates and the final rendered
// size, there will be brief flickering as the popover is resized
// or (worse) repositioned.
