/* Language switcher: compact EN / ES / JA, top-right, works on light and dark sites. */
html[data-mito-pending="1"] body { visibility: hidden; }
html[data-i18n-ready] body { visibility: visible; }

.mito-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  margin: 0;
  padding: 0;
  font-family: ui-monospace, "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.mito-lang a {
  color: inherit;
  text-decoration: none;
  opacity: 0.55;
  padding: 6px 2px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  box-shadow: none;
}
.mito-lang a:hover,
.mito-lang a:focus-visible {
  opacity: 1;
  text-decoration: none;
  outline: none;
}
.mito-lang a:focus-visible {
  box-shadow: 0 0 0 2px currentColor;
  border-radius: 2px;
}
.mito-lang a.is-active,
.mito-lang a[aria-current="true"] {
  opacity: 1;
  font-weight: 700;
}
.mito-lang .mito-lang-sep {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

/* WordPress mito-os header */
.site-header .header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
}
.site-header .mito-lang { font-size: 11px; color: inherit; }

/* Tools hub: floating top-right on the desktop */
.mito-lang-dock {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(12, 12, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f4f0e6;
  backdrop-filter: blur(6px);
}

/* Checker + monitoring sticky headers */
header.top .wrap {
  display: flex;
  align-items: center;
  flex-wrap: nowrap; /* labels must stay on the header row */
  gap: 10px 14px;
}
header.top .mito-lang {
  margin-left: auto;
  color: inherit;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  header.top .wrap {
    gap: 6px;
    padding-left: 10px;
    padding-right: 10px;
  }
  header.top .logo { font-size: 12.5px; }
  header.top nav:not(.mito-lang) { gap: 6px; flex-shrink: 0; }
  header.top .mito-lang { font-size: 11px; flex-shrink: 0; }
  header.top .mito-lang a { padding-left: 1px; padding-right: 1px; }
  .site-header .header-tools { width: 100%; justify-content: space-between; }
}

@media (max-width: 380px) {
  header.top .wrap { gap: 5px; padding-left: 8px; padding-right: 8px; }
  header.top .logo { font-size: 12px; }
  header.top nav .cta { padding: 4px 7px; font-size: 12.5px; }
}


/* Guard: some site styles hide "header nav links" on small screens
   (e.g. monitoring .top nav a:not(.cta){display:none}). The language
   links must stay visible, and must not inherit full-width
   space-between from .site-header nav. */
nav.mito-lang {
  width: auto !important;
  max-width: none;
  flex: 0 0 auto;
  justify-content: flex-end !important;
  gap: 0.28em;
  margin-left: auto;
}
nav.mito-lang a,
header.top nav.mito-lang a,
.site-header nav.mito-lang a {
  display: inline-flex !important;
  width: auto;
  flex: 0 0 auto;
  color: inherit;
  visibility: visible !important;
}
