
:root {
  --bh-lang-ink: #111315;
  --bh-lang-paper: #ffffff;
  --bh-lang-border: rgba(17, 19, 21, 0.16);
  --bh-lang-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  --bh-lang-radius: 12px;
}

.bh-language-switcher,
.bh-language-switcher * {
  box-sizing: border-box;
}

.bh-language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-family: Arial, Helvetica, sans-serif;
  z-index: 2147482000;
}

.bh-language-button {
  min-height: 38px;
  min-width: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(17, 19, 21, 0.94);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  -webkit-tap-highlight-color: transparent;
}

.bh-language-button:hover,
.bh-language-button:focus-visible {
  background: #000;
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

.bh-language-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.bh-language-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.bh-language-switcher[data-open="true"] .bh-language-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.bh-language-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: min(230px, calc(100vw - 24px));
  padding: 7px;
  border: 1px solid var(--bh-lang-border);
  border-radius: var(--bh-lang-radius);
  background: var(--bh-lang-paper);
  box-shadow: var(--bh-lang-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) scale(0.98);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  z-index: 2147483000;
}

.bh-language-switcher[data-open="true"] .bh-language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.bh-language-option {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  margin: 0 !important;
  padding: 10px 11px !important;
  border-radius: 8px;
  color: var(--bh-lang-ink) !important;
  background: transparent !important;
  text-decoration: none !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap;
}

.bh-language-option:hover,
.bh-language-option:focus-visible {
  background: #f1f2f2 !important;
  outline: none;
}

.bh-language-option[aria-current="page"] {
  background: #e9eceb !important;
  font-weight: 800 !important;
}

.bh-language-option[aria-current="page"]::after {
  content: "✓";
  font-size: 13px;
}

.bh-language-original-hidden {
  display: none !important;
}

.bh-language-prompt {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(17, 19, 21, 0.97);
  color: #fff;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.3);
  font-family: Arial, Helvetica, sans-serif;
  transform: translateX(-50%);
  z-index: 2147483500;
}

.bh-language-prompt-copy {
  min-width: 0;
}

.bh-language-prompt strong {
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
  line-height: 1.2;
}

.bh-language-prompt span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.bh-language-prompt-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.bh-language-prompt-switch,
.bh-language-prompt-close {
  border: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bh-language-prompt-switch {
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #fff;
  color: #111315;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.bh-language-prompt-switch:hover,
.bh-language-prompt-switch:focus-visible {
  background: #edf0ef;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.bh-language-prompt-close {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 23px;
  line-height: 1;
}

.bh-language-prompt-close:hover,
.bh-language-prompt-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
}

@media (max-width: 900px) {
  .bh-language-switcher {
    position: fixed !important;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    top: auto !important;
    left: auto !important;
    margin: 0 !important;
    z-index: 2147483000 !important;
  }

  body.bh-language-prompt-visible .bh-language-switcher {
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 86px);
  }

  .bh-language-menu {
    top: auto;
    bottom: calc(100% + 9px);
    transform-origin: bottom right;
  }

  .bh-language-button-label {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 560px) {
  .bh-language-prompt {
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
  }

  .bh-language-prompt-actions {
    align-items: flex-end;
  }

  .bh-language-prompt span {
    display: none;
  }

  .bh-language-prompt-switch {
    padding-inline: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-language-menu,
  .bh-language-chevron {
    transition: none;
  }
}
