/* MOD-725 (replaces MOD-397's chip row): Sync Management's Filters panel -- a multi-select dropdown per filter in the shared .ta-filters-panel (T&A's), and the
 * applied row under the bar (the shared .ta-chips). A dropdown is a toggle button (aria-expanded) over a list of checkbox rows (icon, wording, row count). */
.ta-filters-panel.sync-filters-panel {
  width: min(520px, 100%);
}

.sync-filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--adagin-space-4);
  align-items: start;
}

/* Below 1100px the theme makes .ta-filters-panel scrollable (max-height + overflow-y), which would clip the absolutely positioned dropdown list; the list
 * must overflow the panel, so it does not scroll here (specificity (0,2,0) beats the theme's (0,1,0)). */
@media (max-width: 1099px) {
  .ta-filters-panel.sync-filters-panel {
    max-height: none;
    overflow: visible;
  }
}

/* One column below 760px, the breakpoint T&A's .ta-filters-groups stacks at (MOD-781): two side by side clip the option rows (white-space: nowrap). */
@media (max-width: 759px) {
  .sync-filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sync-filters-grid[hidden],
#sync-filters-btn[hidden] {
  display: none;
}

.sync-filter {
  position: relative;
}

.sync-filter__label {
  font-size: var(--adagin-label-font-size);
  line-height: var(--adagin-label-line-height);
  font-weight: 700;
  color: var(--adagin-dark-navy);
}

.sync-multi__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--adagin-space-2);
  width: 100%;
  height: 36px;
  padding: 0 var(--adagin-space-3);
  text-align: left;
  cursor: pointer;
}

.sync-multi__summary {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sync-multi__list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 3;
  margin-top: 2px;
  padding: var(--adagin-space-1) 0;
  background: var(--adagin-white, #fff);
  border: var(--adagin-outline-width) solid var(--adagin-outline);
  border-radius: var(--adagin-radius-pane);
  box-shadow: var(--adagin-shadow-raised);
}

.sync-multi__list[hidden] {
  display: none;
}

/* The global label:not(.switch):not(.adagin-btn) rule is (0,2,1) (:not() counts as its argument); this one is (0,3,1), strictly greater, so the option rows
   are not the muted, 0.75-opacity form label. */
.sync-filters-panel label.sync-multi__option:not(.switch) {
  display: flex;
  align-items: center;
  gap: var(--adagin-space-2);
  margin: 0;
  padding: var(--adagin-space-1) var(--adagin-space-3);
  font-size: 14px;
  font-weight: 400;
  color: var(--adagin-dark-navy);
  opacity: 1;
  white-space: nowrap;
  cursor: pointer;
}

.sync-filters-panel label.sync-multi__option:not(.switch):hover {
  background: #E8EEF8;
}

.sync-multi__option input {
  flex: none;
  margin: 0;
}

.sync-multi__count {
  margin-left: auto;
  color: var(--adagin-text-muted);
}

.sync-multi__option:focus-within,
.sync-multi__toggle:focus-visible {
  outline: 2px solid var(--adagin-teal);
  outline-offset: -2px;
}

.sync-chips {
  padding-bottom: var(--adagin-space-2);
}

/* ADAS-520: the plain-language Sync Status legend at the top of the Mobile Users and Wall Units tabs (_SyncLegend.cshtml); the icons and colours are
 * the Status column's own (.sync-status-icon--{band} in the theme). */
.sync-legend {
  margin: 0 0 var(--adagin-space-3);
  padding: var(--adagin-space-3) var(--adagin-space-4);
  border: var(--adagin-outline-width) solid var(--adagin-outline);
  border-radius: var(--adagin-radius-pane);
  background: var(--adagin-white);
  color: var(--adagin-dark-navy);
  font-size: 13px;
  line-height: 1.5;
}

.sync-legend__title {
  margin: 0 0 var(--adagin-space-1);
  font-size: 14px;
  font-weight: 600;
}

.sync-legend__intro {
  margin: 0 0 var(--adagin-space-2);
}

.sync-legend__tip {
  margin: var(--adagin-space-2) 0 0;
  color: var(--adagin-text-muted);
}

.sync-legend__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sync-legend__row {
  display: flex;
  gap: var(--adagin-space-2);
  margin-bottom: var(--adagin-space-1);
}

.sync-legend__row > i {
  flex: 0 0 auto;
  margin-top: 3px;
}
