/* ============================================================
   KZ SMART BOT - CSS
   ============================================================ */

/* כפתור צף */
.kz-bot-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C9A14A, #8B6914);
  color: white;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(201, 161, 74, 0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

.kz-bot-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(201, 161, 74, 0.7);
}

.kz-bot-fab--hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.kz-bot-fab--wave {
  animation: kzBotWave 0.6s ease 3;
}

@keyframes kzBotWave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.kz-bot-fab-icon {
  font-size: 28px;
  z-index: 2;
}

.kz-bot-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #C9A14A;
  opacity: 0.6;
  animation: kzBotPulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes kzBotPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

.kz-bot-fab-label {
  position: absolute;
  right: calc(100% + 14px);
  background: white;
  color: #0B1F3A;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s;
  pointer-events: none;
}

.kz-bot-fab:hover .kz-bot-fab-label {
  opacity: 1;
  transform: translateX(0);
}

/* חלון הבוט */
.kz-bot-window {
  position: fixed;
  bottom: 100px;
  left: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 140px);
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Heebo', sans-serif;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kz-bot-window--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* כותרת */
.kz-bot-header {
  background: linear-gradient(135deg, #0B1F3A, #1a3a5c);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kz-bot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kz-bot-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #C9A14A, #8B6914);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(201, 161, 74, 0.5);
}

.kz-bot-name {
  font-weight: 900;
  font-size: 15px;
}

.kz-bot-status {
  font-size: 11px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.kz-bot-dot {
  width: 8px;
  height: 8px;
  background: #27ae60;
  border-radius: 50%;
  animation: kzBotDotPulse 1.5s infinite;
}

@keyframes kzBotDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.kz-bot-close {
  background: rgba(255,255,255,0.1);
  border: 0;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.kz-bot-close:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}

/* הודעות */
.kz-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kz-bot-messages::-webkit-scrollbar {
  width: 6px;
}

.kz-bot-messages::-webkit-scrollbar-thumb {
  background: rgba(201, 161, 74, 0.5);
  border-radius: 3px;
}

.kz-bot-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  animation: kzBotMsgIn 0.3s ease;
}

@keyframes kzBotMsgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.kz-bot-msg--bot {
  background: white;
  color: #1a1a1a;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-right: 3px solid #C9A14A;
}

.kz-bot-msg--bot a {
  display: inline-block;
  margin: 2px 0;
  padding: 2px 4px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
}

.kz-bot-msg--bot a:hover {
  background: rgba(201, 161, 74, 0.15);
}

.kz-bot-msg--user {
  background: linear-gradient(135deg, #C9A14A, #8B6914);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 700;
}

/* כפתורים מהירים */
.kz-bot-quick {
  padding: 12px;
  background: white;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.kz-bot-quick-btn {
  background: #FAF7F2;
  border: 1px solid #e8d5a0;
  color: #0B1F3A;
  padding: 10px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
  animation: kzBtnIn 0.4s ease both;
}

.kz-bot-quick-btn:nth-child(1) { animation-delay: 0s; }
.kz-bot-quick-btn:nth-child(2) { animation-delay: 0.1s; }
.kz-bot-quick-btn:nth-child(3) { animation-delay: 0.2s; }
.kz-bot-quick-btn:nth-child(4) { animation-delay: 0.3s; }
.kz-bot-quick-btn:nth-child(5) { animation-delay: 0.4s; }

@keyframes kzBtnIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.kz-bot-quick-btn:hover {
  background: linear-gradient(135deg, #C9A14A, #8B6914);
  color: white;
  border-color: #8B6914;
  transform: translateY(-2px);
}

/* קלט */
.kz-bot-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid #f0f0f0;
}

.kz-bot-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #f0f0f0;
  border-radius: 24px;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
}

.kz-bot-input:focus {
  outline: none;
  border-color: #C9A14A;
}

.kz-bot-send {
  background: linear-gradient(135deg, #C9A14A, #8B6914);
  color: white;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  transition: all 0.2s;
}

.kz-bot-send:hover {
  transform: scale(1.1) rotate(-10deg);
}

/* רספונסיביות */
@media (max-width: 600px) {
  .kz-bot-fab {
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
  }
  
  .kz-bot-fab-icon {
    font-size: 24px;
  }
  
  .kz-bot-fab-label {
    display: none;
  }
  
  .kz-bot-window {
    bottom: 85px;
    left: 10px;
    right: 10px;
    width: auto;
    height: calc(100vh - 110px);
    max-height: 600px;
  }
}
