/* Northline support chat: shared message pieces plus the customer widget */
.cm-img{display:block;padding:0;border:0;background:none;cursor:zoom-in;border-radius:12px;overflow:hidden;max-width:240px}
.cm-img img{display:block;width:100%;max-height:260px;object-fit:cover}
.cm-cap{margin-top:6px}
.vn{display:flex;align-items:center;gap:10px;min-width:210px}
.vn-play{flex:none;width:34px;height:34px;border-radius:50%;border:0;background:var(--lime);color:var(--forest);display:grid;place-items:center;cursor:pointer}
.vn .vn-i-pause{display:none}.vn.playing .vn-i-pause{display:inline}.vn.playing .vn-i-play{display:none}
.vn-wave{flex:1;display:flex;align-items:center;gap:2px;height:28px}
.vn-wave i{flex:1;min-width:2px;border-radius:2px;background:currentColor;opacity:.35;transition:opacity .15s}
.vn-wave i.on{opacity:1}
.vn-time{font-size:.74rem;font-variant-numeric:tabular-nums;opacity:.85;min-width:30px;text-align:right}
.vn audio{display:none}
.cm-lightbox{position:fixed;inset:0;z-index:300;background:rgba(11,15,12,.88);display:grid;place-items:center;padding:24px;cursor:zoom-out}
.cm-lightbox img{max-width:100%;max-height:100%;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.cm-lightbox button{position:absolute;top:18px;right:18px;width:44px;height:44px;border-radius:50%;border:0;background:#fff;font-size:1.6rem;line-height:1;cursor:pointer;color:var(--forest)}
.cm-rec{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:14px;background:var(--danger-soft,#FDECEA);color:#B42318;font-weight:600;font-size:.86rem}
.cm-rec .dot{width:10px;height:10px;border-radius:50%;background:#E5484D;animation:cmPulse 1s infinite}
.cm-rec .grow{flex:1}
.cm-rec button{border:0;background:#fff;border-radius:99px;height:32px;padding:0 12px;font:600 .8rem "Inter",sans-serif;cursor:pointer;color:var(--forest);display:inline-flex;align-items:center;gap:6px}
.cm-rec button.send{background:var(--forest);color:var(--lime)}
@keyframes cmPulse{50%{opacity:.3}}
.cm-tool{width:40px;height:40px;flex:none;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--forest);display:grid;place-items:center;cursor:pointer;position:relative}
.cm-tool:hover{background:var(--fog)}
.cm-tool input{position:absolute;inset:0;opacity:0;cursor:pointer}
.cm-seen{font-size:.68rem;color:var(--moss);text-align:right;margin-top:2px}

/* Customer widget */
.cw-btn{position:fixed;right:24px;bottom:24px;z-index:150;height:56px;padding:0 20px 0 16px;border-radius:99px;border:0;background:var(--forest);color:var(--lime);font:700 .92rem "Inter",sans-serif;display:flex;align-items:center;gap:10px;cursor:pointer;box-shadow:0 14px 36px rgba(15,61,30,.35);transition:transform .2s}
.cw-btn:hover{transform:translateY(-2px)}
.cw-btn .cw-badge{min-width:22px;height:22px;border-radius:99px;background:#E5484D;color:#fff;font-size:.72rem;display:grid;place-items:center;padding:0 6px}
.cw-btn .cw-badge:empty{display:none}
.cw-panel{padding:0;position:fixed;right:24px;bottom:92px;z-index:160;width:min(390px,calc(100vw - 32px));height:min(600px,calc(100vh - 120px));background:#fff;border-radius:24px;box-shadow:0 30px 80px rgba(11,15,12,.28);display:none;flex-direction:column;overflow:hidden;border:1px solid var(--line)}
.cw-panel.on{display:flex;animation:cwIn .25s ease}
@keyframes cwIn{from{opacity:0;transform:translateY(12px) scale(.98)}}
.cw-h{background:var(--forest);color:#fff;padding:16px 18px;display:flex;align-items:center;gap:12px}
.cw-av{width:40px;height:40px;border-radius:50%;background:var(--lime);color:var(--forest);display:grid;place-items:center;font-weight:800;flex:none;position:relative}
.cw-av::after{content:"";position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:#22C55E;border:2px solid var(--forest)}
.cw-h b{display:block;font-size:.98rem}
.cw-h span{font-size:.78rem;color:rgba(255,255,255,.75)}
.cw-x{margin-left:auto;width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.1);color:#fff;display:grid;place-items:center;cursor:pointer}
.cw-msgs{flex:1;overflow-y:auto;padding:16px;display:grid;gap:10px;align-content:start;background:#FBFBF9}
.cw-m{max-width:82%;display:grid;gap:3px}
.cw-m .bub{padding:10px 13px;border-radius:16px;font-size:.9rem;line-height:1.45;background:#fff;border:1px solid var(--line);word-break:break-word;white-space:pre-wrap}
.cw-m .bub p{margin:0}
.cw-m.me{justify-self:end}
.cw-m.me .bub{background:var(--forest);color:#fff;border-color:var(--forest);border-bottom-right-radius:4px}
.cw-m.me .vn-play{background:var(--lime)}
.cw-m.them .bub{border-bottom-left-radius:4px}
.cw-m .by{font-size:.68rem;color:var(--moss);font-weight:600}
.cw-m.me .by{text-align:right}
.cw-m.sys{justify-self:center;max-width:100%}
.cw-m.sys .bub{background:none;border:0;font-size:.74rem;color:var(--moss);padding:2px;text-align:center}
.cw-m .bub:has(.cm-img){padding:4px}
.cw-typing .bub{display:inline-flex;gap:4px;padding:12px}
.cw-typing .bub i{width:6px;height:6px;border-radius:50%;background:#9AA39C;animation:blink 1.2s infinite}
.cw-typing .bub i:nth-child(2){animation-delay:.2s}.cw-typing .bub i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
.cw-hello{background:var(--lime-2);border-radius:16px;padding:14px;font-size:.88rem;color:var(--forest)}
.cw-hello b{display:block;margin-bottom:2px}
.cw-f{border-top:1px solid var(--line);padding:10px;display:grid;gap:8px;background:#fff}
.cw-row{display:flex;gap:8px;align-items:flex-end}
.cw-row textarea{flex:1;min-height:40px;max-height:120px;height:40px;resize:none;border:1px solid var(--line);border-radius:12px;padding:9px 12px;font:500 .9rem "Inter",sans-serif;outline:0;line-height:1.35}
.cw-row textarea:focus{border-color:var(--green)}
.cw-send{width:40px;height:40px;flex:none;border-radius:12px;border:0;background:var(--forest);color:var(--lime);display:grid;place-items:center;cursor:pointer}
.cw-note{font-size:.7rem;color:var(--moss);text-align:center}
.cw-err{font-size:.78rem;color:#B42318;font-weight:600}
@media (max-width:900px){.cw-btn{bottom:96px;right:16px;height:52px}.cw-panel{right:8px;left:8px;width:auto;bottom:8px;top:8px;height:auto;z-index:170}}
@media (prefers-reduced-motion:reduce){.cw-panel.on{animation:none}.cm-rec .dot{animation:none}}
