/* Pomocnik (czat) — okno w lewym dolnym rogu; kolory z tokenów motywu, z zapasowymi */
.wmc { --wmc-ink: var(--text, #14214f); --wmc-muted: var(--muted, #5c6185); --wmc-card: var(--card, #fff); --wmc-paper: var(--paper, #f5f4fa); --wmc-line: var(--line, #e3e1ef);
  position: fixed; left: 20px; bottom: 20px; z-index: 260; font-family: var(--font-ui, system-ui, sans-serif); color: var(--wmc-ink); }
.wmc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wmc-btn {
  position: relative; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px 0 16px;
  border: 0; border-radius: 999px; cursor: pointer; color: #0c1333; font: 800 15px var(--font-ui, system-ui, sans-serif);
  background: linear-gradient(100deg, #ff7a93, #ffa07a); box-shadow: 0 14px 30px -12px rgba(242,72,104,.75), 0 2px 6px rgba(12,19,51,.15);
  transition: transform .2s cubic-bezier(.3,1.4,.5,1);
}
.wmc-btn:hover { transform: translateY(-2px) scale(1.03); }
.wmc-btn__dot { position: absolute; top: 6px; right: 8px; width: 12px; height: 12px; border-radius: 50%; background: #14214f; box-shadow: 0 0 0 2px #fff; }
.wmc.is-open .wmc-btn { display: none; }

.wmc-teaser {
  position: absolute; left: 0; bottom: 70px; width: 270px; padding: 14px 34px 14px 16px; border-radius: 18px 18px 18px 4px;
  background: var(--wmc-card); box-shadow: 0 18px 40px -16px rgba(12,19,51,.45); font-size: 14px; line-height: 1.45; cursor: pointer;
  animation: wmc-in .35s cubic-bezier(.3,1.4,.5,1);
}
.wmc-teaser p { margin: 0; }
.wmc-teaser__x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--wmc-paper); color: var(--wmc-muted); font-size: 16px; line-height: 1; cursor: pointer; }

.wmc-panel {
  position: absolute; left: 0; bottom: 0; width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px));
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--wmc-paper); box-shadow: 0 30px 70px -20px rgba(12,19,51,.55), 0 0 0 1px rgba(20,33,79,.06);
  animation: wmc-in .3s cubic-bezier(.3,1.2,.5,1);
}
.wmc-panel[hidden] { display: none; }
@keyframes wmc-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
/* nagłówek w gradiencie marki (jasny — granat zostaje tylko w pasie e-kartek i stopce) */
.wmc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(100deg, #ff7a93, #ffa07a); color: #0c1333; }
.wmc-head img { width: 40px; height: 40px; padding: 4px; border-radius: 12px; background: #fff; object-fit: contain; box-shadow: 0 6px 14px -8px rgba(12,19,51,.5); }
.wmc-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.wmc-head strong { font-size: 16px; font-weight: 800; }
.wmc-head span { font-size: 12px; font-weight: 600; color: rgba(12,19,51,.72); }
.wmc-head span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #128a46; box-shadow: 0 0 0 2px rgba(255,255,255,.7); vertical-align: 1px; }
.wmc-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(12,19,51,.1); color: #0c1333; font-size: 22px; line-height: 1; cursor: pointer; }
.wmc-x:hover { background: rgba(12,19,51,.18); }
.wmc-x:focus-visible, .wmc-btn:focus-visible, .wmc-chips button:focus-visible, .wmc-form button:focus-visible { outline: 2.5px solid #14214f; outline-offset: 2px; }

.wmc-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.wmc-msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; animation: wmc-in .25s ease; }
.wmc-msg p { margin: 0; white-space: pre-line; }
.wmc-msg--bot { align-self: flex-start; background: var(--wmc-card); border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(20,33,79,.06); }
.wmc-msg--me { align-self: flex-end; background: #14214f; color: #fff; border-bottom-right-radius: 6px; }
.wmc-probka { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--wmc-paper); border-left: 3px solid #f24868; font-family: var(--font-text, Georgia, serif); font-size: 14.5px; }
.wmc-probka__bar { display: flex; gap: 8px; margin-top: 8px; font-family: var(--font-ui, system-ui, sans-serif); }
.wmc-probka__bar button, .wmc-probka__bar a { padding: 5px 12px; border: 0; border-radius: 999px; background: #14214f; color: #fff; font-size: 12.5px; font-weight: 700; text-decoration: none; cursor: pointer; }
.wmc-probka__bar a { background: #fff; color: #14214f; box-shadow: inset 0 0 0 1.5px #cfcce3; }
.wmc-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.wmc-links a { padding: 8px 12px; border-radius: 12px; background: #ffeef1; color: #c8264b; font-weight: 700; font-size: 14px; text-decoration: none; }
.wmc-links a:hover { background: #ffdce3; text-decoration: none; }
.wmc-typing { display: flex; gap: 4px; padding: 14px; }
.wmc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--wmc-muted); animation: wmc-dot 1s infinite; }
.wmc-typing span:nth-child(2) { animation-delay: .15s; } .wmc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes wmc-dot { 50% { opacity: .25; transform: translateY(-3px); } }

.wmc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 8px; }
.wmc-chips:empty { display: none; }
.wmc-chips button {
  padding: 7px 12px; border: 1.5px solid #f2b3c0; border-radius: 999px; background: var(--wmc-card); color: #c8264b;
  font: 700 13px var(--font-ui, system-ui, sans-serif); cursor: pointer; transition: background-color .15s, color .15s;
}
.wmc-chips button:hover { background: #f24868; border-color: #f24868; color: #fff; }
.wmc-form { display: flex; gap: 8px; padding: 10px 12px; background: var(--wmc-card); border-top: 1px solid var(--wmc-line); }
.wmc-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid var(--wmc-line); border-radius: 999px; background: var(--wmc-paper); color: var(--wmc-ink); font: 15px var(--font-ui, system-ui, sans-serif); }
.wmc-form input:focus { outline: none; border-color: #f24868; box-shadow: 0 0 0 3px rgba(242,72,104,.15); }
.wmc-form button { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: linear-gradient(100deg, #ff7a93, #ffa07a); color: #0c1333; cursor: pointer; }
.wmc-note { margin: 0; padding: 0 14px 10px; background: var(--wmc-card); font-size: 11px; color: var(--wmc-muted); }

html.dark-mode .wmc-msg--me { background: #ff6b88; color: #0c1333; }
html.dark-mode .wmc-links a { background: rgba(255,107,136,.14); color: #ff8fa6; }
html.dark-mode .wmc-chips button { color: #ff8fa6; border-color: rgba(255,143,166,.45); }
html.dark-mode .wmc-chips button:hover { color: #0c1333; background: #ff8fa6; border-color: #ff8fa6; }

@media (max-width: 860px) {
  .wmc { left: 12px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .wmc-btn { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .wmc-btn__t { display: none; }
  .wmc-teaser { bottom: 62px; width: min(270px, calc(100vw - 40px)); }
  .wmc.is-open { inset: 0; left: 0; bottom: 0; z-index: 400; }
  .wmc-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .wmc-head { padding-top: max(14px, env(safe-area-inset-top, 0px)); }
}
/* nie zasłaniaj arkusza kategorii ani okien z losowym życzeniem / mailem */
body:has(.bottom-sheet.open) .wmc:not(.is-open),
body:has(.modal-overlay:not([hidden])) .wmc:not(.is-open) { visibility: hidden; }
@media print { .wmc { display: none; } }
@media (prefers-reduced-motion: reduce) { .wmc *, .wmc-panel, .wmc-teaser { animation: none !important; transition: none !important; } }
