.pws-chat-root { position: fixed; z-index: 900; }
.pws-chat-desno { right: 16px; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
.pws-chat-levo { left: var(--pws-chat-razmak, 24px); bottom: calc(var(--pws-chat-razmak, 24px) + env(safe-area-inset-bottom, 0px)); }
.pws-chat-dugme {
  display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 14px;
  background: var(--pws-chat-boja, #206bc4); color: var(--pws-chat-tekst, #fff);
  box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer; font: inherit;
}
.pws-chat-dugme img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.pws-chat-panel {
  position: fixed; z-index: 901; width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100dvh - 184px));
  max-height: calc(100dvh - 184px);
  display: flex; flex-direction: column; background: #fff; color: #1f2933;
  border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.2); overflow: hidden;
}
.pws-chat-panel[hidden] { display: none !important; }
.pws-chat-desno .pws-chat-panel { right: 16px; bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
.pws-chat-levo .pws-chat-panel { left: var(--pws-chat-razmak, 24px); bottom: calc(76px + var(--pws-chat-razmak, 24px) + env(safe-area-inset-bottom, 0px)); }
.pws-chat-head { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--pws-chat-boja, #206bc4); color: var(--pws-chat-tekst, #fff); }
.pws-chat-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.pws-chat-ime { min-width: 0; }
.pws-chat-head strong { display: block; }
.pws-chat-head small { opacity: .9; }
.pws-chat-jos-omot { position: relative; margin-left: auto; }
.pws-chat-jos, #pws-chat-zatvori { background: transparent; color: inherit; border: 0; font-size: 28px; line-height: 1; width: 44px; height: 44px; cursor: pointer; flex: none; }
.pws-chat-meni { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; min-width: 220px; max-height: 280px; overflow: auto; background: #fff; color: #1f2933; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; }
.pws-chat-meni[hidden] { display: none !important; }
.pws-chat-meni button { display: block; width: 100%; text-align: left; background: transparent; color: #1f2933; border: 0; border-radius: 8px; padding: 10px 12px; cursor: pointer; font: inherit; }
.pws-chat-meni button:hover { background: #f4f6f8; }
.pws-chat-obavestenja { align-self: flex-end; margin: 8px 12px 0; border: 1px solid #d0d5dd; background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; }
.pws-chat-log { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pws-chat-msg { max-width: 90%; padding: 8px 10px; border-radius: 12px; white-space: pre-wrap; }
.pws-chat-msg.kupac { margin-left: auto; background: #e8f1fb; }
.pws-chat-msg.asistent { background: #f4f6f8; }
.pws-chat-kartica { display: grid; grid-template-columns: 56px 1fr; gap: 8px; border: 1px solid #e6e8eb; border-radius: 10px; padding: 8px; text-decoration: none; color: inherit; }
.pws-chat-kartica img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.pws-chat-brze, .pws-chat-form { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; }
.pws-chat-brze button, .pws-chat-akcije button { border: 1px solid #d0d5dd; background: #fff; border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.pws-chat-form input { flex: 1; min-width: 0; border: 1px solid #d0d5dd; border-radius: 10px; padding: 8px; }
.pws-chat-form button { background: var(--pws-chat-boja, #206bc4); color: var(--pws-chat-tekst, #fff); border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.pws-chat-akcije { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 8px 8px; }
.pws-chat-status { font-size: 13px; color: #52606d; padding: 0 12px; }
@media (max-width: 768px) {
  body:has(.product-sticky-cart.is-visible) .pws-chat-desno { bottom: calc(204px + env(safe-area-inset-bottom, 0px)); }
  body:has(.product-sticky-cart.is-visible) .pws-chat-desno .pws-chat-panel { bottom: calc(268px + env(safe-area-inset-bottom, 0px)); }
  .pws-chat-panel { width: calc(100vw - 16px); height: min(560px, calc(100dvh - 184px)); max-height: calc(100dvh - 184px); }
  body:has(.product-sticky-cart.is-visible) .pws-chat-panel { height: min(560px, calc(100dvh - 284px)); max-height: calc(100dvh - 284px); }
}
