/* 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 switch rather than as more categories — but a
   wash of light on the page instead of a moulded track. Nothing here is its
   own colour: the ground shows through and the switch takes whatever it is
   sitting on, which on a collection's hero is that collection's own tint. */
.directory-modes {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px;
  /* struck as black at low strength rather than as white: white on the white
     of /plugins and /collections leaves nothing to see, where this reads on
     any ground and still comes out the colour of whatever is behind it */
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.055);
  /* what is behind goes soft under it, so the ruled paper of a hero does not
     run through the middle of the words */
  backdrop-filter: blur(8px) saturate(1.3);
  -webkit-backdrop-filter: blur(8px) saturate(1.3);
}

#content .directory-mode,
#content .directory-sort-option {
  padding: 5px 16px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: none;
  /* stated as black at low strength rather than as a grey, so the ground
     carries through the words as it does through the track */
  color: rgba(0, 0, 0, 0.5);
  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: rgba(0, 0, 0, 0.85);
}

/* the one that is on: more of the same light, not a key standing up off a
   board — one soft shadow to lift it, and no bevel */
#content .directory-mode[aria-pressed="true"],
#content .directory-sort-option[aria-current="true"] {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.82);
  color: #222;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
