/* Danadresse AI assistant widget — self-contained (prefixed .da-asst, own tokens),
   so it renders the same on the landing, public pages, dashboard and dawakit.dk. */
.da-asst {
  --asst-bg: #ffffff; --asst-fg: #0f172a; --asst-mut: #64748b; --asst-line: #e2e8f0;
  --asst-ink: #0a1628; --asst-accent: #ff6b6b; --asst-user: #0a1628; --asst-user-fg: #fff;
  --asst-bot: #f1f5f9; --asst-code: #0b1021; --asst-code-fg: #e2e8f0; --asst-link: #0a58ca;
  --asst-shadow: 0 18px 50px rgba(10, 22, 40, .22);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--asst-fg);
}
@media (prefers-color-scheme: dark) {
  .da-asst {
    --asst-bg: #111827; --asst-fg: #e5e7eb; --asst-mut: #9ca3af; --asst-line: #1f2937;
    --asst-ink: #f8fafc; --asst-user: #2563eb; --asst-user-fg: #fff; --asst-bot: #1f2937;
    --asst-code: #030712; --asst-link: #93c5fd; --asst-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  }
}
.da-asst *, .da-asst *::before, .da-asst *::after { box-sizing: border-box; }

.da-asst__launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 2147483000;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: #0a1628; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(10, 22, 40, .35); transition: transform .15s ease, bottom .25s ease;
}
.da-asst__launcher::after {
  content: ""; position: absolute; top: 9px; right: 9px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--asst-accent); box-shadow: 0 0 0 2px #0a1628;
}
.da-asst__launcher:hover { transform: translateY(-2px); }
.da-asst__launcher:focus-visible { outline: 3px solid var(--asst-accent); outline-offset: 3px; }
.da-asst.is-open .da-asst__launcher::after { display: none; }
@media (prefers-color-scheme: dark) { .da-asst__launcher { background: #2563eb; } .da-asst__launcher::after { box-shadow: 0 0 0 2px #2563eb; } }

.da-asst__panel {
  position: fixed; right: 20px; bottom: 90px; z-index: 2147483001;
  width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 120px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--asst-bg); color: var(--asst-fg); border: 1px solid var(--asst-line);
  border-radius: 18px; box-shadow: var(--asst-shadow);
}
.da-asst__panel[hidden] { display: none; }

.da-asst__head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--asst-line); }
.da-asst__title { margin: 0; font-size: 15px; font-weight: 700; color: var(--asst-fg); }
.da-asst__sub { font-size: 12px; color: var(--asst-mut); }
.da-asst__actions { display: flex; gap: 4px; }
.da-asst__icon { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent;
  color: var(--asst-mut); font-size: 20px; line-height: 1; cursor: pointer; }
.da-asst__icon:hover, .da-asst__icon:focus-visible { background: var(--asst-bot); color: var(--asst-fg); outline: none; }

.da-asst__log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; overscroll-behavior: contain; }
.da-asst__msg { margin: 0 0 12px; display: flex; flex-direction: column; }
.da-asst__body { max-width: 92%; padding: 9px 12px; border-radius: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.da-asst__msg--user { align-items: flex-end; }
.da-asst__msg--user .da-asst__body { background: var(--asst-user); color: var(--asst-user-fg);
  border-bottom-right-radius: 4px; white-space: pre-wrap; }
.da-asst__msg--assistant .da-asst__body { background: var(--asst-bot); border-bottom-left-radius: 4px; }
.da-asst__msg.is-error .da-asst__body { background: #fdeced; color: #8a1c26; }
.da-asst__body p { margin: 0 0 8px; } .da-asst__body p:last-child { margin-bottom: 0; }
.da-asst__body ul, .da-asst__body ol { margin: 0 0 8px; padding-left: 20px; }
.da-asst__body a { color: var(--asst-link); text-decoration: underline; }
.da-asst__body code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(100, 116, 139, .16); padding: 1px 5px; border-radius: 5px; }
.da-asst__code { margin: 6px 0 8px; border-radius: 10px; overflow: hidden; background: var(--asst-code); }
.da-asst__codebar { display: flex; justify-content: space-between; align-items: center;
  padding: 4px 6px 4px 10px; font-size: 11px; color: #94a3b8; }
.da-asst__copy { border: 1px solid #334155; background: transparent; color: #cbd5e1; border-radius: 6px;
  font-size: 11px; padding: 2px 8px; cursor: pointer; }
.da-asst__copy:hover, .da-asst__copy:focus-visible { background: #1e293b; outline: none; }
.da-asst__code pre { margin: 0; padding: 8px 10px 10px; overflow-x: auto; }
.da-asst__code code { background: none; padding: 0; color: var(--asst-code-fg); font-size: 12.5px; white-space: pre; }

.da-asst__starters { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.da-asst__starter { border: 1px solid var(--asst-line); background: var(--asst-bg); color: var(--asst-fg);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.da-asst__starter:hover, .da-asst__starter:focus-visible { border-color: var(--asst-link); outline: none; }

.da-asst__fb { display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.da-asst__fbbtn { border: 0; background: transparent; cursor: pointer; font-size: 14px; opacity: .55;
  padding: 2px 5px; border-radius: 6px; }
.da-asst__fbbtn:hover, .da-asst__fbbtn.is-on, .da-asst__fbbtn:focus-visible { opacity: 1; background: var(--asst-bot); outline: none; }
.da-asst__fbok { font-size: 12px; color: var(--asst-mut); margin-left: 4px; }

.da-asst__dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.da-asst__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--asst-mut);
  animation: da-asst-b 1s infinite ease-in-out; }
.da-asst__dots i:nth-child(2) { animation-delay: .15s; } .da-asst__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes da-asst-b { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.da-asst__ts { padding: 6px 14px; border-top: 1px solid var(--asst-line); }
.da-asst__ts[hidden] { display: none; }
.da-asst__tsl { font-size: 13px; color: var(--asst-mut); margin-bottom: 4px; }

.da-asst__form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--asst-line); }
.da-asst__input { flex: 1; resize: none; min-height: 42px; max-height: 140px; padding: 10px 12px;
  border: 1px solid var(--asst-line); border-radius: 12px; background: var(--asst-bg); color: var(--asst-fg);
  font: inherit; font-size: 16px; line-height: 1.35; }
.da-asst__input:focus { outline: 2px solid var(--asst-link); outline-offset: 0; border-color: transparent; }
.da-asst__send { height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: #0a1628; color: #fff;
  font: inherit; font-weight: 600; cursor: pointer; }
.da-asst__send:disabled { opacity: .5; cursor: progress; }
.da-asst__send:focus-visible { outline: 3px solid var(--asst-accent); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .da-asst__send { background: #2563eb; } }

.da-asst__foot { display: flex; justify-content: space-between; gap: 10px; padding: 0 14px 10px;
  font-size: 11.5px; color: var(--asst-mut); }
.da-asst__human { color: var(--asst-link); white-space: nowrap; font-weight: 600; }

/* Phone: full-screen sheet; the launcher steps aside while it is open. */
@media (max-width: 560px) {
  .da-asst__launcher { right: 14px; width: 54px; height: 54px; }
  .da-asst__panel { inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .da-asst.is-open .da-asst__launcher { display: none; }
  html.da-asst-open, html.da-asst-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .da-asst__launcher { transition: none; } .da-asst__dots i { animation: none; }
}
@media print { .da-asst { display: none !important; } }
