/**
 * 社区发帖「发布到」
 *
 * 主题没有现成下拉组件。这一套按本站 token + Vercel/Radix 菜单惯例自研：
 * 选中靠右侧勾，不靠整行灰底；字号 caption 14 / 字重 400；必须压过
 * #wpforo #wpforo-wrap ul/li reset（双 ID 会吃掉裸 class 的 padding/字号）。
 */

#wpforo #wpforo-wrap .mytheme-wpf-composer,
#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-toolbar,
#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-toolbar__actions,
#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-toolbar__forum,
#wpforo #wpforo-wrap .mytheme-wpf-composer .wpf-topic-form-extra-wrap {
  overflow: visible !important;
}
#wpforo #wpforo-wrap .mytheme-wpf-composer {
  position: relative;
  z-index: 2;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  font-family: inherit;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker select.mytheme-wpf-forum-select,
#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker select.wpf-topic-form-forumid {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: auto !important;
  max-width: 160px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 12px 0 16px !important;
  border: 0 !important;
  border-radius: 9999px !important;
  background: var(--myt-wpf-color-surface-muted) !important;
  color: var(--myt-wpf-color-ink-secondary) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__btn:hover,
#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker.is-open .mytheme-wpf-forum-picker__btn {
  color: var(--myt-wpf-color-ink) !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__btn:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__btn:disabled {
  color: var(--myt-wpf-color-ink-disabled) !important;
  cursor: not-allowed;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__chevron {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  color: var(--myt-wpf-color-ink-tertiary);
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker.is-open .mytheme-wpf-forum-picker__chevron {
  transform: rotate(180deg);
}

#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 50 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: min(220px, calc(100vw - 48px)) !important;
  margin: 0 !important;
  padding: 4px !important;
  list-style: none !important;
  background: #ffffff !important;
  border: 1px solid var(--myt-wpf-color-line-soft) !important;
  border-radius: 12px !important;
  box-shadow: var(--myt-wpf-shadow-pop) !important;
  overscroll-behavior: contain;
  max-height: min(320px, 50vh);
  overflow-x: hidden !important;
  overflow-y: auto !important;
  font-family: inherit !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker.is-up ul.mytheme-wpf-forum-picker__menu {
  top: auto !important;
  bottom: calc(100% + 6px) !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu[hidden] {
  display: none !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu li[role="option"] {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--myt-wpf-color-ink) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu li[role="option"]:hover,
#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu li[role="option"].is-active {
  background: var(--myt-wpf-color-surface-muted) !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu li[role="option"].is-selected {
  background: transparent !important;
  font-weight: 400 !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu li[role="option"].is-selected:hover,
#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu li[role="option"].is-selected.is-active {
  background: var(--myt-wpf-color-surface-muted) !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__check {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: var(--myt-wpf-color-ink);
  opacity: 0;
}

#wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu li[role="option"].is-selected .mytheme-wpf-forum-picker__check {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  #wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__chevron {
    transition: transform 0.15s ease;
  }
  #wpforo #wpforo-wrap .mytheme-wpf-composer ul.mytheme-wpf-forum-picker__menu li[role="option"] {
    transition: background-color 0.15s ease;
  }
}

@media (max-width: 640px) {
  #wpforo #wpforo-wrap .mytheme-wpf-composer .mytheme-wpf-forum-picker__btn {
    max-width: 140px !important;
  }
}
