/* =========================================================
   Języki strony (inc/i18n.php): przełącznik przy koszyku, PL | UA | EN w menu na telefonie,
   podpowiedź według języka przeglądarki, dopisek na stronach prawnych
   ========================================================= */

/* Kula z kodem języka — jak ikony koszyka i konta */
.lang { position: relative; margin-left: 4px; }
.lang__btn {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 10px;
  border: 0; border-radius: 20px; background: none; color: var(--ink); cursor: pointer;
  font: inherit; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; transition: background-color .2s;
}
.lang__btn:hover, .lang__btn[aria-expanded="true"] { background: var(--mist); }
.lang__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.lang__menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 184px;
  margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .05);
}
.lang__menu a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px;
  border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .9375rem;
}
.lang__menu a:hover, .lang__menu a:focus-visible { background: var(--mist); }
.lang__menu a[aria-current] { font-weight: 650; }
.lang__menu a[aria-current]::after { content: "✓"; font-weight: 600; }
@media (max-width: 880px) { .nav__inner > .lang { display: none; } }

/* Telefon: wybór języka w menu */
.lang-seg { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; color: var(--ink-3); }
.lang-seg > svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.lang-seg > div { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--mist); }
.lang-seg a { padding: 8px 16px; border-radius: 9px; color: var(--ink-2); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.lang-seg a[aria-current] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* Pasek menu z przełącznikiem — na węższych ekranach mniejsze odstępy, żeby zmieściły się dłuższe słowa (UA) */
.nav__top { white-space: nowrap; }
@media (min-width: 881px) and (max-width: 1280px) {
  .nav__inner { gap: 16px; }
  .nav__top { padding-inline: 8px; }
  .nav__top[aria-current]::after { left: 8px; right: 8px; }
  .lang__btn { padding: 0 8px; }
  .nav__inner > .nav__account { margin-left: -12px; } /* 4 px od koszyka, jak przy odstępie 28 px na dużym ekranie (shop.css: -24 px) */
  .brand, .nav__cart, .nav__cta { flex-shrink: 0; } /* logo i ikony nie dają się ścisnąć pod menu */
  .brand__mark { width: 27px; height: 27px; } .brand__word { height: 18px; } /* logo pośrednie — pasek UA mieści się od 881 px */
  :root:lang(uk) .nav__top { padding-inline: 7px; } /* UA «Безпека» (2026-10-25) — pasek bez przycisku nadal od 881 px */
  :root:lang(uk) .nav__top[aria-current]::after { left: 7px; right: 7px; }
}
/* Gdy cały pasek się nie mieści, chowamy przycisk konsultacji (na telefonie też go w pasku nie ma).
   Cały pasek (Geist, większe logo z 2026-10-24, menu UA «Безпека» / EN „Security” z 2026-10-25) mieści się od PL 1024 px,
   EN 977 px, UA 1120 px (dłuższe słowa i przycisk); progi + 16 px zapasu. Bez przycisku pasek mieści się od 881 px w każdym języku. */
@media (min-width: 881px) and (max-width: 1039px) { :root:lang(pl) .nav__cta { display: none; } }
@media (min-width: 881px) and (max-width: 993px) { :root:lang(en) .nav__cta { display: none; } }
@media (min-width: 881px) and (max-width: 1136px) { :root:lang(uk) .nav__cta { display: none; } }

/* Podpowiedź: „Ця сторінка є українською” (tylko na polskich stronach, według języka przeglądarki) */
.lang-hint {
  position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 14px;
  padding: 10px 56px; background: var(--mist); color: var(--ink-2); font-size: .875rem; line-height: 1.4; text-align: center;
}
.lang-hint a { font-weight: 600; color: var(--armed-deep, #0b5fd6); text-decoration: none; white-space: nowrap; }
.lang-hint a:hover { text-decoration: underline; }
.lang-hint button {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer;
}
.lang-hint button:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.lang-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 560px) { .lang-hint { padding-inline: 16px 48px; justify-content: flex-start; text-align: left; } }

/* Strony prawne po ukraińsku i angielsku: tłumaczenie dla wygody, wiążąca wersja polska */
.legal-note { padding: 14px 18px; border-radius: 12px; background: var(--mist); color: var(--ink-2); font-size: .9375rem; }
