.spoofee-category-nav {
  position: relative;
}

#navigation .spoofee-category-toggle {
  align-items: center;
  display: flex;
  gap: .35rem;
  white-space: nowrap;
}

#navigation .spoofee-category-toggle:focus-visible {
  border-radius: .35rem;
  box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .35);
  outline: 0;
}

.spoofee-category-dropdown {
  --bs-dropdown-spacer: .55rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .16), 0 4px 12px rgba(15, 23, 42, .08);
  max-height: min(76vh, 570px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: .75rem;
  width: min(520px, calc(100vw - 2rem));
  z-index: 1080;
}

.spoofee-category-dropdown.show {
  display: grid;
  gap: .25rem .5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spoofee-category-title,
.spoofee-category-footer {
  grid-column: 1 / -1;
}

.spoofee-category-title {
  color: #1e293b;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .01em;
  padding: .2rem .45rem .55rem;
}

.spoofee-category-entry {
  min-width: 0;
}

.spoofee-category-item {
  align-items: center;
  border-radius: 9px;
  color: #334155;
  display: flex;
  font-size: .875rem;
  font-weight: 500;
  gap: .65rem;
  min-height: 44px;
  padding: .35rem .45rem;
  transition: background-color .15s ease, color .15s ease;
  white-space: normal;
}

.spoofee-category-item:hover,
.spoofee-category-item:focus,
.spoofee-category-item.is-current {
  background: #f1f6ff;
  color: #1e4f9a;
}

.spoofee-category-item:focus-visible {
  box-shadow: inset 0 0 0 2px #93b4ef;
  outline: 0;
}

.spoofee-category-icon {
  align-items: center;
  background: var(--spoofee-category-color, #9aa4b2);
  border-radius: 9px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.spoofee-category-icon svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 19px;
}

.spoofee-category-footer {
  border-top: 1px solid #e2e8f0;
  margin-top: .4rem;
  padding: .65rem .45rem .15rem;
  text-align: center;
}

.spoofee-category-footer a {
  color: #3865c7;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}

.spoofee-category-footer a:hover,
.spoofee-category-footer a:focus {
  color: #234b9b;
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  #navigation .spoofee-category-dropdown {
    inset: auto !important;
    margin: .3rem 0 .55rem;
    max-height: min(58vh, 440px);
    position: static !important;
    transform: none !important;
    width: 100%;
  }

  #navigation .spoofee-category-dropdown.show {
    grid-template-columns: minmax(0, 1fr);
  }

  #navigation .spoofee-category-item {
    min-height: 42px;
  }

  #navigation .spoofee-category-icon {
    border-radius: 8px;
    flex-basis: 28px;
    height: 28px;
    width: 28px;
  }

  #navigation .spoofee-category-icon svg {
    height: 17px;
    width: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spoofee-category-item {
    transition: none;
  }
}
