[data-i18n-ready="true"] body { visibility: visible; }
html:not([data-i18n-ready="true"]) body:not(.is-booting) { visibility: hidden; }

[data-language-slot] {
  min-width: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.language-picker {
  position: relative;
  z-index: 90;
  color: #171315;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, sans-serif;
}

.language-picker summary {
  min-width: 52px;
  min-height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(23, 19, 21, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 1px 2px rgba(23, 19, 21, .04);
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary:hover { border-color: rgba(250, 37, 108, .42); background: #fff; }
.language-picker summary:active { transform: scale(.96); }
.language-picker summary:focus-visible { outline: 3px solid rgba(250, 37, 108, .42); outline-offset: 3px; }

.language-picker summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-menu {
  width: 190px;
  padding: 7px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(23, 19, 21, .11);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(36, 19, 26, .16), 0 3px 10px rgba(36, 19, 26, .08);
}

.language-menu a {
  min-height: 40px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  color: #3b3337;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
}

.language-menu a:hover { background: #f8f3f0; }
.language-menu a[aria-current="true"] { color: #c90d4d; background: #fff0f5; }
.language-menu small { color: #7a7074; font-size: 10px; font-weight: 850; letter-spacing: .04em; }

.sidebar-language-slot {
  width: 100%;
  justify-content: flex-start;
}

.sidebar-language-slot .language-picker,
.sidebar-language-slot summary { width: 100%; }

.sidebar-language-slot summary { justify-content: flex-start; border-radius: 9px; }
.sidebar-language-slot .language-menu { right: auto; left: 0; bottom: calc(100% + 8px); top: auto; }

.login-language-slot {
  position: fixed;
  z-index: 40;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
}

.preview-language-slot {
  width: 100%;
  margin-top: 12px;
  justify-content: flex-start;
}

.preview-language-slot .language-picker,
.preview-language-slot summary { width: 100%; }

.preview-language-slot summary { justify-content: flex-start; border-radius: 8px; }
.preview-language-slot .language-menu { right: auto; left: 0; bottom: calc(100% + 8px); top: auto; }

html[data-locale="de"] :where(button, a, label, small, span, p, h1, h2, h3, h4) {
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (max-width: 720px) {
  .language-picker summary { min-width: 48px; padding-inline: 9px; }
  .language-menu { position: fixed; top: 68px; right: 12px; bottom: auto; left: auto; }
  .sidebar-language-slot .language-menu,
  .preview-language-slot .language-menu { top: auto; right: 12px; bottom: 76px; left: 12px; width: auto; }
}

@media (max-width: 640px) {
  .site-header .login-link > span { display: none; }
  .site-header .header-actions { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .language-picker summary { transition: none; }
}
