.namix-ai-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 900;
  display: grid; place-items: center; width: 56px; height: 56px; padding: 0;
  border: 0; border-radius: 50%; background: #ff6b00; color: #fff;
  box-shadow: 0 12px 32px #0004; cursor: pointer;
}
.namix-ai-launcher[hidden] { display: none; }
.namix-ai-launcher svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.namix-ai-launcher:hover { background: #e95f00; }
.namix-ai-launcher:focus-visible, .namix-ai-chat button:focus-visible, .namix-ai-chat textarea:focus-visible {
  outline: 3px solid #ffd2b3; outline-offset: 2px;
}
.namix-ai-teaser {
  position: fixed; right: 88px; bottom: 29px; z-index: 900;
  box-sizing: border-box; width: min(500px, calc(100vw - 120px)); min-height: 102px;
  display: flex; align-items: center; padding: 19px 23px;
  border: 2px solid #ff6b00; border-radius: 16px; background: #fff; color: #262626;
  box-shadow: 0 10px 30px #0003, 0 2px 8px #0002;
  white-space: pre-line; font-size: 16px; line-height: 1.45;
  animation: namix-ai-teaser-in 280ms ease-out both;
}
.namix-ai-teaser[hidden] { display: none; }
@keyframes namix-ai-teaser-in {
  from { opacity: 0; transform: translateY(5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.namix-ai-pulse { animation: namix-ai-pulse 900ms ease-in-out 1; }
@keyframes namix-ai-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 8px #ff6b0026, 0 12px 32px #0004; } }
.namix-ai-chat {
  position: fixed; right: 24px; bottom: 92px; z-index: 901;
  width: min(390px, calc(100vw - 32px)); height: min(610px, calc(100vh - 120px));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fff; color: #202020; border: 1px solid #d8d8d8;
  border-radius: 18px; box-shadow: 0 20px 60px #0005; overflow: hidden;
}
.namix-ai-chat[hidden] { display: none; }
.namix-ai-head { display: flex; align-items: center; gap: 12px; padding: 15px 16px; background: #202020; color: #fff; }
.namix-ai-head strong, .namix-ai-head small { display: block; }
.namix-ai-head small { color: #ddd; margin-top: 2px; }
.namix-ai-close { margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 24px; cursor: pointer; }
.namix-ai-start-new { margin-left: auto; background: transparent; border: 1px solid #fff8; border-radius: 8px; color: #fff; font: inherit; font-size: 12px; padding: 7px 8px; cursor: pointer; }
.namix-ai-start-new + .namix-ai-close { margin-left: 0; }
.namix-ai-log { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; background: #f5f3ef; scroll-behavior: smooth; }
.namix-ai-message { max-width: 88%; margin: 0 0 12px; padding: 11px 13px; border-radius: 14px; white-space: pre-wrap; line-height: 1.45; }
.namix-ai-message--assistant { background: #fff; border: 1px solid #dedbd5; }
.namix-ai-message--user { margin-left: auto; background: #202020; color: #fff; }
.namix-ai-status { color: #666; font-size: 13px; margin: 4px 0 12px; }
.namix-ai-cta { display: inline-flex; border: 0; border-radius: 999px; background: #ff6b00; color: #fff; padding: 10px 14px; font-weight: 700; cursor: pointer; margin: 0 0 12px; }
.namix-ai-summary { display: block; width: 100%; min-height: 96px; box-sizing: border-box; margin: 0 0 12px; padding: 10px; border: 1px solid #b8b4ad; border-radius: 10px; font: inherit; resize: vertical; }
.namix-ai-new-conversation { display: inline-flex; margin: 0 0 12px 8px; padding: 10px 14px; border: 1px solid #555; border-radius: 999px; background: #fff; color: #222; font: inherit; font-weight: 700; cursor: pointer; }
.namix-ai-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; background: #fff; border-top: 1px solid #ddd; }
.namix-ai-form > label.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.namix-ai-input { grid-column: 1; grid-row: 1; min-width: 0; resize: none; min-height: 46px; max-height: 100px; border: 1px solid #aaa; border-radius: 11px; padding: 10px; font: inherit; }
.namix-ai-send { grid-column: 2; grid-row: 1; min-width: 88px; min-height: 46px; align-self: start; border: 0; border-radius: 11px; background: #ff6b00; color: #fff; padding: 0 16px; font: 700 15px/1 inherit; cursor: pointer; }
.namix-ai-send:hover { background: #e95f00; }
.namix-ai-send:disabled { opacity: .6; cursor: wait; }
.namix-ai-note { grid-column: 1/-1; grid-row: 2; margin: 0; color: #666; font-size: 11px; }
.namix-ai-turnstile { position: fixed; bottom: 0; right: 0; z-index: 0; }
.application-form.namix-ai-highlight { animation: namix-ai-highlight 1.8s ease; }
.namix-ai-noscript { position: fixed; right: 20px; bottom: 20px; background: #fff; padding: 10px; z-index: 900; }
@keyframes namix-ai-highlight { 0%, 100% { box-shadow: none; } 35% { box-shadow: 0 0 0 6px #ff6b0055; } }
@media (min-width: 769px) {
  .namix-ai-launcher { width: 62px; height: 62px; }
  .namix-ai-launcher svg { width: 31px; height: 31px; }
  .namix-ai-teaser { right: 94px; }
  .namix-ai-pulse { animation: namix-ai-pulse 900ms ease-in-out 3; }
}
@media (max-width: 600px) {
  .namix-ai-launcher { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .namix-ai-teaser {
    right: 80px; bottom: max(20px, env(safe-area-inset-bottom));
    width: min(310px, calc(100vw - 104px)); min-height: 88px;
    padding: 12px 15px; font-size: 16px; line-height: 1.4;
  }
  .namix-ai-chat {
    left: 12px; right: 12px; top: auto;
    bottom: calc(var(--namix-viewport-bottom, 0px) + 12px);
    width: auto;
    height: min(58dvh, calc(var(--namix-visible-height, 100dvh) - 24px));
    max-height: calc(var(--namix-visible-height, 100dvh) - 24px);
    border-radius: 14px;
  }
  .namix-ai-chat.is-active, .namix-ai-chat.is-keyboard { height: min(88dvh, calc(var(--namix-visible-height, 100dvh) - 24px)); }
  .namix-ai-message { max-width: 92%; }
  .namix-ai-form { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .namix-ai-teaser { animation: none; }
  .namix-ai-pulse { animation: none; }
  .namix-ai-log { scroll-behavior: auto; }
  .application-form.namix-ai-highlight { animation: none; outline: 4px solid #ff6b0055; }
}
