/* Custom styles for n8n chat widget to match JCloud branding */

/* Main chat button */
.n8n-chat-button {
  background-color: #0077cc !important;
  box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.n8n-chat-button:hover {
  background-color: #0088ee !important;
}

/* Replace default chat icon with a custom one */
.n8n-chat-button svg {
  display: none !important;
}

.n8n-chat-button::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Chat header */
.n8n-chat-header {
  background-color: #0775e2 !important;
  color: white !important;
}

/* Chat title and subtitle */
.n8n-chat-title, .n8n-chat-subtitle {
  color: white !important;
}

/* Chat window */
.n8n-chat-window {
  border-color: #0077cc !important;
  box-shadow: 0 8px 24px rgba(0, 51, 102, 0.2) !important;
  width: 350px !important;
  height: 500px !important;
  bottom: 20px !important;
  right: 20px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

/* Position the chat window properly on mobile */
@media (max-width: 480px) {
  .n8n-chat-window {
    width: calc(100% - 40px) !important;
    height: 450px !important;
    bottom: 10px !important;
    right: 10px !important;
    left: 10px !important;
    margin: 0 auto !important;
  }
}

/* Bot messages */
.n8n-chat-message-bubble.n8n-chat-message-bubble-bot {
  background-color: #0077cc !important;
  color: white !important;
}

/* User messages */
.n8n-chat-message-bubble.n8n-chat-message-bubble-user {
  background-color: #f0f7ff !important;
  color: #003366 !important;
}

/* Input area */
.n8n-chat-input-container {
  border-top-color: #e0e0e0 !important;
}

.n8n-chat-input {
  border-color: #0077cc !important;
}

.n8n-chat-input:focus {
  border-color: #0088ee !important;
  box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.2) !important;
}

/* Send button */
.n8n-chat-send-button {
  background-color: #0077cc !important;
  color: white !important;
}

.n8n-chat-send-button:hover {
  background-color: #0088ee !important;
}

/* Avatar for bot messages */
.n8n-chat-avatar-bot {
  background-color: #003366 !important;
}

/* Add JCloud logo to the chat header */
.n8n-chat-header::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  background-image: url('logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 10px;
  border-radius: 50%;
  background-color: white;
  padding: 2px;
}

/* Welcome screen */
.n8n-chat-welcome-screen {
  background-color: #f0f7ff !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 51, 102, 0.2) !important;
  border: 1px solid #0077cc !important;
}

.n8n-chat-welcome-title {
  color: #003366 !important;
  font-weight: 600 !important;
}

.n8n-chat-welcome-subtitle {
  color: #333333 !important;
}

.n8n-chat-welcome-button {
  background-color: #0077cc !important;
  color: white !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  transition: all 0.3s ease !important;
}

.n8n-chat-welcome-button:hover {
  background-color: #0088ee !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 119, 204, 0.3) !important;
}

/* Footer styling */
.n8n-chat-footer {
  color: #666666 !important;
  font-size: 12px !important;
  padding: 8px !important;
  text-align: center !important;
  border-top: 1px solid #e0e0e0 !important;
}

/* Improve message bubbles */
.n8n-chat-message-bubble {
  border-radius: 12px !important;
  padding: 10px 16px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.n8n-chat-message-bubble.n8n-chat-message-bubble-bot {
  border-bottom-left-radius: 4px !important;
}

.n8n-chat-message-bubble.n8n-chat-message-bubble-user {
  border-bottom-right-radius: 4px !important;
}

/* Typing indicator */
.n8n-chat-typing-indicator {
  color: #0077cc !important;
}

/* Scrollbar styling */
.n8n-chat-messages::-webkit-scrollbar {
  width: 6px !important;
}

.n8n-chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1 !important;
}

.n8n-chat-messages::-webkit-scrollbar-thumb {
  background: #0077cc !important;
  border-radius: 3px !important;
}

.n8n-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #0088ee !important;
}
