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

// Annotation in cards/einstein/index.scss
.slds-einstein-header {
  position: relative;
  background-color: var(--slds-g-color-palette-cloud-blue-80, #{$einstein-header-background-color});
  background-image: url($static-image-path + $einstein-header-background);
  background-repeat: no-repeat;
  background-position: left top;
  background-size: cover;
  border-radius: calc(#{$border-radius-medium} - 1px) calc(#{$border-radius-medium} - 1px) 0 0;
  border-bottom: $border-width-thin solid var(--slds-g-color-border-base-1, #{$color-border});
  padding-top: $spacing-small;
  padding-bottom: $spacing-small;
  text-shadow: 0 0 4px var(--slds-g-color-palette-cloud-blue-90, #{$einstein-header-text-shadow});

  .slds-popover__close {
    color: currentColor;
  }

  /**
   * @summary Einstein themed card header figure
   * @selector .slds-einstein-header__figure
   * @restrict .slds-einstein-header, div, header
  */
  .slds-einstein-header__figure,
  .slds-einstein-header__figure:last-child {
    margin-bottom: calc((#{$spacing-small} + 5px) * -1);
    height: rem(76px);
    background-image: url($static-image-path + $einstein-header-figure);
    background-position: right bottom;
    background-repeat: no-repeat;
  }

  /**
   * @summary Einstein themed card header actions
   * @selector .slds-einstein-header__actions
   * @restrict .slds-einstein-header
  */
  .slds-einstein-header__actions {
    padding-left: $spacing-medium;
    display: flex;
    align-items: center;
  }

  .slds-popover__close {
    position: absolute;
    top: 0;
    right: 0;
  }
}

// Annotation in popovers/einstein/index.scss
.slds-popover_einstein {

  &.slds-nubbin_top,
  &.slds-nubbin--top,
  &.slds-nubbin_top-left,
  &.slds-nubbin--top-left,
  &.slds-nubbin_top-right,
  &.slds-nubbin--top-right,
  &.slds-nubbin_left-top,
  &.slds-nubbin--left-top,
  &.slds-nubbin_right-top,
  &.slds-nubbin--right-top {

    &:before {
      background-color: var(--slds-g-color-palette-cloud-blue-80, #{$einstein-header-background-color});
    }
  }
}
