/* دستیار هوشمند ازکیار - استایل‌ها */

/* دکمه شناور */
.azkiyar-chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  border: none;
  padding: 0;
}

.azkiyar-chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
}

.azkiyar-chat-button:active {
  transform: scale(0.95);
}

.azkiyar-chat-button img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

/* نوتیفیکیشن badge */
.azkiyar-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* پنجره چت */
.azkiyar-chat-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 380px;
  height: 600px;
  max-height: calc(100vh - 120px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.azkiyar-chat-window.open {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* هدر چت */
.azkiyar-chat-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.azkiyar-chat-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.azkiyar-chat-header-info {
  flex: 1;
}

.azkiyar-chat-header-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 2px 0;
}

.azkiyar-chat-header-status {
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.azkiyar-status-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.azkiyar-chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.azkiyar-chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* بدنه چت */
.azkiyar-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  scroll-behavior: smooth;
}

.azkiyar-chat-body::-webkit-scrollbar {
  width: 6px;
}

.azkiyar-chat-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* پیام‌ها */
.azkiyar-message {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.azkiyar-message.bot {
  flex-direction: row;
}

.azkiyar-message.user {
  flex-direction: row-reverse;
}

.azkiyar-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.azkiyar-message-content {
  max-width: 75%;
}

.azkiyar-message-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.azkiyar-message.bot .azkiyar-message-bubble {
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.azkiyar-message.user .azkiyar-message-bubble {
  background: #007bff;
  color: white;
  border-bottom-right-radius: 4px;
}

.azkiyar-message-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  padding: 0 4px;
}

/* Quick Replies */
.azkiyar-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.azkiyar-quick-reply {
  background: white;
  border: 1px solid #007bff;
  color: #007bff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.azkiyar-quick-reply:hover {
  background: #007bff;
  color: white;
}

/* Typing indicator */
.azkiyar-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-radius: 16px;
  width: fit-content;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.azkiyar-typing-dot {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.azkiyar-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.azkiyar-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
}

/* فوتر چت (input) */
.azkiyar-chat-footer {
  padding: 16px 20px;
  background: white;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  align-items: center;
}

.azkiyar-chat-input {
  flex: 1;
  border: 1px solid #dee2e6;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.azkiyar-chat-input:focus {
  border-color: #007bff;
}

.azkiyar-chat-send {
  background: #007bff;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.azkiyar-chat-send:hover {
  background: #0056b3;
}

.azkiyar-chat-send:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Action buttons */
.azkiyar-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.azkiyar-action-btn {
  background: white;
  border: 1.5px solid #dee2e6;
  padding: 10px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
  font-family: inherit;
  color: #333;
}

.azkiyar-action-btn .btn-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.azkiyar-action-btn:hover {
  background: #f8f9fa;
  border-color: #007bff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.azkiyar-action-btn.azkiyar-end-chat {
  border-color: #28a745;
  color: #28a745;
}

.azkiyar-action-btn.azkiyar-end-chat:hover {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.azkiyar-action-btn.azkiyar-human-support {
  border-color: #ff9800;
  color: #ff9800;
}

.azkiyar-action-btn.azkiyar-human-support:hover {
  background: #ff9800;
  color: white;
  border-color: #ff9800;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .azkiyar-chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .azkiyar-chat-button {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
  
  .azkiyar-chat-button img {
    width: 32px;
    height: 32px;
  }
}

/* Hidden class */
.azkiyar-hidden {
  display: none !important;
}
