/* ============================================================
   FULL SERWIS – przełącznik języka: style
   Dopasowane do istniejącej palety: --yellow #F5C100, --black,
   font 'Barlow Condensed'. Nie nadpisuje niczego z base.css.
   ============================================================ */

/* ---------- pasek nad menu ---------- */
#fs-topbar {
  background: #111;
  border-bottom: 1px solid #262626;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  z-index: 1200;
}
#fs-topbar .fs-tb-inner {
  /* Trzy kolumny o rownej szerokosci skrajnych -- tekst zawsze na
     geometrycznym srodku paska, niezaleznie od dlugosci w danym jezyku. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 7px clamp(14px, 5vw, 80px);
}
.fs-tb-inner > .fs-lang {
  grid-column: 3;
  justify-self: end;
}
#fs-topbar .fs-tb-note {
  color: #9a9a9a;
  margin: 0;
  /* Tekst na srodku paska. grid-column:2 stawia go w srodkowej kolumnie,
     wiec pozycja nie zalezy od szerokosci przelacznika jezyka --
     inaczej dluzszy tekst UK przesuwalby srodek. */
  grid-column: 2;
  text-align: center;
  min-width: 0;
}
#fs-topbar .fs-tb-note a {
  color: #F5C100;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
#fs-topbar .fs-tb-note a:hover { text-decoration: underline; }
#fs-topbar .fs-tb-sep { color: #444; margin: 0 2px; }

/* ---------- przełącznik ---------- */
.fs-lang { position: relative; flex-shrink: 0; }

.fs-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid #333;
  color: #ddd;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 5px 11px;
  cursor: pointer;
  transition: border-color .18s, color .18s;
}
.fs-lang-btn:hover,
.fs-lang-btn[aria-expanded="true"] { border-color: #F5C100; color: #fff; }
.fs-lang-btn svg:first-child { display: block; flex-shrink: 0; }
.fs-caret { transition: transform .2s; }
.fs-lang-btn[aria-expanded="true"] .fs-caret { transform: rotate(180deg); }

.fs-lang-drop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 178px;
  background: #1a1a1a;
  border: 1px solid #333;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 1300;
}
.fs-lang-drop.open { opacity: 1; visibility: visible; transform: translateY(0); }

.fs-lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #262626;
  color: #ccc;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.fs-lang-opt:last-child { border-bottom: 0; }
.fs-lang-opt:hover { background: #242424; color: #fff; }
.fs-lang-opt.active { color: #F5C100; font-weight: 700; }
.fs-lang-opt svg { flex-shrink: 0; }

/* ---------- overlay ładowania ---------- */
#fs-lang-loader {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,.93);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity .28s ease;
}
#fs-lang-loader.on { opacity: 1; }

.fs-ll-box { text-align: center; }

.fs-ll-flag {
  margin: 0 auto 18px;
  width: 46px;
  animation: fsLLpop .45s cubic-bezier(.2,.9,.3,1.4);
}
.fs-ll-flag svg { width: 46px; height: auto; display: block; }

.fs-ll-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 3px solid rgba(245,193,0,.22);
  border-top-color: #F5C100;
  border-radius: 50%;
  animation: fsLLspin .75s linear infinite;
}

.fs-ll-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #F5C100;
}

@keyframes fsLLspin { to { transform: rotate(360deg); } }
@keyframes fsLLpop {
  0%   { transform: scale(.5) translateY(8px); opacity: 0; }
  100% { transform: scale(1) translateY(0);    opacity: 1; }
}

/* ---------- sugestia języka ---------- */
#fs-lang-suggest {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 11px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-left: 3px solid #F5C100;
  padding: 11px 14px;
  box-shadow: 0 10px 34px rgba(0,0,0,.5);
  z-index: 9500;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  max-width: calc(100vw - 28px);
}
#fs-lang-suggest.on { opacity: 1; transform: translate(-50%, 0); }
#fs-lang-suggest span { color: #ddd; font-size: 14px; }
#fs-lang-suggest svg { flex-shrink: 0; }
#fs-lang-suggest button[data-go] {
  background: #F5C100;
  color: #000;
  border: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 7px 15px;
  cursor: pointer;
  flex-shrink: 0;
}
#fs-lang-suggest button[data-dismiss] {
  background: transparent;
  border: 0;
  color: #777;
  font-size: 15px;
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1;
  flex-shrink: 0;
}
#fs-lang-suggest button[data-dismiss]:hover { color: #fff; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  /* Na waskim ekranie trzy kolumny scisnelyby tekst do kilku znakow.
     Uklad pionowy: przelacznik na gorze po prawej, tekst pod nim
     na calej szerokosci i wysrodkowany. */
  #fs-topbar .fs-tb-inner {
    grid-template-columns: 1fr;
    padding: 6px 14px;
    gap: 6px;
  }
  #fs-topbar .fs-tb-inner > .fs-lang {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
  }
  #fs-topbar .fs-tb-note {
    grid-column: 1;
    grid-row: 2;
    font-size: 12px;
    min-width: 0;
    text-align: center;
  }
  #fs-topbar .fs-tb-sep   { display: none; }
  #fs-topbar .fs-tb-note a { display: inline-block; }
  .fs-lang-btn { padding: 4px 9px; font-size: 13px; }
  #fs-lang-suggest { left: 14px; right: 14px; transform: translateY(20px); max-width: none; }
  #fs-lang-suggest.on { transform: translateY(0); }
  #fs-lang-suggest span { font-size: 13px; }
}

/* ---------- dostępność ---------- */
@media (prefers-reduced-motion: reduce) {
  #fs-lang-loader, .fs-ll-flag, .fs-ll-spinner,
  #fs-lang-suggest, .fs-lang-drop, .fs-caret {
    animation: none !important;
    transition: none !important;
  }
}
