/* D1 Leads chat widget */
.d1c-root{position:fixed;right:22px;bottom:22px;z-index:60;font:14px/1.5 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
.d1c-launcher{display:inline-flex;align-items:center;gap:10px;padding:13px 18px;border-radius:999px;background:var(--brand,#1a46c7);color:#fff;border:0;cursor:pointer;font-weight:600;box-shadow:0 12px 28px -10px rgba(26,70,199,.55),0 6px 12px rgba(16,24,40,.08);transition:transform .12s ease, box-shadow .2s ease}
.d1c-launcher:hover{transform:translateY(-2px);box-shadow:0 18px 34px -10px rgba(26,70,199,.6)}
.d1c-launcher svg{width:20px;height:20px}
.d1c-panel{position:absolute;right:0;bottom:68px;width:360px;max-width:calc(100vw - 30px);height:520px;max-height:calc(100vh - 110px);background:#fff;border:1px solid #e6e8ef;border-radius:18px;box-shadow:0 30px 60px -20px rgba(16,24,40,.28),0 10px 30px rgba(16,24,40,.12);display:none;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(8px) scale(.98);transition:opacity .15s ease, transform .15s ease}
.d1c-root.open .d1c-panel{display:flex;opacity:1;transform:translateY(0) scale(1)}
.d1c-head{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid #eef0f5;background:linear-gradient(180deg,#f7f9ff 0%,#fff 100%)}
.d1c-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#1a46c7,#3a63e0);color:#fff;display:grid;place-items:center;font-family:'Fraunces',serif;font-weight:600;font-size:14px}
.d1c-head-text{flex:1;line-height:1.25}
.d1c-head-text strong{display:block;color:#0b1524;font-size:14px}
.d1c-head-text span{color:#5b6472;font-size:12px;display:inline-flex;align-items:center;gap:6px}
.d1c-head-text .dot{width:7px;height:7px;border-radius:50%;background:#22c55e;display:inline-block}
.d1c-close{margin-left:auto;background:none;border:0;color:#5b6472;cursor:pointer;font-size:22px;line-height:1;padding:4px 8px;border-radius:6px}
.d1c-close:hover{background:#f1f4fb;color:#0b1524}
.d1c-body{flex:1;overflow-y:auto;padding:16px 16px 8px;scroll-behavior:smooth;background:#fafbfd}
.d1c-msg{margin:0 0 12px;max-width:85%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.d1c-bot{background:#fff;border:1px solid #e6e8ef;color:#0b1524;border-top-left-radius:4px}
.d1c-user{background:#1a46c7;color:#fff;margin-left:auto;border-top-right-radius:4px}
.d1c-meta{font-size:11px;color:#9aa2b1;margin:-8px 0 10px 4px}
.d1c-user + .d1c-meta{text-align:right;margin-right:4px}
.d1c-typing{display:inline-flex;gap:4px;padding:12px 14px;background:#fff;border:1px solid #e6e8ef;border-radius:14px;border-top-left-radius:4px}
.d1c-typing span{width:6px;height:6px;background:#9aa2b1;border-radius:50%;animation:d1c-b 1s infinite ease-in-out}
.d1c-typing span:nth-child(2){animation-delay:.15s}
.d1c-typing span:nth-child(3){animation-delay:.3s}
@keyframes d1c-b{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}
.d1c-suggest{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 12px;background:#fafbfd;border-bottom:1px solid #eef0f5}
.d1c-suggest button{background:#fff;border:1px solid #e6e8ef;padding:7px 11px;font-size:12.5px;border-radius:999px;color:#1f2937;cursor:pointer;font-weight:500}
.d1c-suggest button:hover{border-color:#1a46c7;color:#1a46c7}
.d1c-input{display:flex;gap:8px;padding:12px;border-top:1px solid #eef0f5;background:#fff}
.d1c-input input{flex:1;font:inherit;padding:11px 13px;border:1px solid #e6e8ef;border-radius:10px;background:#fafbfd;color:#0b1524}
.d1c-input input:focus{outline:0;border-color:#1a46c7;background:#fff;box-shadow:0 0 0 3px rgba(26,70,199,.1)}
.d1c-input button{background:#1a46c7;color:#fff;border:0;border-radius:10px;padding:0 14px;cursor:pointer;font-weight:600;font-size:13px}
.d1c-input button:hover{background:#1738a6}
.d1c-input button:disabled{opacity:.5;cursor:not-allowed}
.d1c-foot{padding:8px 16px 12px;text-align:center;font-size:11px;color:#9aa2b1;background:#fff}
.d1c-foot a{color:#5b6472}
@media (max-width:900px){
  /* 16px keeps iOS Safari from auto-zooming when the chat field is tapped */
  .d1c-input input{font-size:16px}
}
@media (max-width:720px){
  .d1c-root{right:14px;bottom:calc(env(safe-area-inset-bottom, 0px) + 10px)}
  .d1c-launcher{padding:11px 14px}
}
@media (max-width:480px){
  .d1c-root{right:10px;bottom:calc(env(safe-area-inset-bottom, 0px) + 10px)}
  /* dvh so the panel isn't cut off behind the iOS toolbar (vh fallback first) */
  .d1c-panel{width:calc(100vw - 20px);height:calc(100vh - 80px);height:calc(100dvh - 80px);bottom:60px;max-height:none}
  .d1c-launcher{padding:10px 12px;font-size:13px}
  .d1c-launcher span{display:none}
}
