/*
 * Copyright (c) 2019-present Sonatype, Inc.
 * This program and the accompanying materials are made available under
 * the terms of the Eclipse Public License 2.0 which accompanies this
 * distribution and is available at https://www.eclipse.org/legal/epl-2.0/.
 */
@use '../../scss-shared/nx-text-helpers';
@use '../../scss-shared/nx-dark-mode-helpers';

.nx-tooltip {
  // for specificity
  &.MuiTooltip-tooltip {
    @include nx-text-helpers.semi-bold;

    box-sizing: border-box;
    background-color: var( --nx-color-tooltip-background);
    border-radius: var(--nx-border-radius);
    color: var(--nx-color-tooltip-text);
    font-size: var(--nx-font-size-s);
    line-height: var(--nx-line-height);
    max-width: 800px;
    padding: var(--nx-spacing-2x) var(--nx-spacing-4x);

    // for even more specificity
    .MuiTooltip-popper & {
      &.MuiTooltip-tooltipPlacementTop, &.MuiTooltip-tooltipPlacementBottom {
        margin: var(--nx-spacing-2x) 0;
      }
      &.MuiTooltip-tooltipPlacementRight, &.MuiTooltip-tooltipPlacementLeft {
        margin: 0 var(--nx-spacing-2x);
      }
    }
  }
}
