:root {
  --hb-i18n-bg: rgba(255, 255, 255, 0.96);
  --hb-i18n-border: rgba(17, 77, 77, 0.2);
  --hb-i18n-text: #114d4d;
  --hb-i18n-muted: #45605d;
  --hb-i18n-accent: #97c15a;
  --hb-i18n-shadow: 0 10px 28px rgba(17, 77, 77, 0.14);
}

.hb-language-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 99999;
  box-sizing: border-box;
  width: 232px;
  max-width: calc(100vw - 28px);
  padding: 9px 10px 10px;
  border: 1px solid var(--hb-i18n-border);
  border-radius: 16px;
  background: var(--hb-i18n-bg);
  box-shadow: var(--hb-i18n-shadow);
  color: var(--hb-i18n-text);
  font-family: inherit;
  backdrop-filter: blur(8px);
}

.hb-language-toggle__label {
  display: block;
  margin: 0 0 6px;
  color: var(--hb-i18n-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
}

.hb-language-toggle__trigger {
  display: flex;
  width: 100%;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  border: 1px solid rgba(17, 77, 77, 0.22);
  border-radius: 12px;
  background: #ffffff;
  color: var(--hb-i18n-text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  padding: 6px 8px;
  text-align: left;
}

.hb-language-toggle__trigger:focus {
  border-color: var(--hb-i18n-accent);
  box-shadow: 0 0 0 3px rgba(151, 193, 90, 0.22);
  outline: none;
}

.hb-language-toggle__current {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.hb-language-toggle__chevron {
  flex: 0 0 auto;
  color: var(--hb-i18n-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.hb-language-toggle__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 232px;
  max-height: min(410px, calc(100vh - 92px));
  overflow: auto;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid rgba(17, 77, 77, 0.18);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(17, 77, 77, 0.18);
}

.hb-language-toggle__item {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hb-i18n-text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  padding: 7px 8px;
  text-align: left;
}

.hb-language-toggle__item:hover,
.hb-language-toggle__item:focus {
  background: #eef5df;
  outline: none;
}

.hb-language-toggle__item.is-current {
  background: #eef5df;
  box-shadow: inset 0 0 0 1px rgba(151, 193, 90, 0.55);
}

.hb-language-toggle__code {
  flex: 0 0 auto;
  min-width: 28px;
  color: var(--hb-i18n-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hb-language-toggle__name {
  min-width: 0;
  overflow: hidden;
  color: var(--hb-i18n-text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-flag {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 32px;
  height: 24px;
  overflow: hidden;
  border: 1px solid rgba(17, 77, 77, 0.24);
  border-radius: 4px;
  background-color: #ffffff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 1px 2px rgba(17, 77, 77, 0.12);
}

/* HB-I18N LOCAL FLAG ICONS START */
.hb-flag--uk {
  background-image: url("/assets/flags/4x3/gb.svg");
}

.hb-flag--kr {
  background-image: url("/assets/flags/4x3/kr.svg");
}

.hb-flag--cn {
  background-image: url("/assets/flags/4x3/cn.svg");
}

.hb-flag--my {
  background-image: url("/assets/flags/4x3/my.svg");
}

.hb-flag--jp {
  background-image: url("/assets/flags/4x3/jp.svg");
}

.hb-flag--de {
  background-image: url("/assets/flags/4x3/de.svg");
}

.hb-flag--fr {
  background-image: url("/assets/flags/4x3/fr.svg");
}

.hb-flag--es {
  background-image: url("/assets/flags/4x3/es.svg");
}

.hb-flag--pt {
  background-image: url("/assets/flags/4x3/pt.svg");
}
/* HB-I18N LOCAL FLAG ICONS END */


.hb-flag--cn::before,
.hb-flag--cn::after,
.hb-flag--my::before,
.hb-flag--my::after,
.hb-flag--jp::before,
.hb-flag--jp::after,
.hb-flag--pt::before,
@media (max-width: 680px) {
  .hb-language-toggle {
    top: 10px;
    right: 10px;
    width: 208px;
    padding: 8px;
  }

  .hb-language-toggle__menu {
    width: 208px;
  }

  .hb-language-toggle__name {
    font-size: 12px;
  }

  .hb-flag {
    width: 28px;
    height: 21px;
  }
}



/* HB-I18N PHASE 2C PLACEMENT START */
.hb-language-slot,
.hb-language-slot-host {
  position: relative;
}

.hb-language-slot-host {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hb-language-slot-host > #hb-language-toggle-root,
.hb-language-slot > #hb-language-toggle-root {
  margin-left: auto;
}

.hb-language-toggle.hb-language-toggle--in-header {
  position: relative;
  top: auto;
  right: auto;
  z-index: 50;
  width: 232px;
  max-width: 100%;
  box-shadow: 0 8px 22px rgba(17, 77, 77, 0.1);
}

.hb-language-toggle.hb-language-toggle--floating {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 99999;
}

@media (max-width: 760px) {
  .hb-language-slot-host {
    flex-wrap: wrap;
  }

  .hb-language-slot-host > #hb-language-toggle-root,
  .hb-language-slot > #hb-language-toggle-root {
    margin-left: 0;
  }

  .hb-language-toggle.hb-language-toggle--in-header {
    width: 208px;
  }
}
/* HB-I18N PHASE 2C PLACEMENT END */



/* HB-I18N PHASE 2D COMPACT TOGGLE START */
.hb-language-toggle,
.hb-language-toggle.hb-language-toggle--in-header {
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hb-language-toggle.hb-language-toggle--floating {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hb-language-toggle__label {
  display: none;
}

.hb-language-toggle__trigger {
  width: auto;
  min-width: 76px;
  min-height: 34px;
  padding: 5px 8px;
  gap: 6px;
  border: 1px solid rgba(17, 77, 77, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(17, 77, 77, 0.08);
}

.hb-language-toggle__trigger:hover,
.hb-language-toggle__trigger:focus {
  background: #ffffff;
}

.hb-language-toggle__current {
  gap: 6px;
}

.hb-language-toggle__chevron {
  margin-left: 1px;
  font-size: 10px;
}

.hb-language-toggle__menu {
  width: auto;
  min-width: 96px;
  max-height: min(410px, calc(100vh - 92px));
  padding: 5px;
  border-radius: 12px;
}

.hb-language-toggle__item {
  justify-content: flex-start;
  min-height: 34px;
  gap: 7px;
  padding: 6px 8px;
}

.hb-language-toggle__code {
  min-width: 28px;
  font-size: 11px;
}

.hb-language-toggle__name {
  display: none;
}

.hb-flag {
  width: 30px;
  height: 22.5px;
}

.hb-language-slot--architect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: 10px;
}

.hb-language-slot--architect #hb-language-toggle-root {
  margin-left: 0;
}

@media (max-width: 760px) {
  .hb-language-toggle.hb-language-toggle--in-header,
  .hb-language-toggle.hb-language-toggle--floating {
    width: auto;
  }

  .hb-language-toggle__trigger {
    min-width: 72px;
    min-height: 32px;
    padding: 4px 7px;
  }

  .hb-flag {
    width: 28px;
    height: 21px;
  }
}
/* HB-I18N PHASE 2D COMPACT TOGGLE END */


