.language-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #e8e9f0; border-radius: 10px; background: #fff; }
.language-switch button { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 0; border-radius: 7px; color: #5f6475; background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .language-switch button:hover { background: #f6f5ff; } }
.language-switch button[aria-pressed="true"] { color: #5545d3; background: #f0edff; }
.language-switch .flag { width: 18px; height: 12px; display: block; flex: 0 0 18px; overflow: hidden; border-radius: 2px; box-shadow: 0 0 0 1px rgb(32 35 56 / 12%); }
.language-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 16px; margin-left: auto; white-space: nowrap; }
.language-actions .back-link, .language-actions .legal-back { flex-shrink: 0; margin: 0; white-space: nowrap; }
.language-actions .language-switch { margin: 0; }
@media (max-width: 560px) {
  .language-actions { gap: 8px; }
  .language-switch { gap: 2px; padding: 3px; }
  .language-switch button { min-height: 30px; padding: 0 6px; font-size: 10px; }
  header.tool-header .contact-header-inner > .tool-brand img,
  header.contact-header .contact-header-inner > .contact-brand img { width: 110px; height: auto; }
}
@media (max-width: 380px) {
  /* Na 320px długi link "Wróć do narzędzi" + przełącznik języka wychodziły poza ekran. */
  .site-header .header-inner:has(.language-actions),
  .random-header-inner { gap: 8px; }
  .site-header .header-inner:has(.language-actions) > .brand img,
  .random-header-inner > .tool-brand img { width: 104px; height: 46px; }
  header.tool-header .contact-header-inner,
  header.contact-header .contact-header-inner { gap: 6px; }
  .language-actions { gap: 5px; }
  .language-actions .back-link { font-size: 10px; }
  .language-switch .flag { width: 15px; flex-basis: 15px; }
  .language-switch button { gap: 3px; padding: 0 4px; font-size: 9px; }
  header.tool-header .contact-header-inner > .tool-brand img,
  header.contact-header .contact-header-inner > .contact-brand img { width: 88px; }
}
