/* 中文 | English. Buttons carry their own fill and text color so custom.css
   cannot paint the label the same color as the control. */

.bm-lang {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0;
}

.bm-lang__form {
  display: inline-flex;
  margin: 0;
}

.bm-lang__btn {
  appearance: none;
  -webkit-appearance: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
}

.bm-lang__btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.bm-lang__sep {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 0 1px;
}

.bm-lang--dark .bm-lang__btn,
.bm-lang--dark .bm-lang__sep {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.bm-lang--dark .bm-lang__btn.is-active {
  background: #ffffff !important;
  color: #9f1239 !important;
  -webkit-text-fill-color: #9f1239 !important;
}

.bm-lang--light .bm-lang__btn,
.bm-lang--light .bm-lang__sep {
  color: #1c1917 !important;
  -webkit-text-fill-color: #1c1917 !important;
}

.bm-lang--light .bm-lang__btn.is-active {
  background: #9f1239 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Phone app bar: one short switch, never a wide "English" pill over the title. */
.bm-lang--compact .bm-lang__btn {
  min-width: 44px;
  padding: 0 10px;
  background: transparent !important;
  font-size: 15px;
}

.bm-lang--light.bm-lang--compact .bm-lang__btn,
.bm-lang--light.bm-lang--compact .bm-lang__btn:hover,
.bm-lang--light.bm-lang--compact .bm-lang__btn:focus {
  color: #1c1917 !important;
  -webkit-text-fill-color: #1c1917 !important;
  background: transparent !important;
}

.bm-source {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  color: #57534e !important;
  -webkit-text-fill-color: #57534e !important;
}

.ge-lang {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 0;
}

@media (max-width: 380px) {
  .bm-lang__btn {
    padding: 0 8px;
  }
}
