/* Print Studio bot v2 — stilovi
   --psbot-primary prilagodi boji brenda. */
#psbot {
  --psbot-primary: #1a1a1a;
  --psbot-bg: #ffffff;
  font-family: inherit;
}

/* Plutajući način */
#psbot.psbot-floating {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
}
#psbot.psbot-floating #psbot-panel {
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 100px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .3);
}

/* Inline (ugrađeni) način — puni širinu roditelja */
#psbot.psbot-embedded #psbot-panel {
  width: 100%;
  height: 520px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
  border: 1px solid #e3e3e3;
}

#psbot-toggle {
  background: var(--psbot-primary);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
#psbot-toggle:hover { opacity: .9; }

@keyframes psbot-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
  50%      { transform: scale(1.07); box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
}
#psbot-toggle.psbot-attn { animation: psbot-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  #psbot-toggle.psbot-attn { animation: none; }
}

#psbot-panel[hidden] { display: none !important; }

#psbot-panel {
  background: var(--psbot-bg);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#psbot-head {
  background: var(--psbot-primary);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
#psbot-title small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  opacity: .75;
  line-height: 1.2;
}
.psbot-sys {
  align-self: center;
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 2px 10px;
  max-width: 95%;
}
#psbot-headbtns { display: flex; align-items: center; gap: 2px; }
#psbot-reset {
  background: none;
  border: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  opacity: .85;
}
#psbot-reset:hover { opacity: 1; }
#psbot-close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

#psbot-msgs {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f6f6f6;
}

.psbot-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.psbot-user {
  align-self: flex-end;
  background: var(--psbot-primary);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.psbot-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-bottom-left-radius: 3px;
}
.psbot-assistant a { color: var(--psbot-primary); text-decoration: underline; }
.psbot-typing { color: #999; }

#psbot-form {
  display: flex;
  border-top: 1px solid #e3e3e3;
}
#psbot-input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 12px;
  font-size: 16px; /* ispod 16px iOS auto-zumira pri fokusu */
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  background: #fff;
  color: #1a1a1a;
  resize: none;
  max-height: 110px;
  overflow-y: auto;
}
#psbot-form { align-items: flex-end; }
#psbot-input::placeholder {
  font-size: 13px;
  opacity: .65;
}
#psbot-send {
  flex-shrink: 0;
  border: 0;
  background: none;
  padding: 0 14px;
  font-size: 17px;
  cursor: pointer;
  color: var(--psbot-primary);
}
#psbot-send:disabled { opacity: .4; cursor: default; }

#psbot-note {
  font-size: 11px;
  color: #999;
  text-align: center;
  padding: 5px 8px 8px;
  background: #fff;
}

/* Mobitel */
@media (max-width: 480px) {
  #psbot-close, #psbot-reset {
    font-size: 24px;
    padding: 6px 12px;
  }
  #psbot.psbot-floating { right: 12px; bottom: 12px; }
  #psbot.psbot-floating #psbot-panel {
    position: fixed;
    inset: auto 8px 8px 8px;
    width: auto;
    height: 70vh;
  }
  #psbot.psbot-embedded #psbot-panel { height: 65vh; }
}
