html:has(#jedna.gr-wyjazd-czat:not([hidden])) #fa-pasek { display:none }

/* Górny pasek portalu (#unibar z ikonami aplikacji, pasek „potwierdź e-mail” #ub-nag, ikony bez paska .fa-gora-sam) ma
   z-index ponad 2 miliardy i leżał na pasku grupy, więc po wejściu do grupy nie było widać nazwy, liczby osób ani powrotu
   (zgłoszenie właściciela 4.12.2026). Czat ma własny pasek z powrotem i menu, więc w czacie górnego paska portalu nie ma. */
html:has(#jedna.gr-wyjazd-czat:not([hidden])) :is(#unibar, #ub-nag, .fa-gora-sam) { display:none !important }

html:has(#jedna.gr-wyjazd-czat:not([hidden])) { overflow:hidden; overscroll-behavior:none }

#jedna.gr-wyjazd-czat {
  --bg:#101117;
  --bg2:#252733;
  --panel:#191b24;
  --input:#252733;
  --ink:#f3f4f8;
  --muted:#a9adbb;
  --line:#363949;
  --gr-czat-akcent:#2f6304;
  position:fixed;
  z-index:45;
  inset-inline:0;
  top:var(--gr-czat-gora, 0px);
  height:var(--gr-czat-wys, 100dvh);
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
  overflow:hidden;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:var(--bg);
  color:var(--ink);
  color-scheme:dark;
  font-size:14px;
}

.gr-wyjazd-czat :is(button, summary):focus-visible {
  outline:2px solid #b6e04a;
  outline-offset:-2px;
}

.gr-czat-pasek, .gr-czat-info > header {
  display:flex;
  align-items:center;
  gap:4px;
  min-height:54px;
  padding:2px 6px;
  background:var(--panel);
}
.gr-czat-pasek {
  flex:none;
  padding-inline:max(6px, calc((100% - 760px) / 2));
  border-bottom:1px solid var(--line);
}

/* funkcje wyjazdu pod paskiem grupy (4.12.2026): plan, loty, zbiórka, ogłoszenia; na telefonie przewijane w bok */
.gr-czat-skroty {
  display:flex;
  flex:none;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:none;
  padding:6px max(10px, calc((100% - 760px) / 2));
  border-bottom:1px solid var(--line);
  background:var(--panel);
}
.gr-czat-skroty[hidden], .gr-czat-skroty [hidden] { display:none }
.gr-czat-skroty button {
  flex:none;
  min-height:36px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--bg2);
  color:var(--ink);
  font:inherit;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  cursor:pointer;
}
.gr-czat-skroty button:hover { background:#2c3322 }

.gr-czat-pasek button, .gr-czat-info > header button,
.gr-wyjazd-czat .tb-pisz :is(.tb-spinacz,.tb-slij,.rg-mic) {
  display:grid;
  place-items:center;
  flex:none;
  min-width:44px;
  min-height:44px;
  margin:0;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  color:inherit;
  font:inherit;
  cursor:pointer;
}

.gr-wyjazd-czat :is(.gr-czat-pasek,.gr-czat-info > header,.tb-pisz) svg {
  display:block;
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.75;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.gr-czat-pasek .gr-czat-profil {
  display:flex;
  flex:1;
  gap:9px;
  min-width:0;
  text-align:left;
}

.gr-czat-profil > span + span { min-width:0 }
.gr-czat-profil strong, .gr-czat-profil small {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.gr-czat-profil strong { font-size:15px }
.gr-czat-profil small { color:var(--muted); font-size:12px }
.gr-czat-miniatura {
  display:grid;
  flex:none;
  place-items:center;
  width:40px;
  height:40px;
  overflow:hidden;
  border-radius:50%;
  background:var(--gr-czat-akcent);
  font-weight:700;
}
.gr-czat-miniatura img { width:100%; height:100%; object-fit:cover }

/* podpowiedź „Włącz powiadomienia” (4.12.2026): pod paskiem grupy, nad przypiętym ogłoszeniem i wiadomościami */
.gr-czat-powiad {
  display:flex;
  flex:none;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 10px;
  box-sizing:border-box;
  padding:8px 14px;
  border-bottom:1px solid var(--line);
  background:#1c3410;
  font-size:13px;
  line-height:1.45;
}
.gr-czat-powiad[hidden], .gr-czat-powiad [hidden] { display:none }
.gr-czat-powiad p { flex:1 1 220px; min-width:0; margin:0; overflow-wrap:anywhere }
.gr-czat-powiad button {
  flex:none;
  min-height:44px;
  padding:0 14px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:600;
  cursor:pointer;
}
.gr-czat-powiad .gr-czat-powiad-tak { background:#3d7a05; color:#fff }
.gr-czat-przypiete { background:var(--bg2) }
.gr-czat-przypiete summary, .gr-czat-opcje summary {
  padding:8px 14px;
  cursor:pointer;
}
.gr-czat-przypiete summary {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
}
.gr-czat-przypiete > div {
  padding:4px 14px 10px;
  max-height:18dvh;
  overflow:auto;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}
.gr-czat-przypiete button { display:block; margin-top:6px }

.gr-wyjazd-czat :is(.gr-tablica,.tb-tablica) {
  display:flex;
  flex:1;
  flex-direction:column;
  min-height:0;
  min-width:0;
  margin:0;
}
.gr-wyjazd-czat .tb-strumien {
  display:flex;
  flex:1;
  flex-direction:column;
  min-height:0;
  overflow:auto;
  overflow-anchor:none;
  overscroll-behavior:contain;
  padding:4px max(10px, calc((100% - 760px) / 2));
}
/* Wpisy od góry ekranu (4.12.2026): przy kilku wpisach nie wiszą już na dole pustej przestrzeni; przy dłuższej historii
   tablica i tak startuje na najnowszym wpisie na dole. */
.gr-wyjazd-czat .tb-dalej { padding:2px 0 }
.gr-wyjazd-czat .tb-koniec { font-size:12px }

/* Wpisy jako wiersze komunikatora: wspólny styl .tb-wiersze w tablica.css (ten sam co w Rave Chat); tu tylko kolory czatu. */
.gr-wyjazd-czat .tb-wiersze { --tbw-pasek:var(--bg2); --tbw-kto:#dff0c4 }
.gr-wyjazd-czat .tb-piszbox { background:var(--panel) }
.gr-wyjazd-czat .tb-pisz {
  display:grid;
  grid-template-columns:44px minmax(0, 1fr) auto;
  align-items:end;
  margin:0 auto;
  max-width:760px;
  padding:4px 6px;
  border:0;
  border-radius:0;
}
.gr-wyjazd-czat .tb-stopka { display:contents }
.gr-wyjazd-czat .tb-spinacz { grid-area:1 / 1 }
.gr-wyjazd-czat .tb-pisz .tb-foto-btn,
.gr-wyjazd-czat .tb-licz,
.gr-wyjazd-czat .tb-pisz .tb-slij:disabled,
.gr-wyjazd-czat .tb-pisz:has(.tb-slij:not(:disabled)) .rg-box:not(:has([aria-pressed=true])),
.gr-wyjazd-czat .tb-pisz:has(.rg-mic[aria-pressed=true]) .tb-slij { display:none }
.gr-wyjazd-czat .tb-pisz :is(.tb-slij,.rg-box) { grid-area:1 / 3 }
.gr-wyjazd-czat .tb-pisz .rg-state { left:auto; right:0 }
.gr-wyjazd-czat .tb-pisz .tb-pole {
  grid-area:1 / 2;
  min-height:44px;
  max-height:22dvh;
  height:44px;
  field-sizing:content;
  resize:none;
  padding:11px 12px;
  border:0;
  border-radius:12px;
  font-size:16px;
  line-height:22px;
}
.gr-wyjazd-czat .tb-pisz :is(.tb-podglad,.tb-podglad-link) { grid-column:2 / -1 }
.gr-wyjazd-czat .tb-pisz .tb-podglad-link:not(:empty) { max-height:22dvh; overflow:auto }
.gr-wyjazd-czat .tb-plik-status:empty { display:none }
.gr-wyjazd-czat .tb-plik-status { grid-column:2 / -1 }
.gr-wyjazd-czat .tb-pisz.tb-gosc { display:block }

.gr-czat-info {
  position:absolute;
  inset:0;
  box-sizing:border-box;
  width:min(100%, 560px);
  max-width:none;
  height:100%;
  max-height:none;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border:0;
  background:var(--bg);
  color:var(--ink);
  overflow:hidden;
  z-index:1;
}
.gr-czat-info[open] { display:flex; flex-direction:column }

.gr-czat-info-tresc { min-height:0; overflow:auto; overscroll-behavior:contain; padding:6px 12px 16px }
.gr-czat-opcje summary { padding-inline:4px; min-height:28px }
.gr-czat-info .gr-hd,
.gr-czat-panel :is(.wz,.wa,.wk,.gj,.dj,.rw-box,.gj-panel,.dj-panel,.rave-ankiety,.rave-od,.og-form) {
  margin:0;
  padding:4px;
  border:0;
  border-radius:0;
  box-shadow:none;
  background:transparent;
}
.gr-czat-panel :is(.gj-otworz,.dj-otworz,.wk-otworz,.rave-ankiety h3) { display:none }

@supports (field-sizing:content) {
  .gr-wyjazd-czat .tb-pisz .tb-pole { height:auto }
}

.gr-czat-akcje { display:grid; gap:1px }
.gr-czat-akcje button, .gr-czat-info .gr3-tabs button {
  min-height:40px;
  padding:4px;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--ink);
  text-align:left;
  font:inherit;
  cursor:pointer;
}
.gr-czat-info .gr3-tabs [hidden] { display:none }
.gr-czat-info .gr3-tabs { border:0; padding:0; background:transparent }
.gr-czat-info .gr3-tabs [aria-selected=true] { background:var(--bg2); color:var(--ink) }
.gr-wyjazd-czat .tb-tablica { --tb-akcent:#b6e04a }
