/* The language a page is offered in, from site-language.js, and the footer
   switcher written by scripts/build-site-languages.js. Loaded only on pages
   that exist in more than one language. */

/* A charcoal card at the foot of the screen rather than a bar above the
   header: it never moves the page, it reads on the light sections and the
   dark ones alike, and it goes when dismissed. */
.lang-suggest {
  position: fixed;
  left: 50%;
  bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: max-content;
  max-width: calc(100% - 2 * var(--space-md));
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-mid);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.lang-suggest p {
  margin: 0;
}

.lang-suggest a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.lang-suggest button {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-sub);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.lang-suggest button:hover,
.lang-suggest button:focus-visible {
  color: var(--text);
}

.footer-languages {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-xl);
  margin-top: var(--space-lg);
}

.footer-languages a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.footer-languages a:hover {
  color: var(--text-sub);
}

.footer-languages a[aria-current="page"] {
  color: var(--text-sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}
