/* Dziko chat panel (opens from the orb). 2026-10-03 */
.dz-chat{
  --ink:#14161D; --ink2:#1D2029; --line:rgba(245,243,238,.09); --paper:#F5F3EE; --muted:#8E96AA; --signal:#F2451F;
  position:fixed; right:24px; bottom:108px; z-index:10000;
  width:380px; max-width:calc(100vw - 32px); height:560px; max-height:calc(100vh - 140px);
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--ink); color:var(--paper); border:1px solid var(--line); border-radius:18px;
  box-shadow:0 24px 60px rgba(20,22,29,.45), 0 0 0 1px rgba(242,69,31,.12);
  font-family:"IBM Plex Sans",system-ui,sans-serif; font-size:14.5px; line-height:1.5;
  opacity:0; transform:translateY(12px) scale(.98); transform-origin:bottom right;
  transition:opacity .2s ease, transform .2s ease;
}
.dz-chat[hidden]{display:none}
.dz-chat.is-open{opacity:1; transform:none}
.dz-chat *{box-sizing:border-box}

.dz-chat__head{display:flex; align-items:center; gap:10px; padding:14px 14px 12px 16px; border-bottom:1px solid var(--line)}
.dz-chat__title{display:flex; align-items:center; gap:10px; flex:1; min-width:0}
.dz-chat__dot{width:9px; height:9px; border-radius:50%; background:var(--signal); box-shadow:0 0 0 4px rgba(242,69,31,.18); flex:0 0 auto}
.dz-chat__title strong{display:block; font-family:"Space Grotesk",sans-serif; font-weight:600; font-size:15px; letter-spacing:-.01em}
.dz-chat__title small{display:block; font-family:"IBM Plex Mono",monospace; font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted)}
.dz-chat__book{font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--paper); text-decoration:none; border:1px solid rgba(242,69,31,.5); border-radius:999px; padding:7px 11px; white-space:nowrap; transition:background .2s,border-color .2s}
.dz-chat__book:hover,.dz-chat__book:focus-visible{background:var(--signal); border-color:var(--signal); color:#fff; outline:none}
.dz-chat__close{background:none; border:0; color:var(--muted); font-size:22px; line-height:1; width:32px; height:32px; border-radius:8px; cursor:pointer}
.dz-chat__close:hover,.dz-chat__close:focus-visible{color:var(--paper); background:var(--ink2); outline:none}

.dz-chat__log{flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; scroll-behavior:smooth; overscroll-behavior:contain}
.dz-chat__msg{max-width:85%; padding:10px 13px; border-radius:14px; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere}
.dz-chat__msg--bot{align-self:flex-start; background:var(--ink2); border:1px solid var(--line); border-bottom-left-radius:4px}
.dz-chat__msg--user{align-self:flex-end; background:var(--signal); color:#fff; border-bottom-right-radius:4px}
.dz-chat__msg--error{border-color:rgba(242,69,31,.45)}
.dz-chat__msg a{color:#FF8A66; text-decoration:underline; text-underline-offset:2px}
.dz-chat__msg--user a{color:#fff}
.dz-chat__typing{align-self:flex-start; display:flex; gap:4px; padding:12px 14px; background:var(--ink2); border:1px solid var(--line); border-radius:14px; border-bottom-left-radius:4px}
.dz-chat__typing span{width:6px; height:6px; border-radius:50%; background:var(--muted); animation:dzTyping 1.2s infinite ease-in-out}
.dz-chat__typing span:nth-child(2){animation-delay:.15s}
.dz-chat__typing span:nth-child(3){animation-delay:.3s}
@keyframes dzTyping{0%,80%,100%{opacity:.3; transform:translateY(0)} 40%{opacity:1; transform:translateY(-3px)}}

.dz-chat__form{display:flex; align-items:flex-end; gap:8px; padding:12px; border-top:1px solid var(--line)}
.dz-chat__form textarea{flex:1; resize:none; min-height:42px; max-height:120px; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background:var(--ink2); color:var(--paper); font:inherit; line-height:1.4}
.dz-chat__form textarea::placeholder{color:var(--muted)}
.dz-chat__form textarea:focus{outline:none; border-color:rgba(242,69,31,.6)}
.dz-chat__send{flex:0 0 42px; height:42px; border:0; border-radius:12px; background:var(--signal); color:#fff; cursor:pointer; display:grid; place-items:center; transition:background .2s, opacity .2s}
.dz-chat__send:hover{background:#D63B18}
.dz-chat__send:disabled{opacity:.45; cursor:default}
.dz-chat__send:focus-visible{outline:2px solid var(--paper); outline-offset:2px}
.dz-chat__send svg{width:18px; height:18px}
.dz-chat__note{margin:0; padding:0 14px 12px; font-size:11.5px; line-height:1.4; color:var(--muted)}
.dz-sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}

/* orb state while chat is open */
.dz-orb-cta.is-open .dz-orb-cta__label{opacity:0; pointer-events:none}

@media (max-width:600px){
  .dz-chat{inset:0; right:0; bottom:0; width:100%; max-width:none; height:100%; max-height:none; border-radius:0; border:0}
  .dz-orb-cta.is-open{display:none}
}
@media (prefers-reduced-motion:reduce){
  .dz-chat{transition:none}
  .dz-chat__typing span{animation:none; opacity:.7}
}
