/* 语种国旗。雪碧图仍在 /sa/flags/。登录页也要，不要只放进 appearance 桶。 */

.flag-icon {
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  position: relative;
  display: inline-block;
  width: 1.333333em;
  line-height: 1em;
}

.flag-icon:before {
  content: '\00a0';
}

.flag-icon-cn { background-image: url(/sa/flags/4x3/cn.svg); }
.flag-icon-gb { background-image: url(/sa/flags/4x3/gb.svg); }
.flag-icon-mn { background-image: url(/sa/flags/4x3/mn.svg); }

.lang-flag {
  display: inline-block;
  width: 1.25rem;
  height: 0.94rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 0.94rem;
}

.app-header-lang .lang-flag {
  width: 1.4rem;
  height: 1.05rem;
}

.lang-flag.flag-icon:before {
  display: none;
}

.dropdown-item .lang-flag,
.dropdown-item.d-flex .lang-flag {
  margin-right: 0.5rem;
}

[data-bs-theme="dark"] .lang-flag {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* SmartAdmin / 共用顶栏：菜单贴着国旗，不要用页头 5.5rem 行高 */
.app-header .app-header-lang {
  position: relative;
  display: flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  height: auto;
  line-height: 1;
}

.app-header .app-header-lang .btn-system {
  line-height: 1 !important;
  height: 2.25rem !important;
  width: 2.25rem !important;
  padding: 0 !important;
}

.app-header .app-header-lang > [data-bs-toggle="dropdown"] + .dropdown-menu,
.app-header .app-header-lang > .btn-system[data-bs-toggle="dropdown"] + .dropdown-menu,
.app-header .app-header-lang .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 !important;
  min-width: 11rem;
  z-index: 1050;
}
