
/* n8n Webhook Chat Widget - styles */
#n8n-chat-widget-launcher {
  position: fixed;
  z-index: 2147483000;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
  user-select: none;
}
#n8n-chat-widget-launcher:hover { transform: translateY(-2px); }

#n8n-chat-widget-panel {
  position: fixed;
  z-index: 2147483001;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 24px));
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
  overflow: hidden;
  display: none;
}
#n8n-chat-widget-panel.open { display: flex; flex-direction: column; }

#n8n-chat-widget-header {
  padding: 14px 14px 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#n8n-chat-widget-header .titles { display:flex; flex-direction:column; gap:2px; min-width:0; }
#n8n-chat-widget-header .title { font-size: 15px; font-weight: 700; line-height: 1.2; }
#n8n-chat-widget-header .subtitle { font-size: 12px; opacity: .9; line-height: 1.2; }

#n8n-chat-widget-close {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.95;
}
#n8n-chat-widget-close:hover { background: rgba(255,255,255,.12); }

#n8n-chat-widget-body {
  padding: 12px 12px 0 12px;
  overflow-y: auto;
  flex: 1;
}
.n8n-msg { display: flex; margin: 0 0 10px 0; }
.n8n-msg.user { justify-content: flex-end; }
.n8n-msg.bot { justify-content: flex-start; }

.n8n-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.n8n-msg.user .n8n-bubble {
  background: rgba(21,57,154,.10);
  color: #111;
  border-top-right-radius: 6px;
}
.n8n-msg.bot .n8n-bubble {
  background: #f3f5f7;
  color: #111;
  border-top-left-radius: 6px;
}

#n8n-chat-widget-footer {
  padding: 10px 12px 12px 12px;
  border-top: 1px solid rgba(0,0,0,.06);
}
#n8n-chat-widget-form { display: flex; gap: 10px; align-items: center; }

#n8n-chat-widget-input {
  flex: 1;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
  min-height: 44px;
}
#n8n-chat-widget-input:focus {
  border-color: rgba(21,57,154,.45);
  box-shadow: 0 0 0 4px rgba(21,57,154,.12);
}

#n8n-chat-widget-send {
  border: none;
  cursor: pointer;
  border-radius: 12px;
  height: 44px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .12s ease, opacity .12s ease;
}
#n8n-chat-widget-send:active { transform: scale(.98); }
#n8n-chat-widget-send[disabled] { opacity: .55; cursor: not-allowed; }

#n8n-chat-widget-typing {
  font-size: 12px;
  opacity: .75;
  padding: 0 12px 10px 12px;
  display: none;
}
#n8n-chat-widget-typing.show { display:block; }
