/* Collapsible collections in the navbar "Maps" dropdown */

/* make sure collapsing the themes actually shrinks the dropdown */
#navbar-maps {
  height: auto !important;
  min-height: 0 !important;
}

/* collection row: the caret sits on the right edge of the row, on the same line as the name */
#navbar-maps > li.collection-li.has-themes {
  position: relative;
}
#navbar-maps > li.collection-li.has-themes > a {
  padding-right: 52px;          /* room for the caret button */
}

/* the caret: its own boxed button with a divider, so it reads as separate from the link */
#navbar-maps .map-caret {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42px;                  /* wide enough for a thumb */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.06);
  color: #555;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
#navbar-maps .map-caret:hover,
#navbar-maps .map-caret:focus {
  background: rgba(0, 0, 0, 0.16);
  color: #000;
}
#navbar-maps .map-caret:focus-visible {
  outline: 2px solid #337ab7;
  outline-offset: -2px;
}
#navbar-maps li.collection-li.expanded > .map-caret {
  background: rgba(0, 0, 0, 0.12);
}

/* chevron drawn with borders (points down; flips up when expanded) */
#navbar-maps .map-caret-icon {
  display: block;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s, margin 0.2s;
}
#navbar-maps li.collection-li.expanded .map-caret-icon {
  margin-top: 4px;
  transform: rotate(225deg);
}
