/* AD Digital Labs — n8n Chat widget theme */
:root {
  /* Colors — AD Digital Labs */
  --chat--color--primary: #f97316;
  --chat--color--primary-shade-50: #fb923c;
  --chat--color--primary--shade-100: #ea580c;
  --chat--color--secondary: #f97316;
  --chat--color-secondary-shade-50: #fb923c;
  --chat--color-white: #ffffff;
  --chat--color-light: #f8fafc;
  --chat--color-light-shade-50: #e2e8f0;
  --chat--color-light-shade-100: #94a3b8;
  --chat--color-medium: #64748b;
  --chat--color-dark: #080c14;
  --chat--color-disabled: #475569;
  --chat--color-typing: #94a3b8;

  /* Base layout */
  --chat--spacing: 1rem;
  --chat--border-radius: 12px;
  --chat--transition-duration: 0.25s;
  --chat--font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;

  /* Window */
  --chat--window--width: 400px;
  --chat--window--height: 600px;
  --chat--window--bottom: var(--chat--spacing);
  --chat--window--right: var(--chat--spacing);
  --chat--window--z-index: 1200;
  --chat--window--border: 1px solid rgba(100, 116, 139, 0.25);
  --chat--window--border-radius: 20px;
  --chat--window--margin-bottom: var(--chat--spacing);

  /* Header */
  --chat--header-height: auto;
  --chat--header--padding: var(--chat--spacing);
  --chat--header--background: #080c14;
  --chat--header--color: #f8fafc;
  --chat--header--border-top: none;
  --chat--header--border-bottom: 1px solid rgba(100, 116, 139, 0.25);
  --chat--header--border-left: none;
  --chat--header--border-right: none;
  --chat--heading--font-size: 1.25rem;
  --chat--subtitle--font-size: 0.875rem;
  --chat--subtitle--line-height: 1.5;

  /* Messages */
  --chat--message--font-size: 1rem;
  --chat--message--padding: var(--chat--spacing);
  --chat--message--border-radius: 12px;
  --chat--message-line-height: 1.5;
  --chat--message--margin-bottom: calc(var(--chat--spacing) * 1);
  --chat--message--bot--background: #0d1320;
  --chat--message--bot--color: #f8fafc;
  --chat--message--bot--border: 1px solid rgba(100, 116, 139, 0.2);
  --chat--message--user--background: #f97316;
  --chat--message--user--color: #ffffff;
  --chat--message--user--border: none;
  --chat--message--pre--background: rgba(0, 0, 0, 0.3);
  --chat--messages-list--padding: var(--chat--spacing);

  /* Toggle */
  --chat--toggle--size: 64px;
  --chat--toggle--width: var(--chat--toggle--size);
  --chat--toggle--height: var(--chat--toggle--size);
  --chat--toggle--border-radius: 50%;
  --chat--toggle--background: #f97316;
  --chat--toggle--hover--background: #fb923c;
  --chat--toggle--active--background: #ea580c;
  --chat--toggle--color: #ffffff;

  /* Input */
  --chat--textarea--height: 36px;
  --chat--textarea--max-height: 30rem;
  --chat--input--font-size: inherit;
  --chat--input--border: 0;
  --chat--input--border-radius: 0;
  --chat--input--padding: 0.35rem 0.5rem;
  --chat--input--background: transparent;
  --chat--input--text-color: #f8fafc;
  --chat--input--line-height: 1.5;
  --chat--input--placeholder--font-size: var(--chat--input--font-size);
  --chat--input--border-active: 0;
  --chat--input--left--panel--width: 2rem;
  --chat--input--container--background: #111827;
  --chat--input--container--border: 1px solid rgba(100, 116, 139, 0.25);
  --chat--input--container--border-radius: 12px;
  --chat--input--container--padding: 2px;
  --chat--input--button--border-radius: 10px;

  /* Buttons */
  --chat--button--padding: calc(var(--chat--spacing) * 5 / 8) var(--chat--spacing);
  --chat--button--border-radius: 8px;
  --chat--button--font-size: 1rem;
  --chat--button--line-height: 1;
  --chat--button--color--primary: #ffffff;
  --chat--button--background--primary: #f97316;
  --chat--button--border--primary: none;
  --chat--button--color--primary--hover: #ffffff;
  --chat--button--background--primary--hover: #fb923c;
  --chat--button--border--primary--hover: none;
  --chat--button--color--primary--disabled: #94a3b8;
  --chat--button--background--primary--disabled: #475569;
  --chat--button--border--primary--disabled: none;
  --chat--button--color--secondary: #f8fafc;
  --chat--button--background--secondary: #1a2332;
  --chat--button--border--secondary: 1px solid rgba(100, 116, 139, 0.25);
  --chat--button--color--secondary--hover: #f8fafc;
  --chat--button--background--secondary--hover: #111827;
  --chat--button--border--secondary--hover: 1px solid rgba(100, 116, 139, 0.35);
  --chat--button--color--secondary--disabled: #64748b;
  --chat--button--background--secondary--disabled: #0d1320;
  --chat--button--border--secondary--disabled: none;
  --chat--close--button--color-hover: #f97316;

  /* Send / file */
  --chat--input--send--button--background: transparent;
  --chat--input--send--button--color: #f97316;
  --chat--input--send--button--background-hover: rgba(249, 115, 22, 0.12);
  --chat--input--send--button--color-hover: #fb923c;
  --chat--input--file--button--background: transparent;
  --chat--input--file--button--color: #f97316;
  --chat--input--file--button--background-hover: rgba(249, 115, 22, 0.12);
  --chat--input--file--button--color-hover: #fb923c;
  --chat--files-spacing: 0.25rem;

  /* Body / footer */
  --chat--body--background: #080c14;
  --chat--footer--background: #080c14;
  --chat--footer--color: #94a3b8;
  --chat--footer--border-top: 1px solid rgba(100, 116, 139, 0.25);
  --chat--footer--padding: 0.4rem;
}

.chat-layout .chat-footer {
  background: #080c14;
}

.chat-inputs {
  background: #111827;
  border-color: rgba(100, 116, 139, 0.25);
  align-items: center;
}

.chat-inputs textarea {
  line-height: var(--chat--textarea--height);
  padding-top: 0;
  padding-bottom: 0;
}

.chat-inputs textarea::placeholder {
  color: #64748b;
}

.chat-input-send-button,
.chat-input-file-button {
  margin: 0;
}

@media (max-width: 480px) {
  :root {
    --chat--window--width: calc(100vw - 2rem);
    --chat--window--height: min(600px, calc(100vh - 6rem));
  }
}
