/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

@mixin nb-tooltip-status($status) {
  $background-color: nb-theme(tooltip-#{$status}-background-color);
  $text-color: nb-theme(tooltip-#{$status}-text-color);

  &.status-#{$status} {
    background: $background-color;
    border-color: nb-theme(tooltip-#{$status}-border-color);

    .arrow {
      border-bottom-color: $background-color;
    }

    .content {
      color: $text-color;
    }
  }
}

@mixin nb-tooltip-theme {
  nb-tooltip {
    $arrow-size: 6px;
    box-shadow: nb-theme(tooltip-shadow);

    background: nb-theme(tooltip-background-color);
    border: nb-theme(tooltip-border-width) nb-theme(tooltip-border-style) nb-theme(tooltip-border-color);
    border-radius: nb-theme(tooltip-border-radius);
    padding: nb-theme(tooltip-padding);
    max-width: nb-theme(tooltip-max-width);

    nb-icon:only-child {
      height: nb-theme(tooltip-icon-height);
      width: nb-theme(tooltip-icon-width);
    }
    nb-icon:not(:only-child) {
      height: nb-theme(tooltip-text-font-size);
      width: nb-theme(tooltip-text-font-size);
    }

    .content {
      color: nb-theme(tooltip-text-color);
      font-family: nb-theme(tooltip-text-font-family);
      font-size: nb-theme(tooltip-text-font-size);
      font-weight: nb-theme(tooltip-text-font-weight);
      line-height: nb-theme(tooltip-text-line-height);
    }

    .arrow {
      border-bottom: $arrow-size nb-theme(tooltip-border-style) nb-theme(tooltip-background-color);
    }

    @each $status in nb-get-statuses() {
      @include nb-tooltip-status($status);
    }
  }
}
