/* KerrDecks Deck Advisor chat widget */
.kd-chat-launch{position:fixed;right:20px;bottom:20px;z-index:9998;display:flex;align-items:center;gap:10px;padding:12px 18px 12px 14px;border:0;border-radius:999px;background:var(--charcoal,#2a2b2d);color:#fff;font:600 .95rem/1 var(--sans,Inter,system-ui,sans-serif);box-shadow:0 8px 24px rgba(0,0,0,.25);cursor:pointer;transition:transform .15s}
.kd-chat-launch:hover{transform:translateY(-2px)}
.kd-chat-launch:focus-visible{outline:3px solid var(--amber,#e8a317);outline-offset:3px}
.kd-chat-launch .kd-dot{width:28px;height:28px;border-radius:50%;background:var(--amber,#e8a317);display:grid;place-items:center;color:var(--charcoal,#2a2b2d)}
.kd-chat-launch svg{width:16px;height:16px}
.kd-chat-launch[hidden]{display:none}

.kd-chat{position:fixed;right:20px;bottom:20px;z-index:9999;width:380px;max-width:calc(100vw - 32px);height:600px;max-height:calc(100vh - 40px);display:flex;flex-direction:column;background:#fff;border-radius:10px;box-shadow:0 16px 48px rgba(0,0,0,.28);overflow:hidden;font:400 .95rem/1.5 var(--sans,Inter,system-ui,sans-serif);color:var(--charcoal,#2a2b2d)}
.kd-chat[hidden]{display:none}
.kd-head{background:var(--charcoal,#2a2b2d);color:#fff;padding:14px 14px 12px 16px;display:flex;align-items:center;gap:12px;border-bottom:4px solid var(--amber,#e8a317)}
.kd-head img{width:34px;height:34px;border-radius:6px;flex:none}
.kd-head .kd-title{flex:1;min-width:0}
.kd-head strong{display:block;font:800 1.02rem/1.2 var(--display,Archivo,system-ui,sans-serif);letter-spacing:.01em}
.kd-head span{font-size:.78rem;color:#c9c3b8}
.kd-x{background:none;border:0;color:#fff;width:36px;height:36px;border-radius:6px;cursor:pointer;font-size:1.4rem;line-height:1}
.kd-x:hover,.kd-x:focus-visible{background:#3a3b3e;outline:none}

.kd-log{flex:1;overflow-y:auto;padding:16px;background:var(--stone,#f5f3ef);display:flex;flex-direction:column;gap:10px}
.kd-msg{max-width:86%;padding:10px 13px;border-radius:10px;white-space:pre-wrap;word-wrap:break-word}
.kd-msg a{color:var(--amber-deep,#8a5a00);font-weight:600}
.kd-bot{background:#fff;border:1px solid #e4dfd6;align-self:flex-start;border-bottom-left-radius:3px}
.kd-me{background:var(--charcoal,#2a2b2d);color:#fff;align-self:flex-end;border-bottom-right-radius:3px}
.kd-typing{display:inline-flex;gap:4px;padding:14px 13px}
.kd-typing i{width:7px;height:7px;border-radius:50%;background:#b3ac9f;animation:kd-b 1s infinite}
.kd-typing i:nth-child(2){animation-delay:.15s}.kd-typing i:nth-child(3){animation-delay:.3s}
@keyframes kd-b{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.kd-typing i{animation:none}.kd-chat-launch{transition:none}}

.kd-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.kd-chip{background:#fff;border:1px solid var(--line,#c9c3b8);border-radius:999px;padding:7px 12px;font:600 .82rem/1.2 var(--sans,Inter,system-ui,sans-serif);color:var(--charcoal,#2a2b2d);cursor:pointer;text-align:left}
.kd-chip:hover,.kd-chip:focus-visible{border-color:var(--amber,#e8a317);background:var(--amber-soft,#fbefd5);outline:none}

.kd-actions{padding:8px 12px 0;background:#fff;display:flex;gap:8px}
.kd-callback{flex:1;background:var(--amber-soft,#fbefd5);border:1px solid #efd9a6;color:var(--charcoal,#2a2b2d);border-radius:6px;padding:8px 10px;font:600 .84rem/1.2 var(--sans,Inter,system-ui,sans-serif);cursor:pointer}
.kd-callback:hover,.kd-callback:focus-visible{background:#f7e2b4;outline:none}
.kd-form{display:flex;gap:8px;padding:10px 12px 8px;background:#fff}
.kd-form textarea{flex:1;resize:none;border:1px solid var(--line,#c9c3b8);border-radius:6px;padding:10px 12px;font:inherit;max-height:110px;min-height:44px}
.kd-form textarea:focus{outline:2px solid var(--amber,#e8a317);outline-offset:-1px;border-color:transparent}
.kd-send{flex:none;width:44px;border:0;border-radius:6px;background:var(--charcoal,#2a2b2d);color:#fff;cursor:pointer;display:grid;place-items:center}
.kd-send:disabled{opacity:.45;cursor:default}
.kd-send svg{width:18px;height:18px}
.kd-note{padding:0 14px 10px;background:#fff;font-size:.72rem;color:var(--muted,#5e5b56)}

.kd-lead{background:#fff;border:1px solid #e4dfd6;border-radius:10px;padding:14px;display:grid;gap:9px;align-self:stretch}
.kd-lead h4{margin:0;font:800 .98rem/1.2 var(--display,Archivo,system-ui,sans-serif)}
.kd-lead p{margin:0;font-size:.84rem;color:var(--muted,#5e5b56)}
.kd-lead label{display:grid;gap:3px;font-size:.78rem;font-weight:600}
.kd-lead input,.kd-lead textarea{border:1px solid var(--line,#c9c3b8);border-radius:6px;padding:9px 10px;font:inherit;font-weight:400}
.kd-lead input:focus,.kd-lead textarea:focus{outline:2px solid var(--amber,#e8a317);outline-offset:-1px}
.kd-lead .kd-row{display:flex;gap:8px}
.kd-lead button{border:0;border-radius:6px;padding:10px 14px;font:600 .9rem/1 var(--sans,Inter,system-ui,sans-serif);cursor:pointer}
.kd-lead .kd-go{background:var(--charcoal,#2a2b2d);color:#fff;flex:1}
.kd-lead .kd-cancel{background:var(--stone,#f5f3ef);color:var(--charcoal,#2a2b2d)}
.kd-err{color:#a12c12;font-size:.8rem}

@media (max-width:520px){
  .kd-chat{right:0;bottom:0;width:100vw;max-width:100vw;height:100%;max-height:100%;border-radius:0}
  .kd-chat-launch{right:14px;bottom:14px}
  .kd-chat-launch .kd-label{display:none}
  .kd-chat-launch{padding:12px}
}

/* Netlify's "Deployed on Netlify" badge: keep it bottom-left so it never covers the chat */
#nl-badge-frame{left:0!important;right:auto!important}
body.kd-open #nl-badge-frame{visibility:hidden!important}
