/* The navigation and query controls share one compact surface. Scope covers
   the overview too; the history popup stays outside the form and unclipped. */
.wb-compact-customs .customs-query-panel {
  flex: 0 0 auto;
  min-width: 0;
  border: 1px solid var(--customs-line);
  border-radius: 12px;
  background: hsl(var(--surface));
}
.wb-compact-customs .customs-page-header {
  justify-content: flex-start !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
}
.wb-compact-customs .customs-page-header nav {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  margin: 0 !important;
  padding: 3px;
  gap: 3px;
  border: 1px solid hsl(var(--border) / .65);
  border-radius: 9px;
  background: hsl(var(--surface));
}
.wb-compact-customs .customs-page-header nav > :is(a, button, [aria-current="page"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 13px !important;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.wb-compact-customs .customs-page-header nav > [aria-current="page"] {
  background: hsl(var(--primary-soft));
  color: hsl(var(--primary));
  font-weight: 600;
}
.wb-compact-customs .customs-page-header nav > :is(a, button):hover,
.wb-compact-customs .customs-page-header nav > button[data-state="open"] {
  background: hsl(var(--muted) / .65);
  color: hsl(var(--foreground));
}
.wb-compact-customs .customs-page-header nav > :is(a, button):focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}
.wb-compact-customs .customs-query-panel > .customs-page-header {
  padding: 8px 10px 6px !important;
}
.wb-compact-customs .customs-query-panel > .customs-page-header nav {
  padding: 0;
  border: 0;
  background: transparent;
}
.wb-compact-customs .customs-query-panel > .customs-filter-panel {
  margin: 0;
  padding: 2px 10px 10px;
  border: 0;
  border-radius: 0 0 12px 12px;
  background: transparent;
  box-shadow: none;
}
@media (max-width: 639px) {
  .wb-compact-customs .customs-page-header nav > :is(a, button, [aria-current="page"]) {
    min-height: 36px;
    padding: 7px 12px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wb-compact-customs .customs-page-header nav > :is(a, button) { transition: none; }
}
