/* Gemini Chat Widget Styles */

.chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  z-index: 999;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

#gemini-chat-widget {
  position: fixed;
  bottom: -500px;
  right: 20px;
  width: 380px;
  height: 600px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: bottom 0.4s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#gemini-chat-widget.open {
  bottom: 90px;
}

.chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-title p {
  margin: 2px 0 0 0;
  font-size: 12px;
  opacity: 0.9;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.chat-close:hover {
  opacity: 0.8;
}

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

.message {
  display: flex;
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-user {
  justify-content: flex-end;
}

.message-user p {
  background: #667eea;
  color: white;
  padding: 10px 14px;
  border-radius: 12px 0 12px 12px;
  margin: 0;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.4;
}

.message-assistant {
  justify-content: flex-start;
}

.message-assistant p {
  background: white;
  color: #333;
  padding: 10px 14px;
  border-radius: 0 12px 12px 12px;
  margin: 0;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid #e0e0e0;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e0e0e0;
  background: white;
  border-radius: 0 0 12px 12px;
}

#chat-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

#chat-input:focus {
  border-color: #667eea;
}

#chat-input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.chat-send {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.chat-send:hover:not(:disabled) {
  opacity: 0.9;
}

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

.lead-form-popup {
  background: #f0f4ff;
  border: 1px solid #667eea;
  border-radius: 8px;
  padding: 12px;
  margin: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lead-form-popup h4 {
  margin: 0;
  font-size: 13px;
  color: #333;
}

.lead-form-popup input {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
}

.lead-form-popup input:focus {
  border-color: #667eea;
}

.lead-form-popup button {
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.lead-form-popup button:hover {
  background: #764ba2;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  #gemini-chat-widget {
    width: 100%;
    height: 80vh;
    bottom: -80vh;
    right: 0;
    border-radius: 12px 12px 0 0;
  }

  #gemini-chat-widget.open {
    bottom: 0;
  }

  .chat-toggle {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .message-user p,
  .message-assistant p {
    max-width: 90%;
  }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

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

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

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