/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * @file
 * Navigation top bar layout styles.
 */

/* cspell:ignore xxxs */

:root {
  --drupal-displace-offset-top: 4rem;
  --admin-toolbar-top-bar-height: 4rem;
}

:is(#extra-specificity-hack, [data-drupal-admin-styles]).gin--navigation-top-bar {
  height: auto;
  min-height: 4rem;
  opacity: 0.95;
  border-block-end: 1px solid var(--admin-color-border-soft);
  background: var(--admin-color-bg-surface);
  box-shadow: none;
  padding-inline: calc(var(--admin-toolbar-sidebar-width) + var(--admin-space-m)) var(--admin-space-m);
  padding-block: var(--admin-space-3xs);

  .gin--high-contrast-mode & {
    background: var(--admin-color-bg-surface);
    backdrop-filter: none;
  }

  &--offset {
    margin-top: calc(4rem + var(--admin-space-s));
  }

  &:has(.top-bar__tools:not(:empty), .top-bar__context:not(:empty), .top-bar__actions:not(:empty)) {
    display: flex;
  }

  .top-bar__burger {
    align-self: center;
  }

  .top-bar__context {
    gap: var(--admin-space-xs);
  }

  .top-bar__actions,
  .local-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--admin-space-xs);
  }

  .local-actions,
  .local-actions__item,
  .form-actions,
  .gin-sticky-form-actions {
    width: auto;
    margin: 0;
  }

  .toolbar-title {
    color: var(--admin-color-text);
  }

  .toolbar-title__icon path {
    fill: var(--admin-color-text);
  }

  .toolbar-button {
    font-size: var(--admin-font-size-xs);
    font-weight: var(--admin-font-weight-semibold);
    font-variation-settings: normal;
  }

  .toolbar-dropdown__menu {
    box-sizing: border-box;
    padding: var(--admin-space-xs);
    border-radius: var(--admin-radius-l);
    background-color: var(--admin-color-bg-raised);
    box-shadow: var(--admin-shadow-2);
    gap: 0;

    .toolbar-dropdown__link {
      box-sizing: border-box;
      width: 100%;
      max-width: 15rem;
      margin: 0 !important;
      padding: var(--admin-space-s);
      text-align: start;
      -webkit-text-decoration: none;
      text-decoration: none;
      border: 0 !important;
      border-radius: var(--admin-radius-s);
      box-shadow: none;
      font-size: var(--admin-font-size-xs);
      font-weight: var(--admin-font-weight-semibold);
      line-height: 1;

      &:hover,
      &:active,
      &:focus {
        color: var(--admin-color-text-on-primary);
        outline: none;
        background-color: var(--admin-color-primary);

        &::before {
          background-color: var(--admin-color-bg-surface) !important;
        }
      }
    }

    .toolbar-dropdown__item + .toolbar-dropdown__item {
      border: none;
    }

    @media (prefers-reduced-motion: no-preference) {
      transition: opacity var(--admin-transition-slow);
    }
  }

  button,
  input[type="submit"],
  .action-link--icon-trash.action-link--danger,
  .button.button--danger,
  a.button.button--danger,
  .local-actions__item a {
    -webkit-text-decoration: none;
    text-decoration: none;
    box-shadow: none;
    font-size: var(--admin-font-size-xs);
    font-weight: var(--admin-font-weight-bold);
    padding-block: calc(var(--admin-space-xs) - var(--admin-space-3xs));
    padding-inline: var(--admin-space-s);
    margin-block: 0;
  }

  .action-link--icon-trash.action-link--danger,
  .button.button--danger,
  a.button.button--danger {
    padding-block: calc(var(--admin-space-xs) - 0.5px);
  }

  @supports (backdrop-filter: blur()) {
    opacity: 0.999;
    /* stylelint-disable-next-line color-function-notation */
    background: rgb(from var(--layer-background) r g b/ 0.8);
    backdrop-filter: blur(0.75rem);
  }
}

body:has(.gin--navigation-top-bar .gin-sticky-form-actions) :where(#default_admin_sidebar) {
  inset-block-start: 4rem !important;
  height: calc(100% - 4rem) !important;
}

:where(.gin--edit-form) .gin-sticky-form-actions {
  gap: var(--admin-space-xs);

  .button {
    margin-inline-end: 0;

    &:dir(rtl) {
      margin-inline-start: 0;
    }
  }
}

:where(.gin--edit-form) .gin-sticky-form-actions [data-drupal-selector="edit-delete"] {
  display: none;
}

#block-gin-page-title {
  margin-block: var(--admin-space-2xs) var(--admin-space-s);
}
