/* Support Chat Bot Styles */

/* Botão Flutuante */
.support-chat-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB 0%, #1e40af 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 998;
  transition: all 0.3s ease;
  font-size: 0;
}

.support-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.6);
}

.support-chat-btn:active {
  transform: scale(0.95);
}

.support-chat-btn i {
  width: 28px;
  height: 28px;
  color: white;
}

/* Ponto de animação para indicar suporte disponível */
.pulse-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #10b981;
  border-radius: 50%;
  top: 2px;
  right: 2px;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

/* Container do Chat */
.support-chat-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  height: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
  pointer-events: none;
}

.support-chat-container.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.support-chat-container.hidden {
  display: none;
}

/* Header do Chat */
.support-chat-header {
  background: linear-gradient(135deg, #2563EB 0%, #1e40af 100%);
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.support-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}

.support-chat-title i {
  width: 20px;
  height: 20px;
}

.support-chat-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.support-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Área de Mensagens */
.support-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.support-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.support-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.support-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.support-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Mensagem */
.support-chat-message {
  display: flex;
  gap: 8px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.support-chat-message.bot-message {
  justify-content: flex-start;
}

.support-chat-message.user-message {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.support-chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.4;
}

.bot-message .support-chat-bubble {
  background: #e0e7ff;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

.user-message .support-chat-bubble {
  background: #2563EB;
  color: white;
  border-bottom-right-radius: 4px;
}

.support-chat-time {
  font-size: 12px;
  color: #94a3b8;
  align-self: flex-end;
  margin-bottom: 2px;
}

/* Área de Opções */
.support-chat-options {
  padding: 8px;
  border-top: 1px solid #e2e8f0;
  max-height: 180px;
  overflow-y: auto;
  background: white;
}

.support-chat-options-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.support-chat-option-btn {
  padding: 10px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: left;
  line-height: 1.3;
}

.support-chat-option-btn:hover {
  background: #2563EB;
  color: white;
  border-color: #2563EB;
}

/* Follow-up Options */
.support-chat-followup {
  padding: 12px;
  background: white;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  font-weight: 500;
}

.support-chat-followup-btn {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  color: #334155;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  flex: 1;
  justify-content: center;
}

.support-chat-followup-btn i {
  width: 16px;
  height: 16px;
}

.support-chat-followup-btn.yes:hover {
  background: #ecfdf5;
  color: #059669;
  border-color: #059669;
}

.support-chat-followup-btn.no:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #dc2626;
}

/* Input Area */
.support-chat-input-area {
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  background: white;
  display: flex;
  gap: 8px;
}

.support-chat-report-btn {
  flex: 1;
  padding: 10px 12px;
  background: #f97316;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.support-chat-report-btn:hover {
  background: #ea580c;
  transform: translateY(-1px);
}

.support-chat-report-btn i {
  width: 16px;
  height: 16px;
}

.support-chat-report-submit {
  padding: 10px 16px;
  background: #2563EB;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
}

.support-chat-report-submit:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

/* Responsivo para Mobile */
@media (max-width: 480px) {
  .support-chat-btn {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }

  .support-chat-btn i {
    width: 24px;
    height: 24px;
  }

  .support-chat-container {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    bottom: 0;
  }

  .support-chat-container.show {
    transform: translateY(0);
  }

  .support-chat-messages {
    padding: 12px;
  }

  .support-chat-bubble {
    max-width: 90%;
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* Tema escuro (opcional) */
@media (prefers-color-scheme: dark) {
  .support-chat-container {
    background: #1e293b;
  }

  .support-chat-messages {
    background: #0f172a;
  }

  .bot-message .support-chat-bubble {
    background: #3730a3;
    color: #e0e7ff;
  }

  .support-chat-option-btn {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
  }

  .support-chat-option-btn:hover {
    background: #2563EB;
    color: white;
  }

  .support-chat-followup-btn {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
  }

  .support-chat-input-area,
  .support-chat-options {
    background: #1e293b;
    border-color: #334155;
  }

  .support-chat-time {
    color: #64748b;
  }
}

/* Print não mostrar chat */
@media print {
  .support-chat-btn,
  .support-chat-container {
    display: none !important;
  }
}
