.das-ai-chat {
  --das-ai-accent: #7357e8;
  --das-ai-ink: #202238;
  --das-ai-muted: #687085;
  --das-ai-line: #e8eaf1;
  width: 100%;
  max-width: 920px;
  margin: 22px auto;
  padding: clamp(16px, 3vw, 28px);
  color: var(--das-ai-ink);
  background: #fff;
  border: 1px solid var(--das-ai-line);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(33, 35, 64, .08);
  font: inherit;
  box-sizing: border-box;
}
.das-ai-chat *, .das-ai-chat *::before, .das-ai-chat *::after { box-sizing: border-box; }
.das-ai-chat__header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.das-ai-chat__eyebrow { color:var(--das-ai-accent); font-size:.7rem; font-weight:800; letter-spacing:.12em; }
.das-ai-chat__header h2 { margin:5px 0 7px; font-size:clamp(1.2rem,2.3vw,1.55rem); line-height:1.2; }
.das-ai-chat__header p { margin:0; color:var(--das-ai-muted); font-size:.92rem; line-height:1.5; }
.das-ai-chat__status { flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--das-ai-line); border-radius:999px; color:var(--das-ai-muted); font-size:.75rem; }
.das-ai-chat__status i { width:8px; height:8px; display:inline-block; border-radius:50%; background:#25a879; box-shadow:0 0 0 3px #e5f7f0; }
.das-ai-chat__messages { display:flex; flex-direction:column; gap:12px; height:300px; overflow:auto; padding:14px; border:1px solid var(--das-ai-line); border-radius:14px; background:#fafaff; scroll-behavior:smooth; }
.das-ai-chat__message { width:fit-content; max-width:min(88%,680px); padding:11px 14px; border-radius:14px; background:#fff; border:1px solid var(--das-ai-line); font-size:.92rem; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.das-ai-chat__message[data-role="user"] { align-self:flex-end; color:#fff; background:var(--das-ai-accent); border-color:var(--das-ai-accent); border-bottom-right-radius:5px; }
.das-ai-chat__message[data-role="assistant"] { align-self:flex-start; border-bottom-left-radius:5px; }
.das-ai-chat__message strong { display:block; margin-bottom:4px; font-size:.75rem; opacity:.78; }
.das-ai-chat__message[data-role="user"] strong { display:none; }
.das-ai-chat__quick { display:flex; flex-wrap:wrap; gap:8px; margin:13px 0; }
.das-ai-chat__quick:empty { display:none; }
.das-ai-chat__quick button, .das-ai-chat__quick a { display:inline-flex; align-items:center; min-height:36px; padding:7px 12px; border:1px solid #dcd8f8; border-radius:999px; color:#4f3db2; background:#f7f5ff; font:inherit; font-size:.82rem; text-decoration:none; cursor:pointer; }
.das-ai-chat__quick button:hover, .das-ai-chat__quick a:hover { background:#eeebff; }
.das-ai-chat__quick button:disabled { opacity:.55; cursor:default; }
.das-ai-chat__form { display:flex; gap:10px; }
.das-ai-chat__form input { min-width:0; flex:1; height:46px; padding:0 14px; border:1px solid #dfe2eb; border-radius:12px; color:var(--das-ai-ink); background:#fff; font:inherit; font-size:.92rem; }
.das-ai-chat__form input:focus { outline:3px solid rgba(115,87,232,.15); border-color:var(--das-ai-accent); }
.das-ai-chat__form button { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-width:96px; padding:0 17px; border:0; border-radius:12px; color:#fff; background:var(--das-ai-accent); font:inherit; font-weight:700; cursor:pointer; }
.das-ai-chat__form button:disabled { opacity:.6; cursor:wait; }
.das-ai-chat__privacy { margin:11px 0 0; color:var(--das-ai-muted); font-size:.76rem; }
.das-ai-chat__sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.das-ai-chat__typing { color:var(--das-ai-muted); font-size:.86rem; }
@media (max-width:600px) {
  .das-ai-chat { margin:14px auto; padding:14px; border-radius:15px; }
  .das-ai-chat__header { display:block; }
  .das-ai-chat__status { margin-top:11px; }
  .das-ai-chat__messages { height:270px; padding:10px; }
  .das-ai-chat__message { max-width:94%; padding:10px 12px; font-size:.88rem; }
  .das-ai-chat__form { gap:7px; }
  .das-ai-chat__form input { height:44px; padding:0 10px; font-size:16px; }
  .das-ai-chat__form button { min-width:76px; padding:0 11px; }
}
/* Theme-aware, colourful support chat and its dedicated public page. */
body:not([data-theme="light"]) .das-ai-chat {
  --das-ai-accent: #9c63ff;
  --das-ai-ink: #f3f6ff;
  --das-ai-muted: #a7b6d2;
  --das-ai-line: rgba(148, 169, 212, .22);
  background: radial-gradient(ellipse at 5% 0, rgba(92, 71, 221, .25), transparent 44%), linear-gradient(145deg, #111c33, #08111f 78%);
  color: var(--das-ai-ink);
  border-color: rgba(115, 121, 255, .38);
  box-shadow: 0 24px 60px rgba(0,0,0,.28), 0 0 34px rgba(114,82,255,.12);
}
body:not([data-theme="light"]) .das-ai-chat__messages {
  background: linear-gradient(145deg, rgba(21,34,58,.94), rgba(11,21,38,.98));
  border-color: rgba(130,151,198,.2);
}
body:not([data-theme="light"]) .das-ai-chat__message[data-role="assistant"] {
  background: linear-gradient(145deg, rgba(37,49,76,.94), rgba(24,34,56,.96));
  border-color: rgba(145,163,204,.2);
  color: #edf2ff;
}
body:not([data-theme="light"]) .das-ai-chat__message[data-role="user"] {
  background: linear-gradient(110deg, #7a43ee, #4567f2 62%, #138fe9);
  border-color: transparent;
}
body:not([data-theme="light"]) .das-ai-chat__quick button,
body:not([data-theme="light"]) .das-ai-chat__quick a {
  background: rgba(108,80,220,.2);
  border-color: rgba(153,126,255,.34);
  color: #d9d1ff;
}
body:not([data-theme="light"]) .das-ai-chat__quick button:hover,
body:not([data-theme="light"]) .das-ai-chat__quick a:hover { background: rgba(123,91,247,.34); }
body:not([data-theme="light"]) .das-ai-chat__form input {
  color: #f3f6ff;
  background: rgba(5,13,26,.85);
  border-color: rgba(141,160,203,.28);
}
body:not([data-theme="light"]) .das-ai-chat__form button {
  background: linear-gradient(105deg, #8b49ee, #5362ee 58%, #168be8);
  box-shadow: 0 8px 22px rgba(86,77,226,.25);
}
body[data-theme="light"] .das-ai-chat {
  --das-ai-accent: #6945d7;
  --das-ai-ink: #202238;
  --das-ai-muted: #687085;
  --das-ai-line: #e8eaf1;
}
.das-support-chat-page { width: min(1020px, calc(100% - 32px)); margin: 32px auto 58px; }
.das-chat-back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: #a9c9ff; font-size: .9rem; font-weight: 750; text-decoration: none; }
.das-chat-back:hover { color: #fff; }
.das-chat-intro { display: flex; align-items: center; gap: 18px; margin: 20px 0 8px; padding: 22px 25px; border: 1px solid rgba(127,112,255,.27); border-radius: 20px; background: linear-gradient(115deg, rgba(24,37,72,.78), rgba(57,25,94,.55)); }
.das-chat-intro-icon { display: grid; place-items: center; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 17px; color: #fff; font-size: 28px; background: linear-gradient(140deg,#874bff,#347ff2); box-shadow: 0 10px 24px rgba(91,75,230,.28); }
.das-chat-kicker { color: #9ab8ff; font-size: .72rem; font-weight: 850; letter-spacing: .14em; }
.das-chat-intro h1 { margin: 5px 0; color: #f5f7ff; font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -.04em; }
.das-chat-intro p { margin: 0; color: #b0bfd9; font-size: .95rem; line-height: 1.55; }
.support-chat-page[data-theme="light"] .das-chat-intro { background: linear-gradient(115deg,#eef2ff,#f6edff); border-color: rgba(110,92,210,.2); }
body[data-theme="light"] .das-chat-intro h1 { color: #202b48; }
body[data-theme="light"] .das-chat-intro p { color: #586783; }
@media (max-width: 600px) {
  .das-support-chat-page { width: min(100% - 20px, 1020px); margin: 20px auto 35px; }
  .das-chat-intro { align-items: flex-start; gap: 12px; padding: 18px 14px; }
  .das-chat-intro-icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 13px; }
  .das-chat-intro p { font-size: .86rem; }
}

/* Advanced SaaS support polish */
.das-ai-chat__message[data-role="assistant"] { position:relative; }
.das-ai-chat__quick button { transition:transform .15s ease, box-shadow .15s ease, background .15s ease; }
.das-ai-chat__quick button:hover { transform:translateY(-1px); box-shadow:0 5px 16px rgba(90,70,180,.12); }
.das-ai-chat__message[data-role="assistant"] strong::before { content:"● "; color:#28b985; }
.das-ai-chat__message[data-role="user"] { white-space:pre-wrap; }
