.language-picker {
  position: relative;
  z-index: 1;
  width: max-content;
  margin: 12px 16px 0 auto;
  color: var(--nav-text, #153452);
  font-size: 13px;
}

.language-picker summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 44px;
  border-radius: 999px;
  list-style: none;
  cursor: pointer;
  transition: background-color .2s ease;
}

.language-picker summary::-webkit-details-marker { display: none; }
.language-globe { width: 21px; height: 21px; }
body > .language-picker summary {
  border: 1px solid #d4e3ef;
  background: #f7fbff;
}
.language-picker summary:hover,
.language-picker[open] summary {
  background: var(--nav-active, #e1effb);
}
.language-picker summary:focus-visible,
.language-options button:focus-visible { outline: 2px solid var(--nav-focus, #3476b0); outline-offset: 2px; }

.language-flag {
  flex: none;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #14334f22;
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 192px;
  padding: 6px;
  border: 1px solid var(--header-edge, #d4e3ef);
  border-radius: 14px;
  background: var(--header-surface, #f7fbff);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px #06132138;
}

.language-options button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.language-options button:hover { background: var(--nav-hover, #e1effb); }
.language-options button[aria-pressed="true"] {
  background: var(--nav-active, #e1effb);
  font-weight: 700;
}
.language-options button[aria-pressed="true"]::after {
  content: "";
  width: 4px;
  height: 8px;
  margin-inline-start: auto;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.site-header:has(.header-actions) { width: min(calc(100% - 24px), clamp(740px, 64%, 1024px)); gap: 12px; }
.site-header:has(.language-picker[open]) { --header-opacity: .88; }
.site-header:has(.header-actions) .product-nav { gap: clamp(4px, 2vw, 28px); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .header-links { gap: clamp(10px, 1.25vw, 20px); }
.header-actions .language-picker { flex: none; margin: 0; }
.header-actions .language-options { top: calc(100% + 17px); }

@media (max-width: 760px) {
  .site-header:has(.header-actions) { width: calc(100% - 32px); gap: 8px; }
  .site-header:has(.header-actions) .product-nav { gap: 4px; }
  .header-actions .language-options { top: calc(100% + 13px); }
}
@media (max-width: 480px) {
  .site-header:has(.header-actions) { width: calc(100% - 24px); padding-inline: 8px; gap: 5px; }
  .site-header:has(.header-actions) .product-nav { font-size: clamp(10px, 3.1vw, 12px); }
  .site-header:has(.header-actions) .product-nav :is(a, button) { padding-inline: 5px; }
  .header-actions .language-picker summary { width: 36px; }
}
