/* v6.86 shared controls: transparent boxes, coloured strokes, equal footprints. */
.dl-actions .dl-chat-trigger,.dl-card-footer .dl-chat-trigger,.dl-actions a,.dl-card-footer .dl-card-whatsapp{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;padding:0!important;margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border:1px solid currentColor!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;color:#238451!important}
.dl-actions .dl-chat-trigger svg,.dl-card-footer .dl-chat-trigger svg,.dl-actions a svg,.dl-card-footer .dl-card-whatsapp svg{height:19px!important;width:19px!important;stroke:currentColor!important;stroke-width:1.8!important;color:inherit!important}
html[data-theme=dark] .dl-actions .dl-chat-trigger,html[data-theme=dark] .dl-card-footer .dl-chat-trigger,html[data-theme=dark] .dl-actions a,html[data-theme=dark] .dl-card-footer .dl-card-whatsapp{color:#8ce2ab!important;border-color:currentColor!important;background:transparent!important}
html[data-theme=dark] .dl-actions .dl-chat-trigger svg,html[data-theme=dark] .dl-card-footer .dl-chat-trigger svg,html[data-theme=dark] .dl-actions a svg,html[data-theme=dark] .dl-card-footer .dl-card-whatsapp svg{stroke:currentColor!important;color:inherit!important}
.dl-chat-trigger:focus-visible,.dl-card-whatsapp:focus-visible{outline:2px solid currentColor;outline-offset:3px}
/* Inline mention colour wins over inherited notification and card text colours. */
#notification-panel .v684-highlight,.notification-update-line .v684-highlight,.kanban-updates .kanban-update .v684-highlight,.deal-conversation .v684-highlight,.dl-chat-message .v684-highlight,.v684-editor .v684-mention{color:#d97706!important;font-weight:750!important;background:transparent!important;border:0!important;border-radius:0!important;padding:0!important}
html[data-theme=dark] #notification-panel .v684-highlight,html[data-theme=dark] .notification-update-line .v684-highlight,html[data-theme=dark] .kanban-updates .kanban-update .v684-highlight,html[data-theme=dark] .deal-conversation .v684-highlight,html[data-theme=dark] .dl-chat-message .v684-highlight,html[data-theme=dark] .v684-editor .v684-mention{color:#ffb15c!important}
.v683-mention-results[hidden]{display:none!important}.v683-mention-results{position:fixed!important;z-index:12060!important;margin:0!important;box-sizing:border-box;max-height:200px}
/* One fixed header, no scroll-driven morphs or target-triggered animations. */
#deal-sticky-mini{box-sizing:border-box;position:fixed!important;top:var(--deal-sticky-top,68px)!important;left:50%!important;width:min(calc(100% - 28px),1324px);height:52px!important;display:flex;align-items:center;gap:8px;padding:5px 10px;z-index:40;pointer-events:none!important;background:#edf0ff;border:1px solid #d8defa;border-radius:0 0 10px 10px;box-shadow:0 4px 12px #1d28551a;clip-path:none!important;transform:translate(-50%,-8px)!important;opacity:0!important;visibility:hidden!important;transition:transform 180ms ease,opacity 180ms ease,visibility 180ms!important}
#deal-sticky-mini.is-visible{transform:translate(-50%,0)!important;opacity:1!important;visibility:visible!important}
html[data-theme=dark] #deal-sticky-mini{background:#252e4a;border-color:#3a4774}
.deal-bubble-row:target .deal-bubble,.update-jump-flash,.v669-field-focus{animation:none!important;box-shadow:none!important}
.salesdesk-focus-once{outline:2px solid #6678dd!important;outline-offset:3px!important;animation:none!important;box-shadow:none!important}
@media(max-width:767px){#deal-sticky-mini{width:100%;border-radius:0;padding:5px 12px}.dl-mobile-card{padding:8px 10px!important;gap:4px!important}.dl-card-heading,.dl-card-detail,.dl-card-footer{margin:0!important;gap:5px!important}.dl-card-names{gap:1px!important}.dl-finish-line{padding:0!important;gap:5px!important}.dl-finish-line .finish-pill{font-size:10px;padding:2px 6px}.dl-card-footer .dl-priority,.dl-card-footer .dl-closing{padding:2px 7px!important;font-size:10px}.dl-mobile-cards{gap:7px!important}}
@media(prefers-reduced-motion:reduce){#deal-sticky-mini{transition:none!important}}
/* Same visible Share/Download/Delete controls in all attachment categories. */
.attachment-row .attachment-share-row,.attachment-row .attachment-download-row,.attachment-row .attachment-delete,#attachment-viewer.v686-viewer .attachment-viewer-actions>*{box-sizing:border-box!important;display:inline-grid!important;place-items:center!important;min-width:36px!important;width:36px!important;min-height:36px!important;height:36px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--white)!important;color:var(--ink)!important;opacity:1!important;line-height:1!important;flex:none!important}
.attachment-row .attachment-share-row svg,.attachment-row .attachment-download-row svg,.attachment-row .attachment-delete svg,#attachment-viewer.v686-viewer .attachment-viewer-actions svg{display:block!important;width:17px!important;height:17px!important;stroke:currentColor!important;color:inherit!important;opacity:1!important;visibility:visible!important}
html[data-theme=dark] .attachment-row .attachment-share-row,html[data-theme=dark] .attachment-row .attachment-download-row,html[data-theme=dark] #attachment-viewer.v686-viewer .attachment-viewer-actions>*{color:#e7edff!important;background:#252e42!important;border-color:#566381!important}
.attachment-row .attachment-delete,#attachment-viewer.v686-viewer #attachment-delete-shared{color:#bb4259!important}
html[data-theme=dark] .attachment-row .attachment-delete,html[data-theme=dark] #attachment-viewer.v686-viewer #attachment-delete-shared{color:#ffacbd!important}
html[data-theme=dark] .attachment-row .attachment-share-row svg,html[data-theme=dark] #attachment-viewer.v686-viewer .attachment-viewer-actions svg{stroke:currentColor!important}
/* Shared Edit Deal side pane geometry; Floating Chat uses the same pane beside its window. */
#attachment-viewer.v686-viewer[hidden]{display:none!important}
#attachment-viewer.v686-viewer{box-sizing:border-box!important;display:flex!important;flex-direction:column!important;background:var(--white)!important;color:var(--ink);border:1px solid var(--line)!important;border-radius:14px!important;overflow:hidden!important;box-shadow:0 12px 32px #183a2820!important;height:min(78dvh,800px)!important;min-width:0!important}
#attachment-viewer.v686-viewer .attachment-viewer-head{display:flex!important;gap:8px!important;align-items:center!important;padding:10px!important;min-height:58px!important;box-sizing:border-box!important;border-bottom:1px solid var(--line);background:var(--white)!important;flex:none}
#attachment-viewer.v686-viewer .attachment-viewer-head>strong{flex:1;min-width:0;font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#attachment-viewer.v686-viewer .attachment-viewer-actions{display:flex!important;gap:6px!important;flex:none!important;flex-wrap:nowrap!important}
#attachment-viewer.v686-viewer .attachment-preview{position:relative!important;flex:1!important;height:auto!important;min-height:0!important;padding:8px!important;overflow:hidden!important;display:block!important}
#attachment-media{width:100%;height:100%;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;touch-action:none;user-select:none}
#attachment-media img{display:block;flex:none;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;transform-origin:center;user-select:none;-webkit-user-drag:none;transition:none;will-change:transform}
#attachment-media img.v686-incoming{position:absolute;inset:0;margin:auto}
#attachment-media iframe{width:100%;height:100%;border:0}
#attachment-viewer.v686-viewer .gallery-arrow{position:absolute!important;top:50%!important;transform:translateY(-50%)!important;z-index:4!important;width:34px!important;height:42px!important;border:0!important;border-radius:10px!important;display:grid!important;place-items:center!important;padding:0!important;background:#121b2ab3!important;color:#fff!important;cursor:pointer}
#attachment-viewer.v686-viewer .gallery-prev{left:8px!important}#attachment-viewer.v686-viewer .gallery-next{right:8px!important}
#attachment-viewer.v686-viewer .gallery-arrow[hidden],#attachment-viewer.v686-viewer .v686-image-count[hidden],#attachment-viewer.v686-viewer .attachment-viewer-actions>[hidden]{display:none!important}
#attachment-viewer.v686-viewer .gallery-arrow svg{stroke:currentColor!important;display:block!important}
.v686-image-count{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);padding:3px 7px;border-radius:8px;font-size:10px;color:white;background:#121b2a99;pointer-events:none}
@media(min-width:1000px){.deal-editor-layout>#attachment-viewer.v686-viewer.is-open{position:relative!important;margin-top:var(--attachment-section-offset,0px)!important;inset:auto!important;transform:none!important}}
@media(min-width:1100px){body.v686-chat-viewer-open .dl-chat-window{margin-right:466px;width:570px;max-width:calc(100vw - 506px)}#attachment-viewer.v686-chat-viewer.is-open{position:fixed!important;inset:auto!important;left:var(--viewer-left)!important;top:var(--viewer-top)!important;width:min(450px,calc(100vw - var(--viewer-left) - 16px))!important;height:min(78dvh,800px)!important;margin:0!important;z-index:12020!important;transform:none!important}}
@media(max-width:1099px){#attachment-viewer.v686-chat-viewer.is-open{position:fixed!important;inset:auto 12px 12px 12px!important;width:auto!important;height:min(76dvh,720px)!important;margin:0!important;z-index:12020!important;transform:none!important}}
@media(max-width:999px){#attachment-viewer.v686-viewer.is-open{position:fixed!important;inset:auto 12px 12px 12px!important;width:auto!important;height:min(76dvh,720px)!important;max-height:calc(100dvh - 24px)!important;margin:0!important;z-index:12020!important;transform:none!important}}
@media(max-width:420px){#attachment-viewer.v686-viewer .attachment-viewer-actions{gap:4px!important}#attachment-viewer.v686-viewer .attachment-viewer-actions>*{width:32px!important;min-width:32px!important;height:34px!important;min-height:34px!important}.dl-chat-bubble{max-width:94%}}
html[data-theme=dark] .stage-section label{color:var(--ink)!important}

/* Match category rows despite earlier id-scoped category styling. */
#attachments .attachment-row .attachment-share-row,#attachments .attachment-row .attachment-download-row,#attachments .attachment-row .attachment-delete,.document-column .attachment-row>.attachment-share-row,.document-column .attachment-row>.attachment-download-row,.document-column .attachment-row>.attachment-delete{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--white)!important;color:var(--ink)!important}
html[data-theme=dark] #attachments .attachment-row .attachment-share-row,html[data-theme=dark] #attachments .attachment-row .attachment-download-row,html[data-theme=dark] .document-column .attachment-row>.attachment-share-row,html[data-theme=dark] .document-column .attachment-row>.attachment-download-row{color:#e7edff!important;background:#252e42!important;border:1px solid #566381!important}
#attachments .attachment-row .attachment-delete,.document-column .attachment-row>.attachment-delete{color:#bb4259!important}html[data-theme=dark] #attachments .attachment-row .attachment-delete,html[data-theme=dark] .document-column .attachment-row>.attachment-delete{color:#ffacbd!important;background:#252e42!important;border:1px solid #566381!important}
#updates:target{outline:none!important}
/* Explicit ids neutralize legacy Share-only rules; every viewer action matches. */
#attachment-viewer.v686-viewer :is(#attachment-share,#attachment-download,#attachment-delete-shared,#close-attachment-viewer){display:inline-grid!important;place-items:center!important;width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;line-height:1!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--white)!important;color:var(--ink)!important}
html[data-theme=dark] #attachment-viewer.v686-viewer :is(#attachment-share,#attachment-download,#attachment-delete-shared,#close-attachment-viewer){background:#252e42!important;color:#e7edff!important;border:1px solid #566381!important}
#attachment-viewer.v686-viewer :is(#attachment-share,#attachment-download,#attachment-delete-shared,#close-attachment-viewer) svg{width:17px!important;height:17px!important;stroke:currentColor!important;opacity:1!important;visibility:visible!important}
html[data-theme=dark] #attachment-viewer.v686-viewer :is(#attachment-share,#attachment-download,#attachment-delete-shared,#close-attachment-viewer) svg{stroke:currentColor!important}
#attachment-viewer.v686-viewer #attachment-delete-shared{color:#bb4259!important}html[data-theme=dark] #attachment-viewer.v686-viewer #attachment-delete-shared{color:#ffacbd!important}
@media(max-width:420px){#attachment-viewer.v686-viewer :is(#attachment-share,#attachment-download,#attachment-delete-shared,#close-attachment-viewer){width:32px!important;min-width:32px!important;height:34px!important;min-height:34px!important}}
/* v6.87: visualViewport excludes the keyboard even when 100dvh does not. */
#dl-chat-modal.dl-chat-modal{inset:auto 0 auto 0!important;top:var(--chat-visible-top,0px)!important;height:var(--chat-visible-height,100dvh)!important;max-height:var(--chat-visible-height,100dvh)!important;overflow:hidden!important}
#dl-chat-modal .dl-chat-window{height:min(790px,calc(var(--chat-visible-height,100dvh) - 24px))!important;max-height:100%!important;min-height:0!important}
#dl-chat-modal .dl-chat-head,#dl-chat-modal .dl-chat-compose{flex-shrink:0!important}
#dl-chat-modal .dl-chat-history{flex:1 1 0!important;min-height:0!important;overflow-y:auto!important}
#dl-chat-modal .dl-chat-compose{padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
#dl-chat-modal .dl-chat-controls .v684-editor{box-sizing:border-box;min-height:38px;max-height:min(115px,calc(var(--chat-visible-height,100dvh) * .25))!important;overflow-y:auto!important}
@media(max-width:720px){#dl-chat-modal .dl-chat-window{width:100%;height:var(--chat-visible-height,100dvh)!important;max-height:100%!important;border-radius:0!important}}

/* v6.88: navigation and its popovers must stay above the slim deal header. */
body>.topbar{z-index:100!important;overflow:visible!important}
#notification-panel{z-index:110!important}
#deal-sticky-mini{z-index:40!important}
body>.v683-mention-results{z-index:12060!important;overflow-y:auto!important;color:var(--ink)!important;background:var(--white)!important}
/* v6.90: full-width equal actions on each pipeline card, using Deal List styling. */
.pipeline-card .pipeline-chat-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:6px!important;width:100%;margin-top:8px}
.pipeline-card .pipeline-chat-actions .dl-chat-trigger,.pipeline-card .pipeline-chat-actions .pipeline-whatsapp{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;min-width:0!important;height:auto!important;min-height:40px!important;padding:6px 4px!important;border:1px solid currentColor!important;border-radius:8px!important;background:transparent!important;color:#238451!important;box-shadow:none!important;text-decoration:none;font:inherit;font-size:10px!important;line-height:1.2!important;cursor:pointer}
.pipeline-card .pipeline-chat-actions svg{flex:none;width:17px!important;height:17px!important;stroke:currentColor!important;color:inherit!important;stroke-width:1.8!important}
.pipeline-card .pipeline-chat-actions span{min-width:0;text-align:center;overflow-wrap:normal}
html[data-theme=dark] .pipeline-card .pipeline-chat-actions .dl-chat-trigger,html[data-theme=dark] .pipeline-card .pipeline-chat-actions .pipeline-whatsapp{color:#8ce2ab!important;border-color:currentColor!important;background:transparent!important}
.pipeline-card .pipeline-chat-actions .pipeline-whatsapp:disabled{opacity:.45;cursor:default}
a.dl-chat-bubble{color:inherit;text-decoration:none;cursor:pointer}
a.dl-chat-bubble:focus-visible{outline:2px solid #6678dd;outline-offset:3px}
