.language-picker {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 1200;
  width: max-content;
  color: #142135;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.25;
}

.language-picker summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 183, 106, .65);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  color: #142135;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary:focus-visible { outline: 2px solid #2f8cff; outline-offset: 3px; }
.language-picker[open] summary { border-color: #2f8cff; }

.language-picker__flag {
  display: block;
  width: 22px;
  height: 16px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, .12);
  flex: 0 0 auto;
}

.language-picker__caret {
  font-size: 16px;
  line-height: 1;
  margin-left: 2px;
}

.language-picker__menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: 236px;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
}

.language-picker__menu a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 39px;
  padding: 8px;
  border-radius: 4px;
  color: #142135;
  text-decoration: none;
  font-weight: 600;
}

.language-picker__menu a:hover,
.language-picker__menu a:focus-visible,
.language-picker__menu a[aria-current="page"] {
  background: #eaf2fb;
  color: #07111f;
}

.language-picker__menu small {
  color: #586778;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .language-picker { top: 14px; right: auto; left: 12px; }
  .language-picker__menu { right: auto; left: 0; }
}
