/* Asystent Cechu: korzysta ze zmiennych Bricks (--brand, --neutral-*, --radius-*), z wartościami zapasowymi. */
.acx { --acx-brand: var(--brand, #c4401a); --acx-brand-dark: var(--brand-d-1, #a3330f); --acx-brand-soft: var(--brand-l-4, #fbf1ec); --acx-accent: var(--accent, #f2b124); --acx-ink: var(--neutral-900, #2a2626); --acx-ink-2: var(--neutral-700, #5c5556); --acx-ink-3: var(--neutral-500, #8a8386); --acx-bg: var(--neutral-50, #faf8f4); --acx-surface: var(--white, #fff); --acx-line: var(--line, rgba(42,38,38,.09)); --acx-radius: var(--radius-l, 16px); --acx-font: var(--font-body, "Figtree", system-ui, sans-serif); --acx-head: var(--font-display, "Sora", system-ui, sans-serif); --acx-ease: cubic-bezier(.32,.72,0,1);
  position: fixed; right: 20px; bottom: 20px; z-index: 9000; font-family: var(--acx-font); color: var(--acx-ink); font-size: 15px; line-height: 1.5; }
.acx * { box-sizing: border-box; }
.acx__launch { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border: 0; border-radius: 999px; background: var(--acx-brand); color: #fff; font: 600 15px/1 var(--acx-font); cursor: pointer; box-shadow: 0 10px 28px -10px rgba(123,46,20,.5); transition: transform .4s var(--acx-ease), box-shadow .4s var(--acx-ease); }
.acx__launch:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(123,46,20,.55); }
.acx__launch-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acx-accent); box-shadow: 0 0 0 0 rgba(242,177,36,.6); animation: acx-pulse 2.4s infinite; }
@keyframes acx-pulse { 0% { box-shadow: 0 0 0 0 rgba(242,177,36,.6); } 70% { box-shadow: 0 0 0 10px rgba(242,177,36,0); } 100% { box-shadow: 0 0 0 0 rgba(242,177,36,0); } }
.acx--open .acx__launch { display: none; }

.acx__panel { display: none; width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100vh - 40px)); background: var(--acx-surface); border: 1px solid var(--acx-line); border-radius: var(--acx-radius); box-shadow: 0 30px 70px -30px rgba(42,38,38,.45); overflow: hidden; flex-direction: column; transform-origin: bottom right; }
.acx--open .acx__panel { display: flex; animation: acx-in .45s var(--acx-ease); }
@keyframes acx-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.acx__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--acx-ink); color: #fff; }
.acx__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--acx-brand); display: grid; place-items: center; font: 700 14px var(--acx-head); color: #fff; flex: none; overflow: hidden; }
.acx__avatar img { width: 100%; height: 100%; object-fit: cover; }
.acx__title { font: 600 15px/1.2 var(--acx-head); }
.acx__status { font-size: 12px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.acx__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7bc96f; }
.acx__head-actions { margin-left: auto; display: flex; gap: 4px; }
.acx__icon-btn { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.acx__icon-btn:hover { background: rgba(255,255,255,.2); }

.acx__log { flex: 1; overflow-y: auto; padding: 16px 14px; background: var(--acx-bg); display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.acx__msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; animation: acx-msg .35s var(--acx-ease); }
@keyframes acx-msg { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.acx__msg--bot { align-self: flex-start; background: var(--acx-surface); border: 1px solid var(--acx-line); border-bottom-left-radius: 6px; }
.acx__msg--user { align-self: flex-end; background: var(--acx-brand); color: #fff; border-bottom-right-radius: 6px; }
.acx__msg b, .acx__msg strong { font-weight: 600; }
.acx__msg a { color: var(--acx-brand-dark); text-decoration: underline; text-underline-offset: 2px; }
.acx__msg--user a { color: #fff; }
.acx__typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.acx__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--acx-ink-3); animation: acx-dot 1.2s infinite; }
.acx__typing i:nth-child(2) { animation-delay: .15s; } .acx__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes acx-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.acx__caret { display: inline-block; width: 2px; height: 1em; background: var(--acx-brand); vertical-align: -2px; margin-left: 2px; animation: acx-caret .8s steps(1) infinite; }
@keyframes acx-caret { 50% { opacity: 0; } }

.acx__chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 100%; }
.acx__chip { border: 1px solid var(--acx-brand); background: var(--acx-surface); color: var(--acx-brand-dark); border-radius: 999px; padding: 8px 14px; font: 500 14px var(--acx-font); cursor: pointer; opacity: 0; transform: translateY(6px); animation: acx-chip .4s var(--acx-ease) forwards; transition: background .25s, color .25s; }
.acx__chip:hover { background: var(--acx-brand); color: #fff; }
.acx__chip--ghost { border-color: var(--acx-line); color: var(--acx-ink-2); }
.acx__chip--ghost:hover { background: var(--acx-brand-soft); color: var(--acx-ink); }
@keyframes acx-chip { to { opacity: 1; transform: none; } }

.acx__card { align-self: flex-start; max-width: 92%; background: var(--acx-surface); border: 1px solid var(--acx-line); border-radius: 16px; padding: 14px 16px; animation: acx-msg .35s var(--acx-ease); }
.acx__card h4 { margin: 0 0 8px; font: 600 14px var(--acx-head); color: var(--acx-ink); }
.acx__card p { margin: 0 0 4px; font-size: 14px; color: var(--acx-ink-2); }
.acx__card a { color: var(--acx-brand-dark); font-weight: 500; text-decoration: none; }
.acx__card a:hover { text-decoration: underline; }
.acx__card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.acx__card-actions a { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; background: var(--acx-brand); color: #fff; font-size: 13px; font-weight: 600; }
.acx__card-actions a:hover { background: var(--acx-brand-dark); text-decoration: none; }
.acx__card-actions a.acx__ghost { background: var(--acx-brand-soft); color: var(--acx-brand-dark); }

.acx__form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--acx-line); background: var(--acx-surface); }
.acx__input { flex: 1; min-width: 0; border: 1px solid var(--acx-line); border-radius: 999px; padding: 10px 14px; font: 15px var(--acx-font); color: var(--acx-ink); background: var(--acx-bg); outline: none; }
.acx__input:focus { border-color: var(--acx-brand); box-shadow: 0 0 0 3px var(--acx-brand-soft); }
.acx__send { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--acx-brand); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 18px; flex: none; }
.acx__send:hover { background: var(--acx-brand-dark); }
.acx__foot { padding: 0 14px 10px; font-size: 11px; color: var(--acx-ink-3); background: var(--acx-surface); text-align: center; }
.acx__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 478px) {
  .acx { right: 10px; bottom: 10px; left: 10px; }
  .acx__launch { margin-left: auto; display: flex; }
  .acx__panel { width: 100%; height: min(78vh, 640px); }
}
@media (prefers-reduced-motion: reduce) {
  .acx__launch-dot, .acx__typing i, .acx__caret { animation: none; }
  .acx__chip { opacity: 1; transform: none; animation: none; }
  .acx--open .acx__panel, .acx__msg, .acx__card { animation: none; }
}
