


#fab-czat {
  position: fixed; right: 12px; bottom: calc(496px + var(--safe-b, 0px)); z-index: 22;
  width: 52px; height: 52px; border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--txt); font-size: 22px; line-height: 1;
  cursor: pointer; box-shadow: 0 2px 10px var(--pv-color-overlay-blackA450);
}
#fab-czat.on { border-color: var(--accent); }
#cz-badge {
  position: absolute; top: -4px; right: -4px; display: none;
  min-width: 17px; padding: 1px 4px; border-radius: 9px;
  background: var(--pv-color-czat-sos); color: var(--pv-color-czat-badgeText); font-size: 10px; font-weight: 700;
}

#cz-panel {
  position: fixed; right: 72px; bottom: calc(140px + var(--safe-b, 0px)); z-index: 46;
  width: min(360px, calc(100vw - 24px));
  height: min(46vh, 430px);
  display: none; flex-direction: column;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  
  background: var(--pv-color-czat-panelBg);
  backdrop-filter: blur(5px);
  color: var(--txt);
  box-shadow: 0 6px 24px var(--pv-color-overlay-blackA550);
  font-size: 12.5px;
}
#cz-panel.on { display: flex; }

.cz-glowa {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-bottom: 1px solid var(--panel-border);
}
.cz-filtry { margin-left: auto; display: flex; gap: 4px; }
.cz-filtry button {
  border: 1px solid transparent; background: none; color: inherit;
  opacity: .55; cursor: pointer; font-size: 11px; padding: 2px 7px; border-radius: 6px;
}
.cz-filtry button.on { opacity: 1; border-color: var(--panel-border); }
.cz-x { border: none; background: none; color: inherit; opacity: .6; cursor: pointer; }
.cz-x:hover { opacity: 1; }

#cz-lista { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.cz-pusto { opacity: .5; text-align: center; margin-top: 30px; }

.cz-w { line-height: 1.35; }
.cz-kto { font-weight: 700; color: var(--accent); cursor: pointer; }
.cz-moje .cz-kto { color: var(--txt-dim); cursor: default; }
.cz-do { margin-left: 6px; font-size: 11px; opacity: .75; }
.cz-t { float: right; font-size: 10px; opacity: .45; }
.cz-tresc { white-space: pre-wrap; word-break: break-word; }
.cz-priv .cz-tresc { color: var(--accent); }
.cz-sos { border-left: 2px solid var(--pv-color-czat-sos); padding-left: 6px; }
.cz-addr { opacity: .6; font-size: 11px; }

.cz-stopka { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--panel-border); }
#cz-pole {
  flex: 1; border: 1px solid var(--panel-border);
  border-radius: 7px; background: var(--pv-color-overlay-blackA300); color: inherit;
  padding: 6px 8px; font: inherit;
}
#cz-pole:focus { outline: none; border-color: var(--accent); }
#cz-wyslij {
  border: 1px solid var(--panel-border); border-radius: 7px;
  background: none; color: inherit; cursor: pointer; padding: 0 12px;
}
#cz-wyslij:hover { border-color: var(--accent); }


@media (max-width: 640px) {
  #cz-panel { right: 6px; left: 6px; width: auto; bottom: 122px; height: 48vh; }
}


.cz-glowa { cursor: move; user-select: none; touch-action: none; }
#cz-uchwyt {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, var(--panel-border) 50%);
  border-bottom-right-radius: 10px;
}
#cz-chip-grupa {
  border: 1px solid var(--accent); border-radius: 7px;
  background: none; color: var(--accent); cursor: pointer;
  font-size: 11px; padding: 0 8px; white-space: nowrap;
}
.cz-grupa-pas { display: flex; gap: 6px; align-items: center; padding: 6px 0 8px; border-bottom: 1px solid var(--panel-border); margin-bottom: 6px;
  position: sticky; top: -8px; background: var(--pv-color-czat-groupBarBg); z-index: 1; }
.cz-grupa-pas input {
  flex: 1; border: 1px solid var(--panel-border); border-radius: 7px;
  background: var(--pv-color-overlay-blackA300); color: inherit; padding: 4px 8px; font: inherit; font-size: 12px;
}
.cz-gracz { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
.cz-kropka { width: 7px; height: 7px; border-radius: 50%; background: var(--pv-color-czat-dotOff); flex: none; }
.cz-kropka.on { background: var(--pv-color-czat-dotOn); box-shadow: 0 0 6px var(--pv-color-czat-dotOnGlow); }
.cz-gracz-info { font-size: 11px; opacity: .65; flex: 1; }
.cz-gracz-akcje { display: flex; gap: 4px; }
.cz-dolacz {
  border: 1px solid var(--accent); border-radius: 6px; background: none;
  color: var(--accent); cursor: pointer; font-size: 11px; padding: 0 6px; margin-left: 4px;
}
@media (max-width: 640px) {
  #cz-uchwyt { display: none; }
  .cz-glowa { cursor: default; }
}


@media (max-height: 620px) {
  #fab-czat {
    bottom: calc(10px + var(--pv-dock-h, 0px) + var(--safe-b, 0px));
    right: 76px; width: 44px; height: 44px; font-size: 18px;
  }
  #cz-panel {
    right: 8px; bottom: calc(60px + var(--pv-dock-h, 0px) + var(--safe-b, 0px));
    height: min(80vh, 430px);
  }
}
