.language-picker {
  position: relative;
  flex-shrink: 0;
}

.language-picker details { position: relative; }

.language-picker summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #ded8eb;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary::marker { content: ""; }
.language-picker summary:hover,
.language-picker details[open] summary {
  background: rgba(255, 255, 255, .045);
  border-color: rgba(218, 206, 239, .11);
}

.language-picker-flag { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.language-picker-current-flag { width: 18px; height: 18px; }
.language-option-label { display: flex; align-items: center; gap: 10px; }
.language-picker-code { font-size: 12px; font-weight: 600; letter-spacing: .05em; }
.language-picker-chevron { color: #aa9cbd; }
.language-picker details[open] .language-picker-chevron { transform: rotate(180deg); }
.language-picker-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.language-picker-panel {
  position: absolute;
  inset-block-start: calc(100% + 9px);
  inset-inline-end: 0;
  z-index: 100;
  width: 218px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  border: 1px solid #3c344b;
  border-radius: 13px;
  background: #17131f;
  color: #eeeaf5;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .025);
  scrollbar-width: thin;
}

.language-picker-label {
  padding: 6px 11px 9px;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #b5a9c8;
  font-weight: 500;
}

.language-picker ul { list-style: none; padding: 0; margin: 0; }
.language-picker li { margin: 0; padding: 0; }
.language-picker .language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  padding: 0 11px;
  border-radius: 7px;
  color: #eeeaf5;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.language-picker a.language-option:hover { background: #25202f; color: #fff; }
.language-picker .language-option[aria-current] { background: #2b213e; color: #f0e6ff; }
.language-option-code { color: #a69ab9; font-size: 10px; letter-spacing: .06em; }
.language-picker-check { color: #c3a4f8; flex-shrink: 0; }
.language-picker :focus-visible { outline: 2px solid #bea4ec; outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .language-picker summary { transition: background-color .15s, border-color .15s; }
}
