/* Language toggle "EN / NO" — inc/tq/parts/lang.php (2026-10-23).
   Mono micro caps like the footer strip, so it reads as a utility, not a
   menu item. The current language is ink, the other one muted until hovered.
   Each item gets ~10px of padding pulled back with negative margin: a 32px+
   target (WCAG 2.5.8 asks 24) without making the nav bar taller. */

.tq .tq-lang {
  display: flex; align-items: center; gap: 2px;
  font-family: var(--tq-mono); font-size: 12px; line-height: 1;
  letter-spacing: var(--tq-track-micro); text-transform: uppercase;
  white-space: nowrap;
}
.tq .tq-lang__item { display: inline-block; padding: 10px 4px; margin: -10px 0; }
.tq .tq-lang__sep  { opacity: .45; }

/* nav · solid */
.tq .tq-lang--nav { color: var(--tq-mute); }
.tq .tq-lang--nav .is-current { color: var(--tq-ink); font-weight: 500; }
.tq .tq-lang--nav a:hover { color: var(--tq-ink); }

/* nav · overlay (entry page, white over the photograph). The photo behind it
   is a light wall at 1440, so both items are full white with a soft shadow;
   the current one is marked by weight and an underline, not by colour. */
.tq .tq-nav--overlay .tq-lang--nav { color: var(--tq-paper); text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.tq .tq-nav--overlay .tq-lang--nav .is-current { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.tq .tq-nav--overlay .tq-lang--nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tq .tq-nav--overlay .tq-nav__actions { align-items: center; }
.tq .tq-nav--overlay .tq-lang { margin-right: 6px; }

/* footer strip */
.tq .tq-lang--footer { color: var(--tq-mute); }
.tq .tq-lang--footer .is-current,
.tq .tq-lang--footer a:hover { color: var(--tq-paper); }

@media (max-width: 767px) {
  .tq .tq-nav--overlay .tq-lang { margin-right: 2px; }
  /* Footer strip: 44px rows on phones, like the policy links next to it. */
  .tq .tq-lang--footer { margin-left: -6px; }
  .tq .tq-lang--footer .tq-lang__item { padding: 16px 6px; }
}

/* Phones, entry page: logo + two pills leave no room for "EN / NO", so the
   overlay shows only the language you can switch TO ("NO" on English pages,
   "EN" on Norwegian ones). The full toggle is still in the footer. */
@media (max-width: 479px) {
  .tq .tq-nav--overlay .tq-lang .is-current,
  .tq .tq-nav--overlay .tq-lang__sep { display: none; }
}

/* Phones, entry page, Norwegian (16 Nov 2026): the "PRODUKTER" and "HANDLEKURV 0" pills are
   63px wider than "PRODUCTS" and "CART 0", so the row ended at 405px and the page scrolled
   sideways at 390. The pills give up some padding, gap and half their letter-spacing, and
   up to 402px a point of type too (17 Nov: was under 390; from 390 the Home logo is 19px, 102px
   wide, and it touched "EN" again): 22px between the logo and "EN" at 390, 12px at 403, 8px at
   360. English keeps the canvas sizes; :lang(nb) also outranks the base.css rules it overrides. */
@media (max-width: 479px) {
  .tq .tq-nav--overlay:lang(nb) .tq-nav__actions { gap: 6px; }
  .tq .tq-nav--overlay:lang(nb) .tq-lang { margin-right: 0; }
  .tq .tq-nav--overlay:lang(nb) .tq-pill { padding: 0 9px; gap: 6px; letter-spacing: .08em; }
}
@media (max-width: 402px) {
  .tq .tq-nav--overlay:lang(nb) .tq-nav__actions { gap: 4px; }
  .tq .tq-nav--overlay:lang(nb) .tq-pill { padding: 0 8px; font-size: 10px; }
}
/* 480-492: "EN / NO" is back in the row, and beside the 19px logo the full Norwegian pills ran
   1px into the margin with the logo touching "EN" at 480. 10px side padding gives it 15px. */
@media (min-width: 480px) and (max-width: 492px) {
  .tq .tq-nav--overlay:lang(nb) .tq-pill { padding: 0 10px; }
}

/* English 360-374 (17 Nov 2026): the full pills left the 16px logo touching "NO" (0px at 360).
   10px side padding instead of 14 gives it 12px, as 375 has; the type stays the canvas's. */
@media (max-width: 374px) {
  .tq .tq-nav--overlay .tq-pill { padding: 0 10px; }
}

/* Under 360 (the logo is 15px there) English pages take the same small pills: "NO",
   "PRODUCTS" and "CART 0" ran 18px past a 320px screen. The Norwegian pills still do not fit
   beside "EN" at 320 (7px over), so the Norwegian bar drops it; the full toggle is in the footer. */
@media (max-width: 359px) {
  .tq .tq-nav--overlay .tq-nav__actions { gap: 4px; }
  .tq .tq-nav--overlay .tq-lang { margin-right: 0; }
  .tq .tq-nav--overlay .tq-pill { padding: 0 8px; gap: 6px; letter-spacing: .08em; font-size: 10px; }
  .tq .tq-nav--overlay:lang(nb) .tq-lang { display: none; }
}
