/*
 * Default Admin's Navigation control bar uses a literal white background.
 * Match Navigation's deliberate ID-level specificity without !important.
 */
:is(#extra-specificity-hack, html.gin--dark-mode)
  .admin-toolbar-control-bar[data-drupal-admin-styles] {
  background-color: var(--admin-color-bg-surface);
}

@media (max-width: 47.99rem) {
  .tabs-wrapper.is-horizontal .tabs--primary .tabs__link {
    margin-inline-end: 0;
  }

  .gin--dark-mode .tabs--primary .tabs__link {
    background-color: var(--admin-color-bg-surface);
  }

  .gin--dark-mode .tabs--primary .tabs__link.is-active {
    background-color: var(--admin-color-bg-item-hover);
  }

  .gin--dark-mode .tabs--primary .tabs__link.is-active::before {
    border-inline-start-color: var(--admin-color-primary);
  }

  .gin--dark-mode .tabs--primary .tabs__trigger {
    border-inline-start-color: var(--admin-color-border-input);
    background-color: var(--admin-color-bg-item-hover);
  }
}

/*
 * Navigation's mobile control bar scrolls with the page, so it must not be
 * included in the sticky table offset. --admin-theme-sticky-offset is zero on mobile
 * and includes the fixed page header at desktop widths.
 */
body.gin--navigation table.gin--sticky-table-header {
  inset-block-start: max(0px, calc(var(--admin-theme-sticky-offset) - 1px));
}
