.site-language {
  position: relative;
  flex: none;
  z-index: 30;
  margin-inline-start: auto;
  color: var(--language-ink, #f4f2ed);
  font: 600 0.875rem/1.35 system-ui, sans-serif;
}

.site-language summary {
  display: inline-flex;
  min-width: 68px;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.55rem;
  border: 1px solid currentColor;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

.site-language summary::-webkit-details-marker { display: none; }

.site-language summary::before {
  content: '';
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.site-language-options {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  box-sizing: border-box;
  width: min(252px, calc(100vw - 32px));
  max-height: min(460px, calc(100vh - 88px));
  max-height: min(460px, calc(100dvh - 88px));
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 4px;
  border: 1px solid #414651;
  border-radius: 12px;
  background: #1c2027;
  box-shadow: 0 12px 28px rgb(0 0 0 / 35%);
  color: #f4f2ed;
  list-style: none;
}

.site-language-options a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.site-language-options small {
  color: #c3c8d1;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: end;
}

.site-language-options a:hover,
.site-language-options a[aria-current="true"] { background: #343d4a; }

.site-language summary:focus-visible,
.site-language-options a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}
