/* OMID LANGUAGE SWITCH FIX V3 - one selector, no overlays */
header.site-header > .omid-lang-switch {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 5px 7px !important;
  margin: 0 !important;
  min-width: max-content;
  flex: 0 0 auto;
  background: rgba(8, 21, 43, .54);
  border: 1px solid rgba(186, 210, 244, .16);
  border-radius: 14px;
  box-shadow: none;
  backdrop-filter: blur(9px);
}
header.site-header > .omid-lang-switch > a {
  width: 39px !important;
  height: 35px !important;
  flex: 0 0 39px !important;
  padding: 5px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.055);
  box-shadow: none !important;
  text-decoration: none !important;
}
header.site-header > .omid-lang-switch > a.is-active {
  background: rgba(73, 132, 255, .18);
  border-color: rgba(136, 192, 255, .55);
}
header.site-header > .omid-lang-switch > a:focus-visible {
  outline: 2px solid #8ccfff;
  outline-offset: 2px;
}
header.site-header > .omid-lang-switch img {
  display: block !important;
  width: 28px !important;
  height: 19px !important;
  border-radius: 3px;
  object-fit: cover;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none;
}
/* The selector is a flex item, never an absolutely positioned overlay. */
header.site-header:has(> .nav) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: clamp(8px, 1.1vw, 18px);
}
header.site-header > .brand { order: 0; flex-shrink: 0; }
header.site-header > .nav { order: 1; gap: clamp(11px, 1.25vw, 22px); min-width: 0; }
header.site-header > .omid-lang-switch { order: 2; }
header.site-header > .header-cta { order: 3; flex-shrink: 0; }
header.site-header > .menu-toggle { order: 4; }

/* German labels can be longer. Switch to the existing mobile menu
   before links or flags can collide. */
@media (max-width: 1200px) {
  header.site-header > .header-cta { display: none !important; }
  header.site-header > .nav:not(.open) { display: none !important; }
  header.site-header > .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  header.site-header > .nav.open {
    display: flex !important;
    position: absolute;
    z-index: 80;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 18px;
    background: #07182f;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  header.site-header > .nav.open a { padding: 12px 0; }
  header.site-header:has(> .nav) > .omid-lang-switch { margin-left: auto !important; }
}
@media (max-width: 480px) {
  header.site-header > .brand { font-size: 14px; min-width: 0; }
  header.site-header > .omid-lang-switch { gap: 3px !important; padding: 3px 4px !important; }
  header.site-header > .omid-lang-switch > a { width: 34px !important; height: 32px !important; flex-basis: 34px !important; }
  header.site-header > .omid-lang-switch img { width: 25px !important; height: 17px !important; }
}
/* Rechnung pages have their own header styles. Their language links
   also use the same two flag images, without a second injected selector. */
