@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&display=swap');

:root {
  --sans: 'Golos Text', system-ui, sans-serif;
  --mono: ui-monospace, Consolas, monospace;

  font: 18px/145% var(--sans);
  color-scheme: light;
  background: #1a1a2e;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body {
  margin: 0;
}
p {
  font-size: 14px;  
}

textarea {
  color: black !important
}

/* ── Layout ── */
.container {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  font-family: 'Golos Text', system-ui, sans-serif;
}

.container h1 {
  margin-top: 0;
  font-size: 48px;
  color: #1a1a2e;
  text-align: center;
  line-height: 1; /* Здесь вы можете изменить отступ между строк */
}

/* ── Setup screen ── */
.description {
  color: #555;
  margin-bottom: 20px;
  line-height: 1.5;
  font-size: 16px;
  text-align: center;
}

.url-input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #1a1a2e;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
  outline: none;
}

.url-input:focus {
  border-color: #FF6D5A;
}

.btn-primary {
  width: 100%;
  padding: 12px 24px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Golos Text', system-ui, sans-serif;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: #2d2d4a;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* ── Active chat screen ── */
.webhook-info {
  font-size: 19px;
  color: #666;
  word-break: break-all;
  margin-bottom: 20px;
  line-height: 1.6;
  text-align: center;
}

.webhook-info code {
  display: block;
  margin-top: 6px;
  padding: 10px 14px;
  background: #f4f4f4;
  border-radius: 6px;
  font-family: 'Consolas', monospace;
  font-size: 13px;
  color: #333;
}

.btn-secondary {
  padding: 10px 20px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Golos Text', system-ui, sans-serif;
  transition: opacity 0.2s;
}

.btn-secondary:hover {
  opacity: 0.8;
}

/* ── Chat widget overrides ── */
.n8n-chat * {
  font-family: 'Golos Text', system-ui, sans-serif;
}

/* Кнопка открытия чата */
.n8n-chat .chat-window-toggle .chat-button {
  background: #FF6D5A;
  box-shadow: 0 4px 16px rgba(255, 109, 90, 0.4);
}

/* Окно чата */
.n8n-chat .chat-window {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border: none;
  overflow: hidden;
}

/* Шапка */
.n8n-chat .chat-header {
  background: #1a1a2e;
  padding: 18px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 8px;
}

.n8n-chat .chat-header::before {
  content: '';
  display: inline-flex;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: #FF6D5A url('/n8n.svg') center / 36px no-repeat;
  border-radius: 50%;
}

.n8n-chat .chat-heading {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

/* Экран приветствия */
.n8n-chat .chat-get-started {
  background: #1a1a2e;
}

.n8n-chat .chat-get-started button {
  background: #FF6D5A;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.n8n-chat .chat-get-started button:hover {
  opacity: 0.85;
}

/* Область сообщений */
.n8n-chat .chat-body {
  background: #f9f9f9;
}

/* Сообщение от бота */
.n8n-chat .chat-message-from-bot .chat-message {
  background: #ffffff;
  border: 1px solid #ebebeb;
  color: #1a1a2e;
  border-radius: 10px 10px 10px 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  font-size: 12px;
  padding: 6px 10px;
}

/* Сообщение от пользователя */
.n8n-chat .chat-message-from-user .chat-message {
  background: #FF6D5A;
  color: #fff;
  border-radius: 10px 10px 2px 10px;
  font-size: 12px;
  padding: 6px 10px;
}

/* Футер / поле ввода */
.n8n-chat .chat-footer {
  background: #ffffff;
  border-top: 1px solid #ebebeb;
  padding: 10px 14px;
  overflow: hidden;
  box-sizing: border-box;
}

.n8n-chat .chat-inputs {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  box-sizing: border-box;
}

.n8n-chat .chat-input-left-panel {
  flex: 1 1 auto;
  min-width: 0;
}

.n8n-chat .chat-input {
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #1a1a2e;
  min-height: unset;
  max-height: unset;
  height: 38px;
  padding: 8px 12px;
  resize: none;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.n8n-chat .chat-input:focus {
  border-color: #FF6D5A;
  outline: none;
  box-shadow: none;
}

/* Кнопка отправки */
.n8n-chat .chat-input-send-button {
  background: #FF6D5A;
  border-radius: 8px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: -12px;
  transition: opacity 0.2s;
}

.n8n-chat .chat-input-send-button svg,
.n8n-chat .chat-input-send-button svg * {
  color: #ffffff;
  fill: #ffffff;
  stroke: #ffffff;
}

.n8n-chat .chat-input-send-button:hover {
  opacity: 0.85;
}

/* Убираем "Powered by n8n" */
.n8n-chat .chat-powered-by {
  display: none;
}
