/* n8n Chatter - Base Styles */
.n8n-chatter-widget {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1E293B;
}

/* Trigger Button */
.n8n-chatter-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4338CA 0%, #3730A3 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(67, 56, 202, 0.3);
  z-index: 99999;
}

.n8n-chatter-trigger svg {
  width: 28px;
  height: 28px;
  color: white;
}

/* Panel */
.n8n-chatter-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 400px;
  max-height: 600px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 99998;
}

.n8n-chatter-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Header */
.n8n-chatter-header {
  background: linear-gradient(135deg, #4338CA 0%, #3730A3 100%);
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.n8n-chatter-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.n8n-chatter-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.n8n-chatter-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n8n-chatter-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.n8n-chatter-subtitle {
  font-size: 12px;
  opacity: 0.9;
  margin: 2px 0 0;
}

.n8n-chatter-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content */
.n8n-chatter-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #FFFFFF;
}

/* Welcome */
.n8n-chatter-welcome {
  text-align: center;
  padding: 20px 0;
}

.n8n-chatter-welcome-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #4338CA 0%, #3730A3 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.n8n-chatter-welcome-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n8n-chatter-welcome h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
}

.n8n-chatter-welcome p {
  font-size: 14px;
  color: #64748B;
}

/* Form */
.n8n-chatter-lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.n8n-chatter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.n8n-chatter-label {
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
}

.n8n-chatter-input {
  padding: 12px 16px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
  font-size: 14px;
  color: #1E293B;
}

.n8n-chatter-input::placeholder {
  color: #94A3B8;
}

/* Button */
.n8n-chatter-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #4338CA 0%, #3730A3 100%);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
}

/* GDPR */
.n8n-chatter-gdpr {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.n8n-chatter-gdpr input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.n8n-chatter-gdpr label {
  font-size: 12px;
  color: #1E293B;
  line-height: 1.4;
}

/* Chat */
.n8n-chatter-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.n8n-chatter-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Input Area */
.n8n-chatter-input-area {
  padding: 16px 0 0;
  border-top: 1px solid #E2E8F0;
}

.n8n-chatter-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 24px;
  padding: 8px 8px 8px 16px;
}

.n8n-chatter-message-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #1E293B;
  resize: none;
  min-height: 24px;
  max-height: 120px;
  padding: 4px 0;
}

.n8n-chatter-message-input::placeholder {
  color: #94A3B8;
}

/* Send Button - ROUND */
.n8n-chatter-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  background: #4338CA;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.n8n-chatter-send-btn svg {
  width: 18px;
  height: 18px;
}

/* Mobile */
@media (max-width: 480px) {
  .n8n-chatter-panel {
    width: calc(100vw - 32px);
    right: 16px;
  }
}
