/* Bakrayot ChatBot 2.0 – chat.css */
:root { --bkc: #1a3c6e; }

#bkc-root * { box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }

/* Launcher */
#bkc-btn {
  position: fixed; bottom: 22px; right: 22px; z-index: 99999;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--bkc); border: 3px solid #e8a020;
  box-shadow: 0 4px 18px rgba(0,0,0,.3);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
#bkc-btn:hover { transform: scale(1.1); }
#bkc-btn svg   { width: 26px; height: 26px; fill: #fff; }

/* Window */
#bkc-win {
  position: fixed; bottom: 92px; right: 22px; z-index: 99999;
  width: 360px; max-width: calc(100vw - 30px);
  height: 520px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  display: flex; flex-direction: column;
  overflow: hidden; direction: rtl;
  transform: scale(.9) translateY(20px);
  opacity: 0; pointer-events: none;
  transition: all .22s cubic-bezier(.34,1.4,.64,1);
}
#bkc-win.bkc-open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }

/* Header */
#bkc-header {
  background: var(--bkc);
  color: #fff; padding: 13px 14px;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
#bkc-header .bkc-name   { font-weight: 700; font-size: 15px; flex: 1; }
#bkc-header .bkc-status { font-size: 11px; opacity: .8; }
.bkc-hbtn {
  background: rgba(255,255,255,.18); border: none; border-radius: 7px;
  color: #fff; width: 30px; height: 30px; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.bkc-hbtn:hover { background: rgba(255,255,255,.3); }
.bkc-dot { width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; flex-shrink: 0; }

/* Messages */
#bkc-msgs {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 9px;
}
#bkc-msgs::-webkit-scrollbar { width: 3px; }
#bkc-msgs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.bkc-msg { display: flex; align-items: flex-end; gap: 7px; max-width: 88%; animation: bkcIn .2s ease; }
.bkc-bot  { align-self: flex-start; }
.bkc-user { align-self: flex-end; flex-direction: row-reverse; }

.bkc-bubble {
  padding: 9px 13px; border-radius: 16px;
  font-size: 14px; line-height: 1.55; word-break: break-word;
}
.bkc-bot  .bkc-bubble { background: #f2f4f8; color: #1e2028; border-bottom-right-radius: 4px; }
.bkc-user .bkc-bubble { background: var(--bkc); color: #fff; border-bottom-left-radius: 4px; }

/* Typing dots */
.bkc-typing .bkc-bubble { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.bkc-d { width: 7px; height: 7px; border-radius: 50%; background: #aaa; animation: bkcDot 1.2s infinite; }
.bkc-d:nth-child(2) { animation-delay: .2s; }
.bkc-d:nth-child(3) { animation-delay: .4s; }



/* Lead form */
#bkc-lead {
  background: #fffbf0; border-top: 2px solid #e8a020;
  padding: 12px; flex-shrink: 0; display: none;
}
#bkc-lead h4 { margin: 0 0 8px; font-size: 14px; color: var(--bkc); }
#bkc-lead input {
  width: 100%; padding: 7px 11px; margin-bottom: 7px;
  border: 1.5px solid #dde; border-radius: 9px;
  font-size: 14px; direction: rtl;
}
#bkc-lead input:focus { outline: none; border-color: var(--bkc); }
#bkc-lead-btn {
  width: 100%; padding: 8px;
  background: #e8a020; color: #fff; border: none;
  border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer;
}
#bkc-lead-btn:hover { background: #c8860e; }

/* Input bar */
#bkc-bar {
  display: flex; gap: 7px; padding: 9px 11px;
  border-top: 1px solid #eee; flex-shrink: 0; background: #fff;
}
#bkc-inp {
  flex: 1; border: 1.5px solid #dde; border-radius: 20px;
  padding: 8px 13px; font-size: 14px; direction: rtl;
  resize: none; outline: none; background: #f8f9fc; max-height: 80px;
}
#bkc-inp:focus { border-color: var(--bkc); }
#bkc-send {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--bkc); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
#bkc-send:hover { transform: scale(1.08); }
#bkc-send:disabled { opacity: .5; cursor: default; transform: none; }
#bkc-send svg { width: 17px; height: 17px; fill: #fff; }

#bkc-footer { text-align: center; font-size: 10px; color: #aaa; padding: 4px 0 6px; flex-shrink: 0; }

@keyframes bkcIn  { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
@keyframes bkcDot { 0%,80%,100%{transform:translateY(0);opacity:.4} 40%{transform:translateY(-5px);opacity:1} }

@media (max-width: 400px) {
  #bkc-win { width: calc(100vw - 20px); right: 10px; }
}
