
/* Header tools drawer: wspólne miejsce na filtry widoków. */
.header-tools-toggle {
  flex: 0 0 34px;
}

.header-tools-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 970;
  background: var(--app-overlay-background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.header-tools-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.header-tools-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 980;
  width: min(420px, calc(100vw - 18px));
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--menu-surface);
  box-shadow: -18px 0 44px rgba(0, 0, 0, .20);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .24s ease, visibility .24s ease;
}

.header-tools-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

body.header-tools-drawer-open {
  overflow: hidden;
}

.header-tools-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.header-tools-drawer__content {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
}

.header-tools-drawer__content:empty {
  display: none;
}

.header-tools-drawer__empty {
  margin: 24px;
  padding: 16px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.header-tools-drawer__content > * {
  width: 100%;
  max-width: none;
}

.header-tools-drawer__content .tasks-filters,
.header-tools-drawer__content .analysis-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  width: 100%;
  max-width: none;
}

.header-tools-drawer__content .header-field-label,
.header-tools-drawer__content .header-search-field,
.header-tools-drawer__content .select-wrap,
.header-tools-drawer__content .tasks-filters .search,
.header-tools-drawer__content .tasks-filters .filter-wrap,
.header-tools-drawer__content .tasks-filters .select-wrap,
.header-tools-drawer__content .analysis-filters .select-wrap,
.header-tools-drawer__content .analysis-filters .input,
.header-tools-drawer__content .analysis-filters .btn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}


.header-tools-drawer__content .task-columns-manager-btn {
  width: 100%;
  margin-top: 10px;
}
.header-tools-drawer__content .task-special-filters {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .header-tools-drawer {
    width: min(380px, calc(100vw - 12px));
  }

  .header-tools-drawer__head,
  .header-tools-drawer__content {
    padding-left: 18px;
    padding-right: 18px;
  }
}
