/* AVD / 406 Generators front-desk widget */
.ai-desk-root {
  --ad-bg: #12304a;
  --ad-bg-2: #1b4668;
  --ad-accent: #e8b86d;
  --ad-text: #f4f1ea;
  --ad-muted: #c9d3dc;
  --ad-panel: #fff;
  --ad-ink: #1a2833;
  --ad-line: #d7dee4;
  --ad-bot: #eef3f7;
  --ad-user: #12304a;
  --ad-radius: 16px;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 99999;
  color: var(--ad-ink);
}
.ai-desk-root[data-desk="generators"] {
  --ad-bg: #163226;
  --ad-bg-2: #1f4a36;
  --ad-accent: #fbbf24;
  --ad-user: #163226;
}
/* Sit above AVD mobile CTA (and the reserved Tidio corner) and 406 Generators sticky call bar */
@media (max-width: 1180px) {
  .ai-desk-root[data-desk="avd"] { bottom: 78px; right: 12px; }
}
@media (max-width: 720px) {
  .ai-desk-root[data-desk="generators"] { bottom: 78px; right: 12px; }
  .ai-desk-root .ai-desk-panel { height: min(520px, calc(100vh - 130px)); }
}
.ai-desk-launcher {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--ad-bg);
  color: var(--ad-text);
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-desk-launcher:focus-visible { outline: 3px solid var(--ad-accent); outline-offset: 2px; }
.ai-desk-panel {
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 40px));
  background: var(--ad-panel);
  border-radius: var(--ad-radius);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--ad-line);
}
.ai-desk-panel[hidden], .ai-desk-root[data-open="false"] .ai-desk-panel { display: none; }
.ai-desk-head {
  background: linear-gradient(160deg, var(--ad-bg), var(--ad-bg-2));
  color: var(--ad-text);
  padding: 14px 14px 12px;
}
.ai-desk-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.ai-desk-head p { margin: 4px 0 0; font-size: 12px; color: var(--ad-muted); line-height: 1.4; }
.ai-desk-close {
  float: right;
  background: transparent;
  color: var(--ad-text);
  border: 0;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.ai-desk-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f7f8fa;
}
.ai-desk-bubble {
  max-width: 85%;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.ai-desk-bubble.bot { background: var(--ad-bot); align-self: flex-start; }
.ai-desk-bubble.user { background: var(--ad-user); color: #fff; align-self: flex-end; }
.ai-desk-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--ad-line);
  background: #fff;
}
.ai-desk-form textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 90px;
  border: 1px solid var(--ad-line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
}
.ai-desk-form button {
  appearance: none;
  border: 0;
  background: var(--ad-bg);
  color: #fff;
  border-radius: 10px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ai-desk-note {
  font-size: 11px;
  color: #5b6b75;
  padding: 0 12px 8px;
  background: #fff;
}
