/*! DowGold sales chat: launcher + panel. Black and gold from the site kit (next/site.css tokens --dgn-*, with the
 * same values as fallbacks so the chat looks right on any template). Everything is .dgchat-* scoped.
 * Placement: bottom right, above the homepage Telegram float (body.dgn-tgf-on) and, on phones, above the
 * buy bar (body.dgn-mbar-on, set by site.js DG.mbar); Astra's #ast-scroll-top is lifted above the launcher. */

:root{
  --dgchat-b:20px;
  --dgchat-gold:var(--dgn-gold,#fbbf24);
  --dgchat-grad:var(--dgn-grad,linear-gradient(100deg,#fff2a8 0%,#fbbf24 46%,#d97706 100%));
  --dgchat-on-gold:var(--dgn-on-gold,#1b1305);
  --dgchat-bg:#0b0b0f;
  --dgchat-card:#15151c;
  --dgchat-line:var(--dgn-line,rgba(255,255,255,.08));
  --dgchat-line2:var(--dgn-line2,rgba(255,255,255,.13));
  --dgchat-text:var(--dgn-text,#f6f4ee);
  --dgchat-muted:var(--dgn-muted,#a9a9b3);
  --dgchat-fb:var(--dgn-fb,'Poppins',system-ui,-apple-system,'Segoe UI',sans-serif);
  --dgchat-fd:var(--dgn-fd,'Archivo','Archivo Fallback','Poppins',system-ui,sans-serif);
  --dgchat-ease:var(--dgn-ease,cubic-bezier(.2,.8,.2,1));
}
body.dgn-tgf-on{--dgchat-b:84px}

.dgchat-launch,.dgchat-panel,.dgchat-launch *,.dgchat-panel *,.dgchat-panel *::before,.dgchat-panel *::after{box-sizing:border-box}

/* ---------- launcher ---------- */
.dgchat-launch{position:fixed;right:20px;bottom:calc(var(--dgchat-b) + env(safe-area-inset-bottom,0px));z-index:75;display:flex;align-items:center;height:56px;margin:0;padding:0 4px;border:1.5px solid rgba(251,191,36,.6);border-radius:999px;background:rgba(12,11,9,.94);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 14px 34px -12px rgba(0,0,0,.75),0 0 0 4px rgba(251,191,36,.07);color:var(--dgchat-text);font:600 14px/1 var(--dgchat-fb);letter-spacing:0;text-transform:none;cursor:pointer;-webkit-appearance:none;appearance:none;transition:bottom .45s var(--dgchat-ease),border-color .2s,transform .2s,opacity .3s}
.dgchat-launch[hidden]{display:none}
.dgchat-launch:hover,.dgchat-launch:focus-visible{border-color:var(--dgchat-gold);color:#fff;background:rgba(12,11,9,.94)}
.dgchat-launch:focus-visible{outline:2px solid var(--dgchat-gold);outline-offset:3px}
.dgchat-launch__ic{position:relative;display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:50%;background:var(--dgchat-grad);color:var(--dgchat-on-gold)}
.dgchat-launch__ic svg{width:23px;height:23px;display:block}
.dgchat-launch__ic .dgchat-i-x{display:none}
.dgchat-launch[aria-expanded="true"] .dgchat-i-chat{display:none}
.dgchat-launch[aria-expanded="true"] .dgchat-i-x{display:block}
.dgchat-launch__t{display:inline-block;max-width:0;opacity:0;overflow:hidden;white-space:nowrap;transition:max-width .35s ease,opacity .25s ease,margin .35s ease}
.dgchat-launch:hover .dgchat-launch__t,.dgchat-launch:focus-visible .dgchat-launch__t,.dgchat-launch.is-intro .dgchat-launch__t{max-width:200px;opacity:1;margin:0 14px 0 12px}
.dgchat-launch[aria-expanded="true"] .dgchat-launch__t{max-width:0;opacity:0;margin:0}
.dgchat-launch__dot{position:absolute;top:1px;right:1px;width:11px;height:11px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 2px #0c0b09}

/* Astra's scroll-to-top button sits above the launcher (and above the Telegram float when both show) */
html body.dgchat-on #ast-scroll-top{bottom:calc(var(--dgchat-b) + 70px)!important;transition:bottom .45s var(--dgchat-ease)}

/* ---------- panel ---------- */
.dgchat-panel{position:fixed;right:20px;bottom:calc(var(--dgchat-b) + 68px + env(safe-area-inset-bottom,0px));z-index:99000;display:flex;flex-direction:column;width:392px;max-width:calc(100vw - 32px);height:640px;max-height:calc(100vh - var(--dgchat-b) - 96px);max-height:calc(100dvh - var(--dgchat-b) - 96px);margin:0;padding:0;border:1px solid rgba(251,191,36,.35);border-radius:18px;background:var(--dgchat-bg);background-image:linear-gradient(180deg,rgba(251,191,36,.06),rgba(251,191,36,0) 120px);box-shadow:0 30px 80px -20px rgba(0,0,0,.85),0 0 0 1px rgba(0,0,0,.4);color:var(--dgchat-text);font:400 14.5px/1.55 var(--dgchat-fb);text-align:left;overflow:hidden;-webkit-font-smoothing:antialiased;transform-origin:bottom right;animation:dgchat-in .28s var(--dgchat-ease)}
.dgchat-panel[hidden]{display:none}
@keyframes dgchat-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}

.dgchat-head{display:flex;align-items:center;gap:12px;flex:none;padding:10px 12px 10px 16px;border-bottom:1px solid var(--dgchat-line)}
.dgchat-head__mark{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:11px;background:var(--dgchat-grad);color:var(--dgchat-on-gold);font:850 15px/1 var(--dgchat-fd);font-stretch:80%;letter-spacing:-.02em}
.dgchat-head__txt{flex:1;min-width:0}
.dgchat-title{margin:0;padding:0;color:#fff;font:800 17px/1.15 var(--dgchat-fd);font-stretch:90%;letter-spacing:-.005em;text-transform:none}
.dgchat-sub{display:flex;align-items:center;gap:6px;margin:3px 0 0;color:var(--dgchat-muted);font-size:12px;line-height:1.3}
.dgchat-sub i{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--dgchat-gold)}
.dgchat-x{display:grid;place-items:center;flex:none;width:40px;height:40px;margin:0;padding:0;border:0;border-radius:10px;background:none;color:#cfcfd8;cursor:pointer;box-shadow:none}
.dgchat-x:hover,.dgchat-x:focus-visible{background:rgba(255,255,255,.06);color:#fff}
.dgchat-x:focus-visible{outline:2px solid var(--dgchat-gold);outline-offset:-2px}
.dgchat-x svg{width:20px;height:20px}
.dgchat-notice{flex:none;margin:0;padding:7px 16px;border-bottom:1px solid var(--dgchat-line);background:rgba(255,255,255,.02);color:var(--dgchat-muted);font-size:11.5px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dgchat-notice a{color:var(--dgchat-muted);text-decoration:underline;text-underline-offset:2px}
.dgchat-notice a:hover,.dgchat-notice a:focus-visible{color:#fff}
.dgchat-tg{display:flex;align-items:center;gap:10px;padding:8px 16px;color:var(--dgchat-text);font-size:13px;font-weight:600;line-height:1.35;white-space:normal;text-decoration:none;transition:background .2s}
.dgchat-tg:hover,.dgchat-tg:focus-visible{background:rgba(251,191,36,.07);color:#fff}
.dgchat-tg__ic{width:26px;height:26px;flex:none;border-radius:50%;display:grid;place-items:center;background:linear-gradient(180deg,#ffd978,#e0a232);color:#0b0a07}
.dgchat-tg__ic svg{width:15px;height:15px;margin-left:-1px}
.dgchat-tg__t{min-width:0}

.dgchat-log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 8px;scroll-behavior:smooth}
.dgchat-msg{display:flex;margin:0 0 12px}
.dgchat-msg--user{justify-content:flex-end}
.dgchat-bubble{max-width:86%;padding:10px 14px;border-radius:14px;border:1px solid var(--dgchat-line2);background:var(--dgchat-card);color:var(--dgchat-text);overflow-wrap:anywhere;word-break:normal}
.dgchat-msg--user .dgchat-bubble{border-color:rgba(251,191,36,.38);background:rgba(251,191,36,.13);color:#fff;border-bottom-right-radius:5px;white-space:pre-wrap}
.dgchat-msg--bot .dgchat-bubble{border-bottom-left-radius:5px}
.dgchat-bubble p{margin:0}
.dgchat-bubble p+p,.dgchat-bubble p+ul,.dgchat-bubble ul+p{margin-top:8px}
.dgchat-bubble ul{margin:6px 0 0;padding:0 0 0 18px;list-style:disc}
.dgchat-bubble li{margin:2px 0;padding:0}
.dgchat-bubble li::marker{color:var(--dgchat-gold)}
.dgchat-bubble a{color:var(--dgchat-gold);text-decoration:underline;text-decoration-color:rgba(251,191,36,.45);text-underline-offset:2px;overflow-wrap:anywhere}
.dgchat-bubble a:hover,.dgchat-bubble a:focus-visible{color:#fff2a8}
.dgchat-bubble strong{color:#fff;font-weight:600}
.dgchat-msg--note .dgchat-bubble{max-width:100%;border-style:dashed;background:transparent;color:var(--dgchat-muted);font-size:13.5px}

.dgchat-typing{display:inline-flex;gap:5px;align-items:center;height:20px}
.dgchat-typing span{width:7px;height:7px;border-radius:50%;background:var(--dgchat-gold);opacity:.35;animation:dgchat-dot 1.2s infinite ease-in-out}
.dgchat-typing span:nth-child(2){animation-delay:.15s}
.dgchat-typing span:nth-child(3){animation-delay:.3s}
@keyframes dgchat-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

.dgchat-sugg{flex:none;margin:0;padding:0 14px 6px;list-style:none}
.dgchat-sugg[hidden]{display:none}
.dgchat-sugg li{margin:0;padding:0}
.dgchat-sugg button{display:flex;align-items:center;gap:8px;width:100%;margin:0;padding:8px 2px;border:0;border-top:1px solid var(--dgchat-line);border-radius:0;background:none;box-shadow:none;color:#e9e7e1;font:500 13.5px/1.35 var(--dgchat-fb);letter-spacing:0;text-align:left;text-transform:none;cursor:pointer}
.dgchat-sugg button::before{content:"\2192";color:var(--dgchat-gold);font-weight:600}
.dgchat-sugg button:hover,.dgchat-sugg button:focus-visible{background:none;color:var(--dgchat-gold)}
.dgchat-sugg button:focus-visible{outline:2px solid var(--dgchat-gold);outline-offset:2px}

.dgchat-ts{flex:none;display:flex;justify-content:center;padding:6px 14px}
.dgchat-ts[hidden]{display:none}

.dgchat-form{display:flex;align-items:flex-end;gap:8px;flex:none;margin:0;padding:10px 12px 8px;border-top:1px solid var(--dgchat-line)}
.dgchat-sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.dgchat-input{flex:1;min-width:0;height:44px;min-height:44px;max-height:120px;margin:0;padding:11px 14px;border:1px solid var(--dgchat-line2);border-radius:12px;background:#101016;box-shadow:none;color:#fff;font:400 15px/1.4 var(--dgchat-fb);resize:none;outline:none;overflow-y:auto}
.dgchat-input::placeholder{color:#8e8e98;opacity:1}
.dgchat-input:focus{border-color:rgba(251,191,36,.7);box-shadow:0 0 0 3px rgba(251,191,36,.15);background:#101016;color:#fff}
.dgchat-input:disabled{opacity:.55}
.dgchat-send{display:grid;place-items:center;flex:none;width:44px;height:44px;margin:0;padding:0;border:0;border-radius:12px;background:var(--dgchat-grad);box-shadow:none;color:var(--dgchat-on-gold);cursor:pointer}
.dgchat-send:hover,.dgchat-send:focus-visible{background:var(--dgchat-grad);color:var(--dgchat-on-gold);filter:brightness(1.06)}
.dgchat-send:focus-visible{outline:2px solid #fff;outline-offset:2px}
.dgchat-send:disabled{opacity:.45;cursor:default;filter:none}
.dgchat-send svg{width:20px;height:20px}
.dgchat-foot{display:flex;justify-content:space-between;gap:10px;flex:none;margin:0;padding:0 16px 12px;color:var(--dgchat-muted);font-size:12px;line-height:1.4}
.dgchat-foot a{color:var(--dgchat-gold);font-weight:600;text-decoration:underline;text-decoration-color:rgba(251,191,36,.45);text-underline-offset:2px}
.dgchat-foot a:hover,.dgchat-foot a:focus-visible{color:#fff2a8}
.dgchat-count{white-space:nowrap}

/* ---------- phones ---------- */
@media (max-width:720px){
  :root{--dgchat-b:14px}
  body.dgn-tgf-on{--dgchat-b:74px}
  body.dgn-mbar-on{--dgchat-b:86px}
  body.dgn-mbar-on.dgn-tgf-on{--dgchat-b:146px}
  .dgchat-launch{right:14px;height:52px}
  .dgchat-launch__ic{width:42px;height:42px}
}
@media (max-width:560px){
  .dgchat-panel{top:0;top:var(--dgchat-top,0px);right:0;bottom:auto;left:0;width:100%;max-width:none;height:100vh;height:var(--dgchat-vh,100dvh);max-height:none;border:0;border-radius:0;padding-bottom:env(safe-area-inset-bottom,0px);animation:dgchat-up .25s var(--dgchat-ease)}
  .dgchat-head{padding-top:max(12px,env(safe-area-inset-top,0px))}
  .dgchat-bubble{max-width:90%}
  .dgchat-input{font-size:16px} /* no zoom on iOS */
  html.dgchat-lock,html.dgchat-lock body{overflow:hidden!important}
  html.dgchat-lock .dgchat-launch{display:none}
}
@keyframes dgchat-up{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  .dgchat-launch,.dgchat-launch__t,.dgchat-panel,.dgchat-log,html body.dgchat-on #ast-scroll-top{transition:none!important;animation:none!important;scroll-behavior:auto}
  .dgchat-typing span{animation:none;opacity:.8}
}
