/* Globalny wyszukiwalny wybór wspólnoty.
   ZASADA PROJEKTU: pole ma wyglądać jak zwykły select/input.
   Bez niebieskich bocznych przycisków, kafli i agresywnego aktywnego koloru. */
.community-combobox-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.community-combobox {
  position: relative !important;
  width: 100% !important;
  min-width: min(100%, 480px) !important;
  display: block !important;
}
.community-combobox__control {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}
.community-combobox__control::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 13px;
  pointer-events: none;
}
.community-combobox__input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  border: 1px solid #eef2f7 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: inherit !important;
  font: inherit !important;
  font-weight: inherit !important;
  line-height: 1.35 !important;
  padding: 10px 36px 10px 12px !important;
  min-height: 42px !important;
  outline: none !important;
  box-shadow: none !important;
  text-align: left !important;
}
.community-combobox__input:focus {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, .08) !important;
}
.home422-community-form .community-combobox {
  min-width: min(100%, 560px) !important;
}
.home422-community-form .community-combobox__input {
  height: 46px !important;
}
.community-combobox-dropdown {
  position: fixed !important;
  z-index: 999999 !important;
  box-sizing: border-box !important;
  min-width: 540px !important;
  max-height: 380px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  background: #fff !important;
  border: 1px solid #eef2f7 !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16) !important;
  padding: 4px !important;
}
.community-combobox-dropdown[hidden] {
  display: none !important;
}
.community-combobox__option {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: #fff !important;
  color: #0f172a !important;
  text-align: left !important;
  cursor: pointer !important;
  font: inherit !important;
  font-weight: 500 !important;
  line-height: 1.28 !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  text-transform: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
.community-combobox__option:hover,
.community-combobox__option.is-active {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.community-combobox__option.is-selected {
  font-weight: 700 !important;
  background: #e5e7eb !important;
  color: #0f172a !important;
}
.community-combobox__empty {
  padding: 12px 10px !important;
  color: #64748b !important;
  font-size: 14px !important;
  background: #fff !important;
}
@media (max-width: 720px) {
  .community-combobox-dropdown {
    max-height: 320px !important;
    min-width: 260px !important;
  }
  .community-combobox__input {
    min-height: 44px !important;
  }
}

/* === Globalny selektor wspólnoty w nagłówku (zastępuje pigułkę active-community-pill-v544k).
   2026-05-30: jeden wybór wspólnoty na całą aplikację, z wyszukiwaniem (auto-enhance JS),
   auto-submit bez przycisku. Umiejscowienie i wygląd jak dawna pigułka; szerokość pod pełną nazwę. === */
/* Sticky wymaga, by przodek NIE był kontenerem scrolla. .main ma overflow-x:clip,
   co (per spec) wymusza overflow-y:auto i łamie sticky. Zdejmujemy clip (oba osie visible),
   żeby sticky trzymał. (Weryfikacja: brak poziomego scrolla na szerokich tabelach.) */
.app-shell-unified-v211 .main.main-auth{ overflow: visible !important; }
/* Sentinel: 0-wysokościowy znacznik tuż przed paskiem. JS wykrywa nim moment „przyklejenia". */
.global-community-sentinel{ display:block; height:1px; margin:0; padding:0; pointer-events:none; }
/* Pasek: STICKY (top:0) na szerokość treści. Pigułka po LEWEJ — lista comboboxa otwiera się
   w szeroką przestrzeń treści i NIE ucina nazw wspólnot (po prawej wychodziła za krawędź).
   W spoczynku PRZEZROCZYSTY; przy scrollu (.is-stuck) nieprzezroczyste tło + cień → treść
   chowa się POD paskiem czysto, nic nie nachodzi. */
.global-community-bar{
  position:sticky; top:0; z-index:35;
  display:flex; justify-content:flex-start; align-items:center;
  margin:0 0 12px; padding:8px 0;
  background:transparent;
  transition:background .12s ease, box-shadow .12s ease;
}
.global-community-bar.is-stuck{
  background:#eef3f9;
  box-shadow:0 6px 16px rgba(15,23,42,.06);
}
.global-community-form{
  /* Pigułka active-community-pill-v544k 1:1 (slim tekstowa, NIE box input). Pozycjonowanie
     przejął pasek (.global-community-bar) — formularz jest statyczny w pasku, po prawej. */
  position:static;
  margin:0;
  width:max-content; max-width:min(560px,100%);
  min-height:30px;
  display:flex; align-items:center; gap:6px;
  padding:6px 11px;
  border:1px solid #eef2f7; border-radius:999px; background:#fff;
  color:#475569;
  box-shadow:0 8px 22px rgba(15,23,42,.08);
  font-size:12px; font-weight:850; line-height:1.2;
}
.global-community-form__label{font-size:12px; font-weight:850; color:#475569; white-space:nowrap; flex-shrink:0;}
/* „Zadania w tle" — pin przy selektorze wspólnoty (2026-05-31). Pigułka grafit/slate,
   spójna z paskiem, BEZ niebieskiego (PR #274/#331). Zawsze widoczna u góry. */
.global-community-bar__pin{
  display:inline-flex; align-items:center; gap:6px; flex-shrink:0;
  margin-left:10px; padding:6px 12px;
  border:1px solid #e2e8f0; border-radius:999px; background:#fff;
  color:#334155; text-decoration:none;
  font-size:12px; font-weight:850; line-height:1.2; white-space:nowrap;
  box-shadow:0 8px 22px rgba(15,23,42,.08);
  transition:background .12s ease, color .12s ease, border-color .12s ease;
}
.global-community-bar__pin:hover{background:#f1f5f9; color:#0f172a; border-color:#cbd5e1;}
.global-community-bar__pin.is-active{background:#334155; color:#fff; border-color:#334155;}
/* CEL 2 (2026-06-02): „Zadania w tle" jest teraz <button> (otwiera panel, nie nawiguje) —
   reset domyślnego wyglądu przycisku, by wyglądał identycznie jak dawny link-pin. */
button.global-community-bar__pin{font-family:inherit; cursor:pointer; appearance:none;}
button.global-community-bar__pin[aria-expanded="true"]{background:#334155; color:#fff; border-color:#334155;}

/* CEL 2: wysuwany panel „Zadania w tle" (slide-over po prawej, nad bieżącym widokiem). */
.jobs-panel{position:fixed; inset:0; z-index:1200;}
.jobs-panel[hidden]{display:none;}
.jobs-panel__backdrop{position:absolute; inset:0; background:rgba(15,23,42,.32); opacity:0; transition:opacity .2s ease;}
.jobs-panel.is-open .jobs-panel__backdrop{opacity:1;}
.jobs-panel__dialog{position:absolute; top:0; right:0; bottom:0; width:420px; max-width:92vw;
  background:#fff; box-shadow:-12px 0 40px rgba(15,23,42,.18); display:flex; flex-direction:column;
  transform:translateX(100%); transition:transform .22s ease;}
.jobs-panel.is-open .jobs-panel__dialog{transform:translateX(0);}
.jobs-panel__header{display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:16px 18px; border-bottom:1px solid #e2e8f0;}
.jobs-panel__title{margin:0; font-size:16px; font-weight:800; color:#0f172a; display:flex; align-items:center; gap:8px;}
.jobs-panel__close{appearance:none; border:0; background:transparent; cursor:pointer; font-size:24px; line-height:1; color:#64748b; padding:0 4px;}
.jobs-panel__close:hover{color:#0f172a;}
.jobs-panel__body{flex:1 1 auto; overflow-y:auto; padding:14px 18px;}
.jobs-panel__summary{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px;}
.jobs-panel__list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px;}
.jobs-panel__item{border:1px solid #e5e7eb; border-radius:10px; padding:10px 12px; background:#fff;}
.jobs-panel__item-head{display:flex; align-items:center; gap:8px; margin-bottom:4px;}
.jobs-panel__type{font-size:11px; color:#64748b; text-transform:uppercase; letter-spacing:.3px;}
.jobs-panel__label{font-size:13px; font-weight:600; color:#0f172a;}
.jobs-panel__meta{font-size:11.5px; color:#94a3b8; margin-top:3px;}
.jobs-panel__err{color:#b91c1c;}
/* CEL 2 (2026-06-02): przyciski akcji przy każdym zadaniu w panelu (Uruchom / Usuń). */
.jobs-panel__item-actions{display:flex; gap:6px; flex-wrap:wrap; margin-top:8px;}
.jobs-panel__action-form{display:inline-flex; margin:0;}
.jobs-panel__empty{color:#64748b; font-size:13px; padding:12px 0;}
.jobs-panel__footer{padding:14px 18px; border-top:1px solid #e2e8f0;}
@media (max-width: 920px){
  .global-community-bar__pin{margin-left:0; margin-top:8px;}
}
/* Combobox = dokładnie TEKST dawnego <strong> pigułki: bez ramki/tła/cienia, bez
   wysokości pola (min-height:0), 12px/850 grafit. Pole DOPASOWUJE się do długości
   nazwy (field-sizing:content). Strzałka ▾ tuż za tekstem, nie w rogu pola. */
.global-community-form .community-combobox{width:auto!important; min-width:0!important; max-width:420px!important; display:inline-flex!important;}
.global-community-form .community-combobox__control{border:0!important; background:transparent!important; padding:0!important; box-shadow:none!important; min-height:0!important; width:auto!important;}
.global-community-form .community-combobox__control::after{position:static; transform:none; margin-left:4px; color:#64748b; font-size:11px;}
.global-community-form .community-combobox__input{
  field-sizing:content;
  width:auto!important; min-width:6ch; max-width:420px!important;
  border:0!important; background:transparent!important; padding:0!important;
  min-height:0!important; height:auto!important;
  font-size:12px!important; font-weight:850!important; color:#1f2937!important;
  line-height:1.2!important; box-shadow:none!important;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.global-community-form .community-combobox__input:focus{box-shadow:none!important; outline:0!important;}
@media (max-width: 920px){
  /* Na wąskich ekranach pasek NIE sticky (nie kolidowałby z fixed-headerem/hamburgerem) —
     w przepływie, pigułka pełnej szerokości. */
  .global-community-bar{position:static; margin:0 0 12px; padding:0; background:transparent; box-shadow:none; flex-wrap:wrap;}
  .global-community-form{width:100%; max-width:100%; margin:0;}
  .global-community-form .community-combobox{max-width:100%!important;}
  .global-community-form .community-combobox__input{max-width:100%!important;}
}
