#formicobot-widget { position: fixed; bottom: 20px; right: 20px; z-index: 999999; font-family: peyda, sans-serif; direction: rtl; }
#formicobot-toggle {
  width: 58px; height: 58px; border-radius: 50%; background: #DDB456; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(1,30,55,0.35);
  transition: transform .2s ease;
}
#formicobot-toggle:hover { transform: scale(1.06); }

#formicobot-panel {
  position: fixed; bottom: 88px; right: 20px; width: 340px; max-width: calc(100vw - 32px);
  height: 460px; max-height: calc(100vh - 110px);
  background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; overflow: hidden;
}
#formicobot-header {
  background: #011E37; color: #fff; padding: 14px 16px; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
#formicobot-close-btn { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; line-height: 1; }

#formicobot-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #F9F9FA; }
.formicobot-msg { max-width: 82%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.formicobot-msg-bot { align-self: flex-start; background: #EEF0FF; color: #111; border-bottom-right-radius: 4px; }
.formicobot-msg-user { align-self: flex-end; background: #2E2EDC; color: #fff; border-bottom-left-radius: 4px; }

#formicobot-typing { padding: 4px 16px; font-size: 12px; color: #6b6c70; background: #F9F9FA; }

#formicobot-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #EFEFEF; background: #fff; }
#formicobot-input { flex: 1; border: 1px solid #DADCE0; border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 13px; }
#formicobot-send { background: #2E2EDC; border: none; border-radius: 10px; width: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

@media (max-width: 768px) {
  #formicobot-panel {
    right: 14px;
    width: calc(100vw - 28px);
    height: min(480px, calc(100vh - 100px));
    max-height: calc(100vh - 100px);
    bottom: 80px;
  }
}

@media (max-width: 480px) {
  #formicobot-widget { bottom: 14px; right: 14px; }
  #formicobot-panel {
    right: 10px;
    width: calc(100vw - 20px);
    height: min(440px, calc(100vh - 90px));
    max-height: calc(100vh - 90px);
    bottom: 66px;
  }
  #formicobot-header { padding: 12px 14px; font-size: 13px; }
  #formicobot-messages { padding: 10px; }
}