/* The switches that change how a page of cards looks rather than what is on
   it: the order (a sort that reverses when chosen again) and light/dark. Used
   by /plugins and /collections. */

/* the order and light/dark side by side: both change how the page looks,
   not what is on it */
.directory-view {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}

#content .directory-sort-option {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
}

/* which way the order runs; only the one in use has an arrow */
.directory-sort-arrow {
  font-size: 12px;
}

.directory-sort-arrow:empty {
  display: none;
}

/* Two buttons that read as one physical switch: a grey track pressed into
   the page, and a raised white key for the look that is on. Built to look
   like something you flip rather than something you choose, so it does not
   read as more categories. */
.directory-modes {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px;
  border: 1px solid #d4d4d8;
  border-radius: 100px;
  background: linear-gradient(#e4e4e7, #ededf0);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.9);
}

#content .directory-mode,
#content .directory-sort-option {
  padding: 5px 16px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: none;
  color: #7a7a80;
  font-family: var(--text-font);
  font-size: 14px;
  font-variation-settings: "wght" 650, "ital" 0;
  cursor: pointer;
  transition: color 0.12s;
}

#content .directory-mode:hover,
#content .directory-sort-option:hover {
  color: #333;
}

#content .directory-mode[aria-pressed="true"],
#content .directory-sort-option[aria-current="true"] {
  border-color: rgba(0, 0, 0, 0.1);
  background: linear-gradient(#ffffff, #f4f4f6);
  color: #222;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.16),
    0 2px 5px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 white;
}
