﻿.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 560px;
  min-height: 420px;
  max-height: 620px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color-soft);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #00d8ff, #3567ff);
}

.chat-header-info h3 {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d084;
  box-shadow: 0 0 0 rgba(0, 208, 132, 0.55);
  animation: status-pulse 1.8s ease-out infinite;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  display: flex;
  gap: 8px;
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #00d8ff, #3567ff);
  flex-shrink: 0;
}

.msg-bubble {
  max-width: 78%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color-soft);
  background: rgba(2, 6, 23, 0.56);
  color: var(--text-primary);
  line-height: 1.45;
  font-size: 14px;
}

.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, rgba(0, 216, 255, 0.18), rgba(53, 103, 255, 0.15));
}

.msg-time {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

.chat-welcome {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 10px 0;
}

.chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 10px;
}

.chat-quick-btn {
  border: 1px solid var(--border-color-soft);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
  color: var(--text-secondary);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.chat-quick-btn:hover {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color-soft);
}

.chat-input {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border-radius: 10px;
  border: 1px solid var(--border-color-soft);
  background: rgba(2, 6, 23, 0.56);
  color: var(--text-primary);
  padding: 9px 10px;
  font: inherit;
}

.chat-input:focus {
  outline: none;
  border-color: var(--neon-blue);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #00d8ff, #3567ff);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border-color-soft);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.56);
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: typing 1s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

@keyframes status-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.55);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 9px rgba(0, 208, 132, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 208, 132, 0);
  }
}

@media (max-width: 700px) {
  .chat-wrap {
    height: 460px;
    min-height: 360px;
    max-height: 520px;
  }

  .msg-bubble {
    max-width: 92%;
  }
}
