body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.glass-panel {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(18px);
}
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(62, 116, 230, 0.8), rgba(243, 244, 255, 0));
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* Styling overrides for the embedded chat widget */
.n8n-chat .chat-window {
  background: radial-gradient(circle at top right, rgba(34, 83, 209, 0.25), transparent 55%),
    rgba(7, 24, 67, 0.92);
  border: 1px solid rgba(80, 115, 209, 0.35);
  box-shadow: 0 32px 60px -40px rgba(8, 20, 49, 0.8);
  border-radius: 28px;
  overflow: hidden;
}

.n8n-chat .chat-layout {
  background: transparent;
  color: #e2e8f0;
}

.n8n-chat .chat-header {
  background: linear-gradient(135deg, rgba(34, 83, 209, 0.25), rgba(7, 24, 67, 0.6));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(79, 124, 229, 0.3);
  padding: 24px;
}

.n8n-chat .chat-heading h1 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c7d7ff;
}

.n8n-chat .chat-heading + p {
  font-size: 0.9rem;
  color: #9fb5f5;
  margin-top: 8px;
}

.n8n-chat .chat-messages {
  background: linear-gradient(180deg, rgba(8, 20, 49, 0.85), rgba(7, 17, 38, 0.95));
  padding: 28px 24px 16px;
}

.n8n-chat .chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  border-radius: 18px;
  width: 100%;
}

.n8n-chat .chat-message:last-child {
  margin-bottom: 0;
}

.n8n-chat .chat-message .chat-message-markdown {
  padding: 14px 18px;
  border-radius: 18px;
  line-height: 1.6;
  max-width: clamp(240px, 65%, 560px);
  box-shadow: none;
  border: 1px solid transparent;
}

.n8n-chat .chat-message .chat-message-markdown p {
  margin-bottom: 0.5rem;
}

.n8n-chat .chat-message .chat-message-markdown p:last-child {
  margin-bottom: 0;
}

.n8n-chat .chat-message-from-bot .chat-message-markdown {
  margin-right: auto;
  background: rgba(12, 31, 72, 0.92);
  border-color: rgba(87, 130, 220, 0.35);
  color: #dce7ff;
  position: relative;
}

.n8n-chat .chat-message-from-user .chat-message-markdown {
  margin-left: auto;
  background: linear-gradient(135deg, #2253d1, #4779ff);
  color: #ffffff;
  box-shadow: 0 16px 32px -18px rgba(34, 83, 209, 0.85);
}

.n8n-chat .chat-message-from-user .chat-message-markdown a {
  color: #fff4c8;
}

.n8n-chat .chat-message-from-bot .chat-message-markdown a {
  color: #8cb4ff;
}

.n8n-chat .chat-footer {
  background: rgba(6, 15, 35, 0.85);
  border-top: 1px solid rgba(79, 124, 229, 0.25);
  padding: 18px 24px 24px;
}

.n8n-chat .chat-input {
  border-radius: 20px;
  background: rgba(9, 20, 46, 0.85);
  border: 1px solid rgba(85, 126, 216, 0.35);
  padding: 14px 14px 14px 18px;
  box-shadow: inset 0 0 0 1px rgba(19, 44, 98, 0.35);
}

.n8n-chat .chat-inputs {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  gap: 0.75rem;
}

.n8n-chat .chat-input textarea {
  background: rgba(7, 20, 48, 0.95);
  border: 1px solid rgba(87, 130, 220, 0.3);
  border-radius: 16px;
  color: #d1dcff;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 12px 16px;
  resize: none;
  min-height: 64px;
}

.n8n-chat .chat-input textarea::placeholder {
  color: rgba(176, 197, 255, 0.65);
}

.n8n-chat .chat-inputs-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.n8n-chat .chat-input-send-button {
  background: linear-gradient(135deg, #ffd15a, #fbb72b);
  border-radius: 16px;
  border: none;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 30px -20px rgba(251, 183, 43, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.n8n-chat .chat-input-send-button:disabled {
  background: rgba(120, 132, 167, 0.4);
  box-shadow: none;
}

.n8n-chat .chat-input-send-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px -18px rgba(251, 183, 43, 0.95);
}

.n8n-chat .chat-input-file-button {
  background: rgba(10, 25, 59, 0.9);
  border-radius: 16px;
  border: 1px solid rgba(87, 130, 220, 0.4);
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b4c6ff;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.n8n-chat .chat-input-file-button:hover {
  border-color: rgba(136, 169, 255, 0.75);
  color: #dce4ff;
}

.n8n-chat .chat-window-toggle {
  display: none;
}
