/* Chat Widget Styles */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  font-family: 'Inter', sans-serif;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--gold), #f4d03f);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(197, 160, 25, 0.4);
  transition: all 0.3s ease;
  position: relative;
  color: #000;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(197, 160, 25, 0.6);
}

.chat-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  animation: pulse 2s infinite;
}

.chat-container {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.chat-container.active {
  display: flex;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-header {
  background: linear-gradient(135deg, var(--gold), #f4d03f);
  color: #000;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.1);
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.status {
  font-size: 12px;
  opacity: 0.8;
}

.status.online::before {
  content: '●';
  color: #2ed573;
  margin-right: 4px;
}

.chat-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #000;
  opacity: 0.7;
}

.chat-close:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.bot {
  background: rgba(197, 160, 25, 0.1);
  border: 1px solid rgba(197, 160, 25, 0.2);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

.message.user {
  background: var(--gold);
  color: #000;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.message.typing {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  align-self: flex-start;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

.chat-input-container {
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  align-items: center;
}

#chatInput {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 10px 15px;
  color: var(--ink);
  font-size: 14px;
  outline: none;
}

#chatInput:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 25, 0.1);
}

#chatSend {
  width: 40px;
  height: 40px;
  background: var(--gold);
  border: none;
  border-radius: 50%;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#chatSend:hover {
  background: var(--gold-2);
  transform: scale(1.05);
}

.chat-quick-actions {
  padding: 10px 20px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quick-btn:hover {
  background: rgba(197, 160, 25, 0.1);
  border-color: rgba(197, 160, 25, 0.3);
  color: var(--gold);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--panel);
  margin: 5% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  height: 80vh;
  position: relative;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: var(--gold);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10002;
}

.modal-close:hover {
  opacity: 0.7;
}

#calendlyInline {
  width: 100%;
  height: 100%;
  border-radius: 20px;
}

/* Estilos para as opções de botões */
.chat-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.chat-option-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(197, 160, 25, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  font-size: 14px;
}

.chat-option-btn:hover {
  background: rgba(197, 160, 25, 0.1);
  border-color: rgba(197, 160, 25, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 160, 25, 0.2);
}

.chat-option-btn:active {
  transform: translateY(0);
}

.option-emoji {
  font-size: 18px;
  min-width: 24px;
}

.option-text {
  flex: 1;
  font-weight: 500;
}

.options-container {
  animation: slideInOptions 0.4s ease;
}

@keyframes slideInOptions {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Botões de ação rápida */
.quick-action-btn {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
}

.quick-action-btn:hover {
  background: var(--gold-2);
  transform: scale(1.05);
}

.urgent-btn {
  background: #ff4757;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 71, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

/* Responsividade melhorada */
@media (max-width: 768px) {
  .chat-option-btn {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .option-emoji {
    font-size: 20px;
  }
}

/* Estilo específico para botão "Voltar ao Menu" */
.back-btn {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  opacity: 0.8;
  font-size: 13px !important;
  margin-top: 8px;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(197, 160, 25, 0.2) !important;
  opacity: 1;
  transform: none !important;
}

.back-btn .option-text {
  font-weight: 400 !important;
  font-size: 13px;
}

.back-btn .option-emoji {
  font-size: 16px !important;
}

/* Separador visual antes do botão voltar */
.back-btn::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.back-btn {
  position: relative;
  margin-top: 12px !important;
}