/* AELITYX Blueprint — header language placement only.
   The Vite bundle loads its .header-inner spacing after these public styles,
   while language-menu.css also sets margin:0 on the enhanced selector.
   Explicit .topbar specificity and a mobile three-column grid prevent both
   rules from leaving the globe centered between the brand and hamburger. */
.topbar .header-inner {
  justify-content: flex-start;
  gap: 12px;
}
.topbar .header-inner > .main-nav {
  margin-left: auto;
  margin-right: 0;
  gap: clamp(12px, 1.55vw, 26px);
}
.header-inner > .aelityx-language {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line, #444);
  border-radius: 50%;
  color: var(--white, #eee);
  background: var(--surface, #171b22);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.header-inner > .aelityx-language:hover {
  border-color: var(--acid, #c9f36c);
  background: color-mix(in srgb, var(--surface, #171b22) 86%, var(--acid, #c9f36c));
}
.header-inner > .aelityx-language:focus-within {
  outline: 2px solid var(--acid, #c9f36c);
  outline-offset: 3px;
}
.header-inner > .aelityx-language > span {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}
.header-inner > .aelityx-language > select,
.header-inner > .aelityx-language > select#aelityx-language-select {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
/* src/platform.css collapses .main-nav at 760px. It is either display:none
   or position:absolute when open, so it never consumes a grid column. */
@media (max-width: 760px) {
  .topbar .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    justify-content: initial;
    gap: 10px;
  }
  .topbar .header-inner > .brand {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
  }
  .topbar .header-inner > .aelityx-language,
  .topbar .header-inner > .aelityx-language.aelityx-language--enhanced {
    grid-column: 2;
    justify-self: end;
    margin: 0;
  }
  .topbar .header-inner > .mobile-toggle {
    grid-column: 3;
    justify-self: end;
    flex-shrink: 0;
    margin: 0;
  }
}
@media (max-width: 680px) {
  .topbar .header-inner { gap: 9px; }
  .header-inner > .aelityx-language {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    max-width: 38px;
    min-height: 38px;
  }
  .header-inner > .aelityx-language > span { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .header-inner > .aelityx-language { transition: none; }
}
