/* Header-tab dropdown menus.
   Pairs with overrides/partials/tabs-item.html: each section tab carries a
   <ul class="md-tabs__dropdown"> of its pages, revealed on hover / keyboard
   focus. Desktop only (tabs collapse into the drawer below ~1220px). */

.md-tabs__item--dropdown {
  position: relative;
}

/* Caret on a section tab, signalling it has a dropdown (rotates up on open). */
.md-tabs__item--dropdown > .md-tabs__link::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.35rem;
  align-self: center;   /* .md-tabs__link is display:flex — vertical-align is ignored */
  border-left: 0.2rem solid transparent;
  border-right: 0.2rem solid transparent;
  border-top: 0.2rem solid currentColor;
  opacity: 0.75;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.md-tabs__item--dropdown:hover > .md-tabs__link::after,
.md-tabs__item--dropdown:focus-within > .md-tabs__link::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* The tabs bar must not clip the absolutely-positioned dropdown. Material sets
   overflow:auto on .md-tabs and overflow:auto + contain:content (paint
   containment, which clips descendants) on the list — override all three. */
.md-tabs,
.md-tabs__list {
  overflow: visible;
}
.md-tabs__list {
  contain: none;
}

.md-tabs__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 12rem;
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
  background-color: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  border-radius: 0 0 0.2rem 0.2rem;
  box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.25);
}

.md-tabs__item--dropdown:hover > .md-tabs__dropdown,
.md-tabs__item--dropdown:focus-within > .md-tabs__dropdown {
  display: block;
}

.md-tabs__dropdown li {
  margin: 0;
  padding: 0;
}

.md-tabs__dropdown-link {
  display: block;
  padding: 0.4rem 0.9rem;
  font-size: 0.68rem;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--md-default-fg-color);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.md-tabs__dropdown-link:hover {
  background-color: var(--md-default-fg-color--lightest);
  color: var(--md-accent-fg-color);
}

.md-tabs__dropdown-link--active {
  color: var(--md-accent-fg-color);
  font-weight: 700;
}

.md-tabs__dropdown-label {
  padding: 0.45rem 0.9rem 0.15rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}
