/* Czat: domyślnie zwinięty (przycisk 💬), otwiera się jako panel u góry, nie zasłania sterowania */
#chat-panel{ position:fixed; z-index:36; display:none; flex-direction:column; left:calc(8px + var(--sa-l,0px)); right:calc(8px + var(--sa-r,0px)); top:calc(58px + var(--sa-t,0px)); max-width:480px; background:rgba(12,15,22,.94); border:1px solid #ffffff22; border-radius:14px; overflow:hidden; box-shadow:0 8px 30px #000a; }
#chat-panel.open{ display:flex; }
#chat-head{ display:flex; justify-content:space-between; align-items:center; padding:6px 10px; font-size:12px; font-weight:700; color:#9fd4ff; background:#ffffff0c; }
#chat-head button{ border:none; background:none; color:#fff; font-size:16px; padding:0 4px; cursor:pointer; }
#chat-log{ height:34vh; max-height:240px; min-height:90px; overflow-y:auto; padding:6px 10px; font-size:12px; color:#fff; pointer-events:auto; }
#chat-log div{ margin:2px 0; word-wrap:break-word; }
#chat-log .sys{ color:#8fd0ff; font-style:italic; } #chat-log .whisper{ color:#e39bff; }
.chat-time{ color:#ffffff77; margin-right:4px; font-size:10px; }
#chat-input-row{ display:flex; }
#chat-input{ flex:1; border:none; padding:10px; font-size:16px; background:#ffffffee; color:#111; min-width:0; }
#chat-send{ border:none; padding:0 16px; background:var(--ui-accent); color:#fff; font-weight:700; cursor:pointer; }
@media (hover:hover) and (pointer:fine) and (min-width:900px){
  #chat-panel{ top:auto; bottom:12px; left:12px; right:auto; width:340px; }
  #chat-log{ height:130px; }
}
@media (max-height:480px){ #chat-panel{ right:auto; width:52vw; } #chat-log{ height:34vh; min-height:60px; } }

/* Podpowiedzi komend nad polem wpisywania */
#chat-suggest{ display:none; background:rgba(14,18,28,.96); border-top:1px solid #ffffff22; max-height:150px; overflow-y:auto; font-size:12px; color:#fff; }
#chat-suggest.on{ display:block; }
#chat-suggest div{ padding:5px 10px; cursor:pointer; display:flex; gap:8px; justify-content:space-between; }
#chat-suggest div b{ color:#9fd0ff; font-family:monospace; }
#chat-suggest div span{ color:#ffffff88; text-align:right; }
#chat-suggest div.sel{ background:#4fa8ff33; }
#chat-suggest .hint{ cursor:default; color:#ffd479; justify-content:flex-start; }

/* v12.3 */
#chat-repeat{ border:none; padding:0 12px; background:#ffffff1f; color:#fff; font-size:16px; cursor:pointer; }
#chat-repeat:disabled{ opacity:.35; cursor:default; }
.chat-title{ color:#ffd65a; font-weight:600; font-size:.85em; }
