/* Widget czatu — na zmiennych design systemu strony (assets/style.css), więc dziedziczy motyw
   jasny/ciemny zamiast być zawsze czarną wyspą (audyt 2026-07-09, UI-08). Fallbacki po przecinku
   w var() zachowują wygląd przy osadzeniu poza stroną główną. */
#ogniwo-chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  transition: bottom 0.2s ease;
}
/* Gdy banner cookies jest otwarty na małym ekranie, dymek ucieka wyżej zamiast nachodzić na
   przyciski zgody (audyt 2026-07-09, UX-14). Klasę ustawia cookie-consent.js. */
@media (max-width: 640px) {
  html.ogniwo-consent-open #ogniwo-chat-widget {
    bottom: 190px;
  }
}

#ogniwo-chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, #ff9d4d, #ff6a1a);
  box-shadow: 0 6px 20px rgba(255, 106, 26, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
#ogniwo-chat-toggle:focus-visible {
  outline: 2px solid var(--ink, #f5f1ea);
  outline-offset: 2px;
}

#ogniwo-chat-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: 330px;
  max-width: calc(100vw - 40px);
  height: 460px;
  max-height: 70vh;
  background: var(--bg, #0a0a0b);
  border: 1px solid var(--bd, #2a2620);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
#ogniwo-chat-panel.ogniwo-chat-panel--hidden {
  display: none;
}

.ogniwo-chat-header {
  padding: 14px 16px;
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink, #f5f1ea);
  border-bottom: 1px solid var(--bd, #2a2620);
  background: var(--surf, #161519);
}

.ogniwo-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ogniwo-chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.ogniwo-chat-bubble--user {
  align-self: flex-end;
  background: #ff6a1a;
  color: #1a0d00;
}
.ogniwo-chat-bubble--assistant {
  align-self: flex-start;
  background: var(--surf, #161519);
  color: var(--ink, #f5f1ea);
  border: 1px solid var(--bd, #2a2620);
}
.ogniwo-chat-bubble--error {
  align-self: center;
  background: transparent;
  color: #e0674a;
  font-size: 13px;
}

.ogniwo-chat-cta {
  padding: 8px 12px 0;
  border-top: 1px solid var(--bd, #2a2620);
  background: var(--bg, #0a0a0b);
}
.ogniwo-chat-cta-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, #ff9d4d, #ff6a1a);
  color: #1a0d00;
  font-weight: 700;
  font-family: inherit;
  font-size: 13.5px;
}
.ogniwo-chat-cta-btn:hover {
  box-shadow: 0 6px 18px rgba(255, 106, 26, 0.35);
}

.ogniwo-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--bg, #0a0a0b);
}
.ogniwo-chat-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--bd2, #39332b);
  background: var(--surf, #161519);
  color: var(--ink, #f5f1ea);
  font-family: inherit;
  font-size: 14px;
}
.ogniwo-chat-form input:focus-visible {
  outline: 2px solid var(--ember, #ff6a1a);
  outline-offset: 1px;
}
.ogniwo-chat-form button {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: var(--teal, #25e0bf);
  color: #06231d;
  font-weight: 700;
  font-family: inherit;
}
.ogniwo-chat-form input:disabled,
.ogniwo-chat-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* disclosure pod CTA czatu (TR-v2-01) */
.ogniwo-chat-disclosure{margin-top:6px;font-size:11px;color:var(--mut,#9c968c);text-align:center}
.ogniwo-chat-disclosure a{color:inherit;text-decoration:underline}
