.kalabetai-widget{position:fixed;left:20px;bottom:90px;width:380px;max-width:90vw;background:#fff;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,0.25);font-family:"Vazirmatn",Tahoma,sans-serif;z-index:999999;display:none;flex-direction:column}
.kalabetai-widget.open{display:flex}
.kalabetai-header{background:#000;color:#FFD400;padding:10px;border-top-left-radius:12px;border-top-right-radius:12px;display:flex;align-items:center;justify-content:space-between}
.kalabetai-header-left{display:flex;align-items:center;gap:8px}
.kalabetai-logo{width:24px;height:24px;border-radius:50%;background:#fff}
.kalabetai-title{font-weight:700}
.kalabetai-close{background:transparent;border:none;color:#FFD400;font-size:22px;cursor:pointer}
.kalabetai-body{padding:10px;display:flex;flex-direction:column;flex:1}
.kalabetai-assist{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.kalabetai-subtitle{font-size:12px;color:#666;margin-top:4px}
#kalabetai-messages{flex:1;overflow-y:auto;margin-bottom:10px;display:flex;flex-direction:column;gap:8px}
.bubble{padding:8px 12px;border-radius:16px;max-width:80%;word-wrap:break-word}
.bubble.user{background:#000;color:#fff;align-self:flex-end}
.bubble.bot{background:#FFD400;color:#000;align-self:flex-start}
.bubble.error{background:#b00020;color:#fff}
#kalabetai-form{display:flex;gap:6px}
#kalabetai-question{flex:1;padding:10px;border:1px solid #ccc;border-radius:8px}
#kalabetai-send{background:#FFD400;color:#000;border:none;border-radius:8px;padding:10px 16px;font-weight:bold;cursor:pointer}
#kalabetai-launcher{position:fixed;left:20px;bottom:20px;width:56px;height:56px;border-radius:50%;background:#FFD400;border:2px solid #000;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:999999}
#kalabetai-launcher img{width:30px;height:30px;border-radius:50%}
[dir="rtl"] .kalabetai-header,[dir="rtl"] #kalabetai-form{direction:rtl}

/* Hotfix 3.1.1: scrollable messages and responsive */
#kalabetai-messages{max-height:300px;overflow-y:auto;}
@media(max-width:480px){
  .kalabetai-widget{width:100%;left:0;right:0;bottom:0;max-width:100%;height:100%;border-radius:0;}
  #kalabetai-messages{max-height:calc(100vh - 160px);}
  #kalabetai-question{font-size:14px;}
  #kalabetai-send{padding:8px 12px;font-size:14px;}
}

/* Hotfix 3.1.2: mobile bottom offset */
@media(max-width:480px){
  #kalabetai-launcher{bottom:150px !important;}
  .kalabetai-widget{bottom:150px !important;}
}
