/* ==========================================
   CHAT DE SUPORTE - BOTÃO FLUTUANTE TECH (GLASSMORPHISM)
   ========================================== */

.support-chat-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 12px 24px;
  background: rgba(0, 110, 127, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 110, 127, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
  user-select: none;
}

.support-chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 110, 127, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: rgba(0, 110, 127, 0.95);
  border-color: rgba(255, 255, 255, 0.5);
}

.support-chat-button.active {
  background: rgba(148, 10, 55, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
}

.support-chat-button-icon {
  display: none;
}

.support-chat-button-text {
  display: block;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Balão de fala inclinado para a esquerda */
.support-chat-button::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 15px);
  right: 0;
  margin-bottom: 0;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) rotate(-2deg) scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 10000;
}

.support-chat-button::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 5px);
  right: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid rgba(0, 0, 0, 0.95);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) rotate(-2deg) scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
}

.support-chat-button:hover::before,
.support-chat-button:hover::after {
  opacity: 1;
  transform: translateY(0) rotate(-2deg) scale(1);
}

.support-chat-button.active::before,
.support-chat-button.active::after {
  display: none;
}

/* Badge de notificação */
.support-chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #ff4444;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
}

.support-chat-badge.show {
  display: flex;
}

/* ==========================================
   CHAT DE SUPORTE - CONTAINER (NORMAL)
   ========================================== */

.support-chat-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 400px;
  max-width: calc(100vw - 60px);
  height: 650px;
  max-height: calc(100vh - 140px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.support-chat-container.show {
  display: flex;
  transform: translateY(0) scale(1);
  opacity: 1;
}

.support-chat-header {
  background: #000000;
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 20px 20px 0 0;
}

.support-chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-chat-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.support-chat-language-selector {
  position: relative;
}

.support-chat-language-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-color: rgba(255, 255, 255, 0.1);
}

.support-chat-language-select:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.support-chat-language-select:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.support-chat-language-select option {
  background: #000000;
  color: #ffffff;
}

.support-chat-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

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

.support-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Scroll normal */
.support-chat-messages {
  scrollbar-width: thin;
  scrollbar-color: #737373 #f1f1f1;
}

.support-chat-messages::-webkit-scrollbar {
  width: 8px;
}

.support-chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.support-chat-messages::-webkit-scrollbar-thumb {
  background: #737373;
  border-radius: 10px;
}

.support-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #525252;
}

/* Mensagem do bot */
.support-chat-message-bot {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.support-chat-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #006E7F 0%, #005a68 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 110, 127, 0.3);
}

.support-chat-message-content {
  flex: 1;
  background: #ffffff;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  line-height: 1.6;
  color: #242626;
  word-wrap: break-word;
}

/* Mensagem do usuário */
.support-chat-message-user {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.support-chat-message-user .support-chat-message-content {
  background: linear-gradient(135deg, #006E7F 0%, #005a68 100%);
  color: #ffffff;
  max-width: 80%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Botões de perguntas rápidas */
.support-chat-quick-questions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.support-chat-question-btn {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  color: #242626;
  transition: all 0.2s ease;
  font-weight: 500;
}

.support-chat-question-btn:hover {
  background: #e9ecef;
  border-color: #006E7F;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 110, 127, 0.2);
}

/* Input area */
.support-chat-input-area {
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  align-items: center;
}

.support-chat-input {
  flex: 1;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 14px;
  color: #242626;
  outline: none;
  transition: all 0.2s ease;
}

.support-chat-input::placeholder {
  color: #999;
}

.support-chat-input:focus {
  border-color: #006E7F;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 110, 127, 0.1);
}

.support-chat-send-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #006E7F 0%, #005a68 100%);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 110, 127, 0.3);
}

.support-chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 110, 127, 0.4);
}

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

/* Mensagem de contato */
.support-chat-contact-message {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
  text-align: center;
}

.support-chat-contact-message strong {
  color: #856404;
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.support-chat-contact-message a {
  color: #006E7F;
  text-decoration: none;
  font-weight: 600;
}

.support-chat-contact-message a:hover {
  text-decoration: underline;
}

/* Loading indicator */
.support-chat-loading {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
}

.support-chat-loading-dot {
  width: 8px;
  height: 8px;
  background: #006E7F;
  border-radius: 50%;
  animation: chat-loading 1.4s infinite;
}

.support-chat-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.support-chat-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chat-loading {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .support-chat-button {
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 13px;
  }

  .support-chat-container {
    bottom: 80px;
    right: 20px;
    left: 20px;
    width: auto;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
  }
}
