/*
 * 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-container-helpers';
@use '../scss-shared/nx-button-helpers';
@use '../scss-shared/nx-text-helpers';

.nx-global-header {
  align-items: center;
  background-color: var(--nx-color-component-background);
  border-bottom: var(--nx-border-width-alt) solid var(--nx-color-global-header-border);
  display: flex;
  grid-area: header; // see nx-page's grid-template
  height: 42px;
  padding: 0 var(--nx-spacing-6x);

  .nx-back-button {
    @include nx-text-helpers.truncate-ellipsis;
    // The negative margins and added paddings are added to
    // fix the blue outline being hidden by overflow: hidden when focused.
    margin: 0 var(--nx-spacing-8x) 0 -4px;
    padding: var(--nx-spacing-base);
  }
}

.nx-global-header__actions {
  align-items: center;
  border-left: var(--nx-border-default);
  display: flex;
  margin-left: auto;
  padding-left: var(--nx-spacing-8x);

  .nx-btn--icon-only {
    @include nx-button-helpers.small-icon-btn;
  }

  @include nx-container-helpers.container-horizontal;
}
