theme-dropdown-menu {
  position: relative;
  display: inline-flex;
}

theme-dropdown-menu .dropdown-menu__label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

theme-dropdown-menu .dropdown-menu__label-text {
  display: inline-flex;
  color: rgb(var(--header-color-text));
  white-space: nowrap;
}

.transparent theme-dropdown-menu .dropdown-menu__label-text {
  color: rgb(var(--header-transparent-color-text, var(--header-color-text)));
}

.theme-sticky-header--sticky
  .transparent
  theme-dropdown-menu
  .dropdown-menu__label-text {
  color: rgb(var(--header-color-text));
}

theme-dropdown-menu .dropdown-menu__label-arrow {
  display: inline-flex;
  width: 10px;
  height: 10px;
  transition: transform 0.16s ease-in-out;
}

theme-dropdown-menu .dropdown-menu__list {
  position: absolute;
  inset-block-start: calc(100% + 4px);
  inset-inline-end: 0;
  z-index: var(--z-index-dropdown);
  display: none;
  width: max-content;
  max-height: 530px;
  padding-block: 10px;
  overflow-y: auto;
  color: rgb(var(--header-color-text));
  background-color: rgba(var(--color-background), 1);
  box-shadow: 0 5px 20px 0 rgb(0 0 0 / 12%);
  animation: animation-dropdown 0.16s ease-in;
}

theme-dropdown-menu .dropdown-menu__list::-webkit-scrollbar {
  width: 5px;
}

theme-dropdown-menu .dropdown-menu__list::-webkit-scrollbar-track {
  background: rgb(0 0 0 / 5%);
  border-radius: 3px;
}

theme-dropdown-menu .dropdown-menu__list::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 20%);
  border-radius: 3px;
}

theme-dropdown-menu .dropdown-menu__list::-webkit-scrollbar-thumb:hover {
  background: #000;
}

theme-dropdown-menu.top .dropdown-menu__list {
  inset-block: auto calc(100% + 4px);
}

theme-dropdown-menu.left .dropdown-menu__list {
  inset-inline: 0 auto;
}

theme-dropdown-menu .dropdown-menu__list-item {
  display: flex;
  padding: 4px 15px;
  line-height: 160%;
  word-break: keep-all;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
}

theme-dropdown-menu .dropdown-menu__divider {
  height: 1px;
  margin: 4px 15px;
  background: rgb(var(--color-entry-line));
}

theme-dropdown-menu .dropdown-menu__trigger {
  position: fixed;
  inset-block-start: -1000px;
  inset-inline-start: -1000px;
  pointer-events: none;
  visibility: hidden;
  user-select: none;
  opacity: 0;
}

theme-dropdown-menu.hover:hover .dropdown-menu__list {
  display: block;
}

theme-dropdown-menu
  .dropdown-menu__trigger:checked
  ~ .dropdown-menu__label-arrow {
  transform: rotate(-180deg);
}

theme-dropdown-menu
  .dropdown-menu__label:has(.dropdown-menu__trigger:checked)
  ~ .dropdown-menu__list {
  display: block;
}
