/* Modern chat UI for TeamsAI */

body.mobile-body.teamsai-chat-modern {
  background: #05070d !important;
}

body.teamsai-chat-modern #chat-background {
  min-height: calc(100dvh - 60px);
}

body.teamsai-chat-modern .ai-chat-top {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -12px;
  padding: calc(0.75rem + var(--safe-top, 0px)) 0.85rem 0.85rem;
  background: rgba(8, 10, 18, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 20px 20px;
}

body.teamsai-chat-modern .wrapper-ai-chat-top {
  gap: 0.75rem;
}

body.teamsai-chat-modern .ai-chat-top-image img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(139, 108, 255, 0.45);
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.28);
}

body.teamsai-chat-modern .ai-chat-top-name h4 {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
}

body.teamsai-chat-modern .ai-chat-top-job {
  font-size: 0.8rem;
  color: #94a3b8;
}

body.teamsai-chat-modern .online-bullet {
  background: #22c55e !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

body.teamsai-chat-modern .chat-action-buttons {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.teamsai-chat-modern .ia-chat-content {
  padding-bottom: 6.5rem;
}

body.teamsai-chat-modern .chat-frame {
  border-radius: 0;
  background: transparent;
}

body.teamsai-chat-modern .message {
  margin-bottom: 0.85rem;
  animation: teamsai-msg-in 0.25s ease;
}

@keyframes teamsai-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

body.teamsai-chat-modern .message.user .message-content,
body.teamsai-chat-modern .message.assistant .message-content {
  border-radius: 18px;
  padding: 0.85rem 1rem;
  line-height: 1.55;
  font-size: 0.95rem;
}

body.teamsai-chat-modern .message.user .message-content {
  background: linear-gradient(135deg, #7c5cff, #ff4e9a);
  color: #fff;
  border-bottom-right-radius: 6px;
}

body.teamsai-chat-modern .message.assistant .message-content {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 6px;
}

body.teamsai-chat-modern .chat-input-area,
body.teamsai-chat-modern .wrapper-chat-input {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0.65rem 0.75rem calc(0.75rem + var(--safe-bottom, 0px));
  background: rgba(8, 10, 18, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.teamsai-chat-modern textarea.form-control,
body.teamsai-chat-modern #prompt {
  border-radius: 18px !important;
  min-height: 48px;
  max-height: 120px;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
  padding: 0.75rem 1rem !important;
}

body.teamsai-chat-modern .btn-send-message,
body.teamsai-chat-modern #send {
  width: 48px;
  height: 48px;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #7c5cff, #ff4e9a) !important;
  border: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.teamsai-app-mode.teamsai-chat-modern .teamsai-bottom-nav {
  display: none;
}

body.teamsai-app-mode.teamsai-chat-modern .chat-input-area,
body.teamsai-app-mode.teamsai-chat-modern .wrapper-chat-input {
  padding-bottom: calc(0.75rem + var(--safe-bottom, 0px));
}
