/* 親（ラッパー） */
.kh7mb-lang-wrapper {
  text-align: center;
  font-family: 'Lato', 'Noto Sans JP', sans-serif;
  margin-top: 12px;
  margin-bottom: 35px;
}

.kh7mb-lang {
  position: relative;
  display: inline-block;
  font-family: inherit;
  line-height: 1.2;
}

/* Button */
.kh7mb-lang__button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 120ms ease;
}

.kh7mb-lang__button:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.kh7mb-lang__button:active {
  transform: translateY(1px);
}

.kh7mb-lang__button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

.kh7mb-lang__current {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.kh7mb-lang__caret {
  font-size: 12px;
  opacity: 0.9;
}

/* Menu (closed by default) */
.kh7mb-lang__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(8px);

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;

  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 0s linear 160ms;
  z-index: 50;
}

/* Open state (JSで付与) */
.kh7mb-lang.is-open .kh7mb-lang__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 0s;
}

/* Items */
.kh7mb-lang__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition:
    background 120ms ease,
    color 120ms ease;
}

.kh7mb-lang__item:hover,
.kh7mb-lang__item:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.kh7mb-lang__item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.kh7mb-lang__label {
  font-size: 14px;
}

/* Checkmark: show only for current item */
.kh7mb-lang__check {
  font-size: 14px;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.kh7mb-lang__item.is-current .kh7mb-lang__check {
  opacity: 0.95;
  transform: scale(1);
}

/* Current item subtle emphasis */
.kh7mb-lang__item.is-current {
  background: rgba(255, 255, 255, 0.08);
}

/* Optional: align menu to the right if needed */
.kh7mb-lang.is-right .kh7mb-lang__menu {
  left: auto;
  right: 0;
}

/* Optional: small screens tweak */
@media (max-width: 480px) {
  .kh7mb-lang__menu {
    min-width: 200px;
  }
}
