// Lightning Design System 2.24.3
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license

/**
 * @name panels
 * @selector .slds-popover_panel
 * @restrict .slds-popover
 * @support dev-ready
 * @variant
 */
.slds-popover_panel,
.slds-popover--panel {

  .slds-popover__header {
    background: var(--slds-g-color-neutral-base-95, #{$color-background});
    padding: $spacing-large $spacing-large $spacing-small;
    border-top-left-radius: calc(#{$border-radius-medium} - #{$border-width-thin});
    border-top-right-radius: calc(#{$border-radius-medium} - #{$border-width-thin});
    border-bottom: 0;
  }

  .slds-popover__body {
    padding: 0;
  }

  .slds-popover__body-list {
    padding: $spacing-medium $spacing-large;
    border-top: $border-width-thin solid var(--slds-g-color-border-base-1, #{$color-border});
  }

  // Deal with Nubbin Color
  &.slds-nubbin_left-top,
  &.slds-nubbin--left-top,
  &.slds-nubbin_right-top,
  &.slds-nubbin--right-top,
  &.slds-nubbin_top-left,
  &.slds-nubbin--top-left,
  &.slds-nubbin_top-right,
  &.slds-nubbin--top-right {

    &:before,
    &:after {
      background: var(--slds-g-color-neutral-base-95, #{$color-background});
    }
  }

  // Align nubbin to the icon
  &.slds-nubbin_left-top,
  &.slds-nubbin--left-top,
  &.slds-nubbin_right-top,
  &.slds-nubbin--right-top {

    &:before,
    &:after {
      top: ($spacing-large + $spacing-small);
    }
  }
}

/**
 * @name Label for panels
 * @selector .slds-popover_panel__label
 * @restrict .slds-popover_panel p
 */
.slds-popover_panel__label {
  @include text-title;
}
