/* Okno czatu AI – kolory ze zmiennych motywu */
#chat-toggle { position: fixed; right: 22px; bottom: 22px; z-index: 95; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 22px; border: 0; border-radius: 26px; background: var(--c-primary, #1d4ed8); color: #fff; font: 600 15px var(--f-body, sans-serif); cursor: pointer; box-shadow: 0 8px 24px rgba(15,23,42,.3); transition: transform .2s; }
#chat-toggle:hover { transform: scale(1.05); }
#chat-window { position: fixed; right: 22px; bottom: 90px; z-index: 96; width: 350px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 130px); display: none; flex-direction: column; overflow: hidden; background: #fff; border-radius: 18px; box-shadow: 0 16px 44px rgba(15,23,42,.3); font-family: var(--f-body, sans-serif); }
#chat-window.open { display: flex; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--c-dark, #0f172a); color: #fff; }
.chat-head strong { display: block; font-family: var(--f-heading, sans-serif); }
.chat-head span { font-size: .75rem; opacity: .75; }
.chat-close { background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; line-height: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; background: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: .9rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg.bot { align-self: flex-start; background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; color: #1e293b; }
.chat-msg.user { align-self: flex-end; background: var(--c-primary, #1d4ed8); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.typing { color: #94a3b8; font-style: italic; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chat-actions a { background: #fff; border: 1px solid var(--c-primary, #1d4ed8); color: var(--c-primary, #1d4ed8); border-radius: 14px; padding: 5px 11px; font-size: .78rem; font-weight: 600; text-decoration: none; }
.chat-actions a:hover { background: var(--c-primary, #1d4ed8); color: #fff; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e2e8f0; }
.chat-form input { flex: 1; border: 1px solid #cbd5e1; border-radius: 20px; padding: 8px 14px; font: inherit; font-size: .9rem; }
.chat-form input:focus { outline: none; border-color: var(--c-primary, #1d4ed8); }
.chat-form button { border: 0; border-radius: 20px; padding: 0 18px; background: var(--c-primary, #1d4ed8); color: #fff; font-weight: 600; cursor: pointer; }
.chat-form button:disabled { opacity: .6; }
.chat-note { margin: 0; padding: 0 12px 10px; color: #64748b; font-size: .72rem; line-height: 1.35; text-align: center; }
@media (max-width: 480px) {
  #chat-window { left: 12px; right: 12px; width: auto; bottom: 84px; }
  #chat-toggle { right: 14px; bottom: 14px; }
}
