/* The Purpose Debt — chat assistant widget. Uses the site's colours from styles.css. */
.pdc-launch{position:fixed;right:20px;bottom:20px;z-index:1000;display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:0 20px 0 16px;border:0;border-radius:999px;background:var(--navy,#002060);color:#fff;font:600 .98rem/1 var(--sans,system-ui,sans-serif);cursor:pointer;box-shadow:0 10px 28px rgba(0,24,69,.35);transition:transform .15s,background .15s}
.pdc-launch:hover{background:var(--navy-800,#001845);transform:translateY(-1px)}
.pdc-launch svg{color:#ff9a4d}
.pdc-launch.is-open span{display:none}
.pdc-launch.is-open{padding:0 16px}
.pdc-launch:focus-visible,.pdc-close:focus-visible,.pdc-send:focus-visible,.pdc-chip:focus-visible,.pdc-action:focus-visible,.pdc-submit:focus-visible{outline:2px solid var(--red,#d7263d);outline-offset:2px}

.pdc-panel{margin:0;padding:0;position:fixed;right:20px;bottom:86px;z-index:1000;width:380px;max-width:calc(100vw - 32px);height:560px;max-height:calc(100vh - 110px);display:flex;flex-direction:column;background:#fff;border:1px solid var(--line,#e4e7ee);border-radius:14px;box-shadow:0 24px 60px rgba(0,24,69,.28);overflow:hidden;font-family:var(--sans,system-ui,sans-serif);color:var(--ink,#1a1a2e)}
.pdc-panel[hidden]{display:none}
.pdc-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 12px 14px 18px;background:linear-gradient(160deg,var(--navy,#002060),var(--navy-800,#001845));color:#fff}
.pdc-title{margin:0;font:700 1.12rem/1.2 var(--serif,Georgia,serif)}
.pdc-sub{margin:3px 0 0;font-size:.78rem;color:#c3cfea}
.pdc-close{width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.pdc-close:hover{background:rgba(255,255,255,.12)}

.pdc-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--bg,#f7f8fa)}
.pdc-msg{max-width:88%;padding:10px 13px;border-radius:12px;font-size:.95rem;line-height:1.5}
.pdc-msg p{margin:0}
.pdc-msg p+p{margin-top:8px}
.pdc-bot{align-self:flex-start;background:#fff;border:1px solid var(--line,#e4e7ee);border-bottom-left-radius:4px}
.pdc-user{align-self:flex-end;background:var(--navy,#002060);color:#fff;border-bottom-right-radius:4px}
.pdc-action{display:inline-flex;align-items:center;min-height:40px;margin-top:10px;padding:0 14px;border:0;border-radius:8px;background:var(--red,#d7263d);color:#fff;font:600 .9rem var(--sans,system-ui,sans-serif);text-decoration:none;cursor:pointer}
.pdc-action:hover{background:#c01f35;color:#fff}
.pdc-typing{display:flex;gap:5px;padding:14px}
.pdc-typing span{width:7px;height:7px;border-radius:50%;background:#9aa3b5;animation:pdc-b 1.2s infinite ease-in-out}
.pdc-typing span:nth-child(2){animation-delay:.15s}.pdc-typing span:nth-child(3){animation-delay:.3s}
@keyframes pdc-b{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

.pdc-chips{display:flex;flex-wrap:wrap;gap:8px;padding:10px 16px 4px;background:var(--bg,#f7f8fa)}
.pdc-chips[hidden]{display:none}
.pdc-chip{min-height:36px;padding:0 12px;border:1.5px solid var(--line,#e4e7ee);border-radius:999px;background:#fff;color:var(--navy,#002060);font:600 .84rem var(--sans,system-ui,sans-serif);cursor:pointer}
.pdc-chip:hover{border-color:var(--navy,#002060)}

.pdc-input{display:flex;align-items:flex-end;gap:8px;padding:12px;border-top:1px solid var(--line,#e4e7ee);background:#fff}
.pdc-input textarea{flex:1;resize:none;min-height:44px;max-height:120px;padding:11px 12px;border:1px solid var(--line,#e4e7ee);border-radius:10px;font:inherit;font-size:.95rem;line-height:1.4;color:var(--ink,#1a1a2e)}
.pdc-input textarea:focus{outline:2px solid var(--navy,#002060);outline-offset:0;border-color:var(--navy,#002060)}
.pdc-send{width:44px;height:44px;flex:none;border:0;border-radius:10px;background:var(--red,#d7263d);color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.pdc-send:hover{background:#c01f35}
.pdc-send:disabled{opacity:.5;cursor:default}
.pdc-foot{margin:0;padding:0 12px 10px;background:#fff;font-size:.74rem;color:var(--muted,#5a6172);text-align:center}

.pdc-lead{margin-top:10px;display:flex;flex-direction:column;gap:4px}
.pdc-lead label{font-size:.82rem;font-weight:600;margin-top:6px;color:var(--ink,#1a1a2e)}
.pdc-lead input,.pdc-lead textarea{width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid var(--line,#e4e7ee);border-radius:8px;font:inherit;font-size:.92rem}
.pdc-lead input:focus,.pdc-lead textarea:focus{outline:2px solid var(--navy,#002060);outline-offset:0}
.pdc-submit{margin-top:10px;min-height:42px;border:0;border-radius:8px;background:var(--navy,#002060);color:#fff;font:600 .92rem var(--sans,system-ui,sans-serif);cursor:pointer}
.pdc-submit:disabled{opacity:.6}
.pdc-fine{margin:6px 0 0 !important;font-size:.74rem;color:var(--muted,#5a6172)}
.pdc-done{margin-top:10px !important;font-weight:600;color:var(--navy,#002060)}
.pdc-hp{position:absolute;left:-9999px;width:1px;height:1px}
.pdc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@media (max-width:520px){
  .pdc-launch{right:14px;bottom:14px;width:56px;height:56px;padding:0;justify-content:center}
  .pdc-launch span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .pdc-panel{right:0;left:0;bottom:0;width:100%;max-width:none;height:100%;max-height:100%;border-radius:0}
  .pdc-launch.is-open{display:none}
}
@media (prefers-reduced-motion:reduce){.pdc-typing span{animation:none;opacity:.7}.pdc-launch{transition:none}}
.pdc-foot a{color:var(--navy,#002060);text-decoration:underline}
