/* Serpworks Chat V2 — presentation only. All selectors stay within this dashboard. */
.dashboard-secstion.chat-section:has(.sw-chat-v2) { border: 1px solid #e9e5f3; border-radius: 20px; background: #fff; box-shadow: 0 15px 45px rgba(52,33,95,.055); overflow: hidden; }
.page-heading.chats .sw-chat-heading-icon { display: inline-flex; margin-right: 12px; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 14px; background: #f1e9ff; color: #7c3aed; font-size: 23px; vertical-align: middle; }
.sw-chat-v2 { --sw-purple:#7c3aed; --sw-ink:#211b32; --sw-muted:#79758a; --sw-line:#eae6f2; --sw-lavender:#f4efff; --sw-light:#faf8ff; display:grid!important; grid-template-columns:minmax(260px, 310px) minmax(0, 1fr); width:100%; max-width:100%; margin:0!important; padding:0!important; min-height:0; height:clamp(480px,calc(100dvh - 28px),860px); color:var(--sw-ink); background:#fff; font-family:inherit; position:relative; overflow:hidden; border-radius:18px; }
.sw-chat-v2 *, .sw-chat-v2 *:before,.sw-chat-v2 *:after { box-sizing:border-box; }
.sw-chat-v2 button, .sw-chat-v2 input, .sw-chat-v2 textarea { font-family:inherit; }
.sw-chat-v2 button { cursor:pointer; }
.sw-chat-v2 .chat-sidebar { padding:0!important; margin:0!important; width:auto!important; max-width:none!important; flex:none!important; min-width:0; background:#fff; border-right:1px solid var(--sw-line); display:flex; flex-direction:column; height:100%; overflow:hidden; }
.sw-chat-v2 .sw-sidebar-head { display:flex; align-items:center; gap:9px; padding:25px 19px 13px; }
.sw-chat-v2 .sw-sidebar-title { font-size:17px; font-weight:750; letter-spacing:-.35px; }
.sw-chat-v2 .sw-thread-count { font-size:12px; font-weight:700; color:var(--sw-purple); background:#f0e8ff; padding:3px 8px; border-radius:30px; }
.sw-chat-v2 #form-search-conversation { position:relative; padding:3px 15px 12px!important; margin:0!important; }
.sw-chat-v2 #form-search-conversation .sw-search-icon { position:absolute; left:29px; top:14px; color:#817e90; pointer-events:none; font-size:23px; line-height:1; }
.sw-chat-v2 #form-search-conversation input { display:block; width:100%; height:43px; padding:8px 12px 8px 39px; font-size:14px; line-height:1.3; color:var(--sw-ink); background:#fbfaff; border:1px solid #e6e0ee; outline:0; box-shadow:none; border-radius:11px; }
.sw-chat-v2 #form-search-conversation input:focus { border-color:#ae89fa; box-shadow:0 0 0 3px rgba(124,58,237,.09); }
.sw-chat-v2 .sw-chat-filters { display:flex; gap:8px; padding:0 15px 13px; border-bottom:1px solid var(--sw-line); }
.sw-chat-v2 .sw-filter { border:0!important; border-radius:10px!important; background:transparent!important; box-shadow:none!important; padding:9px 12px!important; color:#655f76!important; font-size:13px; font-weight:650; line-height:1.3; min-width:0; }
.sw-chat-v2 .sw-filter.is-active { color:var(--sw-purple)!important; background:#f0e8ff!important; }
.sw-chat-v2 .sw-unread-total { display:inline-block; padding:1px 7px; border-radius:12px; background:#7c3aed; color:#fff; font-size:11px; margin-left:3px; }
.sw-chat-v2 ul.sw-conversation-list { list-style:none; padding:7px 8px 18px; margin:0; overflow-y:auto; flex:1; min-height:0; scrollbar-width:thin; scrollbar-color:#e3d9f4 transparent; }
.sw-chat-v2 ul.sw-conversation-list>li { margin:3px 0; list-style:none; }
.sw-chat-v2 .chat-sidebar .chat-item { display:flex!important; gap:11px; align-items:center; text-decoration:none; padding:13px 10px!important; border:0!important; border-radius:13px; background:transparent!important; color:var(--sw-ink); transition:background-color .15s ease; }
.sw-chat-v2 .chat-sidebar .chat-item:hover { background:#f7f3fe!important; }
.sw-chat-v2 .chat-sidebar .chat-item.active { background:#eee5fd!important; }
.sw-chat-v2 .chat-sidebar .chat-item .chat-content { display:block!important; padding:0!important; width:calc(100% - 60px)!important; max-width:calc(100% - 60px)!important; min-width:0; }
.sw-chat-v2 .chat-sidebar .chat-avatar { position:relative; width:50px!important; min-width:50px!important; height:50px!important; flex:0 0 50px; }
.sw-chat-v2 .chat-avatar img, .sw-chat-v2 .sw-room-avatar img, .sw-chat-v2 .sw-profile-avatar img { width:100%; height:100%; display:block; object-fit:cover; border-radius:50%; }
.sw-chat-v2 .sw-avatar-fallback { background:linear-gradient(140deg,#a475f1,#6333bb); color:white; width:100%; height:100%; display:flex; align-items:center; justify-content:center; border-radius:50%; font-size:18px; font-weight:750; }
.sw-chat-v2 .chat-sidebar .chat-avatar:after { width:11px!important; height:11px!important; right:2px!important; bottom:2px!important; border:2px solid #fff!important; background:#b5b3bf!important; }
.sw-chat-v2 .chat-sidebar .chat-avatar.active:after { background:#24b968!important; }
.sw-chat-v2 .sw-conversation-main, .sw-chat-v2 .sw-conversation-preview { display:flex; min-width:0; align-items:baseline; justify-content:space-between; gap:7px; }
.sw-chat-v2 .sw-conversation-main .name { font-size:14px; line-height:1.35; min-width:0; font-weight:740; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sw-chat-v2 .sw-conversation-main .time { color:var(--sw-muted); font-size:11px; white-space:nowrap; flex:none; }
.sw-chat-v2 .sw-conversation-preview { margin-top:5px; align-items:center; }
.sw-chat-v2 .sw-conversation-preview .content-short { font-size:12.5px; color:#706c7c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; min-width:0; font-weight:450!important; max-width:none!important; }
.sw-chat-v2 .sw-conversation-preview .count { font-size:11px; flex:none; font-weight:750; color:#fff; background:var(--sw-purple)!important; border-radius:20px; padding:0 6px; min-width:19px; height:19px; line-height:19px; text-align:center; }
.sw-chat-v2 .sw-conversation-attachment { display:inline-block; margin-top:3px; color:#6c42bd; font-size:11px; }
.sw-chat-v2 .sw-filter-empty { margin:16px 12px; font-size:13px; color:var(--sw-muted); }
.sw-chat-v2 .sw-filter-empty[hidden],.sw-chat-v2 .sw-conversation-list>li[hidden] { display:none!important; }
.sw-chat-v2>.chat-content { margin:0!important; padding:0!important; width:100%!important; max-width:100%!important; min-width:0; height:100%; flex:none!important; overflow:hidden; }
.sw-chat-v2 .sw-chat-room { height:100%; min-height:0; display:flex; flex-direction:column; background:#fff; }
.sw-chat-v2 .chat-info-top.sw-room-head { height:79px; min-height:79px; display:flex; align-items:center; gap:12px; padding:12px 17px!important; background:#fff; border-bottom:1px solid var(--sw-line); }
.sw-chat-v2 .sw-room-avatar { flex:0 0 45px; width:45px; height:45px; }
.sw-chat-v2 .sw-room-avatar .sw-avatar-fallback { font-size:16px; }
.sw-chat-v2 .sw-room-identity { min-width:0; flex:1; }
.sw-chat-v2 .sw-room-name { font-size:16px; font-weight:760; letter-spacing:-.3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sw-chat-v2 .sw-room-presence { display:flex; gap:6px; align-items:center; font-size:12px; color:var(--sw-muted); margin-top:4px; }
.sw-chat-v2 .sw-status-dot { width:8px; height:8px; background:#aaa5b3; border-radius:50%; }
.sw-chat-v2 .sw-status-dot.is-online { background:#20bb6a; }
.sw-chat-v2 .sw-chat-back { display:none; }
.sw-chat-v2 .sw-chat-info-toggle,.sw-chat-v2 .sw-panel-close { display:flex; justify-content:center; align-items:center; border:1px solid #e8e2f1!important; background:#fff!important; color:#74638e!important; width:36px; height:36px; line-height:1; border-radius:10px!important; font-size:20px; padding:0!important; box-shadow:none!important; }
.sw-chat-v2 .sw-chat-info-toggle { display:none; }
.sw-chat-v2 .chat-info.row.sw-room-body { margin:0!important; padding:0!important; flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(195px, 238px); }
.sw-chat-v2 .sw-message-column { margin:0!important; width:auto!important; max-width:none!important; min-width:0; min-height:0!important; flex:none!important; padding:0!important; border-right:1px solid var(--sw-line)!important; display:flex!important; flex-direction:column!important; justify-content:normal!important; position:relative; }
.sw-chat-v2 .chat-list { flex:1; min-height:0; height:100%; max-height:none!important; width:100%; overflow-x:hidden; overflow-y:auto; overscroll-behavior-y:auto; display:flex; flex-direction:column-reverse; gap:3px; padding:23px 18px 24px; scrollbar-width:thin; scrollbar-color:#dfd4ed transparent; background:radial-gradient(ellipse at 75% 10%,rgba(242,235,255,.22),transparent 50%); }
.sw-chat-v2 .chat-list .chat-item.sw-message { display:flex; gap:9px; flex-shrink:0; padding:8px 0!important; border:0!important; align-items:flex-end; }
.sw-chat-v2 .sw-message.is-mine { justify-content:flex-start; flex-direction:row-reverse; }
.sw-chat-v2 .chat-list .chat-avatar { width:33px!important; min-width:33px!important; height:33px!important; flex:0 0 33px; margin-bottom:21px; }
.sw-chat-v2 .chat-list .sw-message-content { max-width:min(85%,450px)!important; width:auto!important; padding:0!important; min-width:0; display:flex; flex-direction:column; align-items:flex-start; }
.sw-chat-v2 .chat-list .sw-message.is-mine .sw-message-content { align-items:flex-end; }
.sw-chat-v2 .chat-list .chat-mess { display:block; background:#f4f1fa; color:#302843; padding:12px 14px; border-radius:15px 15px 15px 5px; font-size:16px; line-height:1.56; margin:0!important; min-width:35px; max-width:100%; overflow-wrap:anywhere; word-break:normal; }
.sw-chat-v2 .chat-list .is-mine .chat-mess { background:#ebe2ff; border-radius:15px 15px 5px 15px; color:#2c2044; }
.sw-chat-v2 .chat-list .chat-mess p { margin:0 0 6px; font-size:inherit; line-height:inherit; }
.sw-chat-v2 .chat-list .chat-mess p:last-child { margin-bottom:0; }
.sw-chat-v2 .chat-list .sw-message-time { color:#928b9c; font-size:10.5px; margin-top:4px; padding:0 3px; line-height:1.2; }
.sw-chat-v2 .chat-list .sw-message-files { display:flex; flex-wrap:wrap; gap:7px; margin-top:7px; max-width:100%; }
.sw-chat-v2 .chat-list .sw-message-files a { display:inline-flex; align-items:center; gap:6px; border:1px solid #e8dff9; color:#5d39a4; background:#fff; border-radius:11px; padding:8px 10px; font-size:12px; max-width:100%; overflow-wrap:anywhere; text-decoration:none; box-shadow:0 2px 6px rgba(57,29,88,.035); }
.sw-chat-v2 .sw-composer { margin:0!important; padding:11px 15px 14px; border-top:1px solid var(--sw-line); background:#fff; flex:none; }
.sw-chat-v2 .sw-composer .jws-form-chat { margin:0!important; border:1px solid #e3dced; border-radius:15px; display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; align-items:center; padding:7px 9px 7px 13px; gap:0 8px; min-width:0; }
.sw-chat-v2 .sw-composer .form-field { margin:0!important; padding:0!important; }
.sw-chat-v2 .sw-composer .sw-composer-field { grid-column:1 / -1; }
.sw-chat-v2 .sw-composer textarea { min-height:33px!important; max-height:115px!important; width:100%!important; resize:none; padding:8px 0 0!important; margin:0!important; background:transparent!important; border:0!important; outline:0!important; box-shadow:none!important; font-size:16px!important; color:var(--sw-ink)!important; line-height:1.5!important; }
.sw-chat-v2 .sw-composer textarea::placeholder { color:#9b95a8; }
.sw-chat-v2 .sw-composer .sw-composer-actions { grid-column:1 / -1; display:flex!important; align-items:center!important; justify-content:space-between!important; margin:0!important; gap:10px; }
.sw-chat-v2 .sw-composer .attachments-field { display:flex; flex-direction:column; min-width:0; max-width:calc(100% - 95px); }
.sw-chat-v2 .sw-composer .sw-attach-btn { width:32px; height:30px; border:0!important; background:transparent!important; padding:4px!important; color:#726d7e!important; font-size:20px!important; text-align:left!important; }
.sw-chat-v2 .sw-composer .attachments-list { margin:0!important; padding:0!important; display:flex; gap:5px; flex-wrap:wrap; list-style:none; }
.sw-chat-v2 .sw-composer .attachments-list .image { list-style:none; border-radius:8px; padding:5px; background:#f4efff; font-size:12px; }
.sw-chat-v2 .sw-composer .attachments-list img { width:35px; height:35px; object-fit:cover; }
.sw-chat-v2 .sw-composer .attachments-list .file-size { display:none; }
.sw-chat-v2 .sw-composer .sw-chat-send { display:inline-flex!important; align-items:center; gap:6px; justify-content:center; background:linear-gradient(135deg,#8c46f9,#6427cb)!important; color:#fff!important; border:0!important; border-radius:10px!important; padding:9px 14px!important; margin:0!important; box-shadow:0 5px 12px rgba(124,58,237,.20)!important; min-width:75px!important; font-size:13px; font-weight:700; }
.sw-chat-v2 .sw-composer .sw-chat-send:hover { filter:brightness(1.05); }
.sw-chat-v2 .sw-composer form.loading .sw-chat-send { opacity:.65; pointer-events:none; }
.sw-chat-v2 .sw-profile-panel { width:auto!important; max-width:none!important; min-width:0; margin:0!important; padding:20px 15px!important; flex:none!important; background:#fff; position:relative; overflow-y:auto; }
.sw-chat-v2 .sw-profile-center { display:flex; flex-direction:column; align-items:center; text-align:center; padding:11px 0 17px; }
.sw-chat-v2 .sw-profile-avatar { width:86px; height:86px; }
.sw-chat-v2 .sw-profile-avatar .sw-avatar-fallback { font-size:28px; }
.sw-chat-v2 .sw-profile-center h3 { font-size:17px; font-weight:760; margin:12px 0 7px; line-height:1.3; overflow-wrap:anywhere; letter-spacing:-.3px; }
.sw-chat-v2 .sw-role-tag { color:#7540d6; background:#f1eaff; padding:5px 12px; border-radius:25px; font-weight:700; font-size:12px; }
.sw-chat-v2 .sw-profile-link { text-decoration:none; display:block; width:100%; border:1px solid #d8c8ed; border-radius:10px; padding:10px 8px; text-align:center; font-size:13px; color:#55348d; font-weight:700; margin-top:18px; }
.sw-chat-v2 .sw-profile-link:hover { background:#f5efff; color:#5126a3; }
.sw-chat-v2 .sw-profile-detail { display:flex; justify-content:space-between; padding:15px 0; gap:8px; font-size:12px; border-block:1px solid var(--sw-line); }
.sw-chat-v2 .sw-profile-detail span { color:var(--sw-muted); }
.sw-chat-v2 .sw-profile-detail strong { font-weight:650; }
.sw-chat-v2 .sw-profile-description { color:#767081; font-size:12px; line-height:1.6; margin:15px 0 0; }
.sw-chat-v2 .sw-shared-files { margin-top:22px; border-top:1px solid var(--sw-line); padding-top:18px; }
.sw-chat-v2 .sw-shared-files h4 { font-size:14px; font-weight:760; margin:0 0 12px; }
.sw-chat-v2 .sw-file-pill { display:flex; align-items:center; gap:7px; width:100%; padding:8px; border:1px solid #ebe6f3; border-radius:11px; margin:7px 0; color:#322d3d; text-decoration:none; }
.sw-chat-v2 .sw-file-pill:hover { background:#faf7ff; }
.sw-chat-v2 .sw-file-icon { display:flex; justify-content:center; align-items:center; font-size:9px; font-weight:750; background:#eee4ff; border-radius:6px; color:#6b39be; min-width:34px; height:32px; }
.sw-chat-v2 .sw-file-label { flex:1; min-width:0; font-size:12px; overflow-wrap:anywhere; }
.sw-chat-v2 .sw-file-arrow { color:#7042bd; font-size:17px; }
.sw-chat-v2 .sw-panel-empty { font-size:12px; color:var(--sw-muted); }
.sw-chat-v2 .sw-panel-close { display:none; position:absolute; right:12px; top:12px; z-index:2; }
.sw-chat-v2 .sw-chat-empty { display:flex; justify-content:center; align-items:center; flex-direction:column; text-align:center; height:100%; gap:8px; padding:30px; }
.sw-chat-v2 .sw-chat-empty span { display:grid; place-items:center; background:#f0e8ff; width:66px; height:66px; border-radius:20px; color:var(--sw-purple); font-size:30px; }
.sw-chat-v2 .sw-chat-empty h3 { margin:0; font-size:19px; }
.sw-chat-v2 .sw-chat-empty p { margin:0; color:var(--sw-muted); font-size:14px; }
.sw-chat-v2 .loader { z-index:3; }
.sw-chat-v2.loading > .chat-content { opacity:.55; pointer-events:none; }
@media (max-width:1350px) {
  .sw-chat-v2 { grid-template-columns:minmax(245px,285px) minmax(0,1fr); }
  .sw-chat-v2 .chat-info.row.sw-room-body { grid-template-columns:minmax(0,1fr) 205px; }
}
@media (max-width:1180px) and (min-width:781px) {
  .sw-chat-v2 .chat-info.row.sw-room-body { grid-template-columns:minmax(0,1fr); }
  .sw-chat-v2 .sw-chat-info-toggle { display:flex; }
  .sw-chat-v2 .sw-profile-panel { display:none; }
  .sw-chat-v2.sw-show-details .sw-profile-panel { display:block; position:absolute; z-index:10; top:79px; bottom:0; right:0; width:min(310px,95%)!important; background:#fff; box-shadow:-15px 0 35px rgba(40,20,80,.12); border-left:1px solid var(--sw-line); }
  .sw-chat-v2.sw-show-details .sw-panel-close { display:flex; }
}
@media (max-width:780px) {
 .dashboard-secstion.chat-section:has(.sw-chat-v2) { border-radius:15px; }
 .sw-chat-v2 { display:block!important; width:100%; height:calc(var(--sw-visible-viewport,100dvh) - 12px); min-height:0; border-radius:14px; }
 .sw-chat-v2 .chat-sidebar { display:flex; width:100%!important; border-right:0; }
 .sw-chat-v2>.chat-content { display:none; }
 .sw-chat-v2.sw-chat-open>.chat-content, .sw-chat-v2.sw-chat-direct>.chat-content { display:block; }
 .sw-chat-v2.sw-chat-open>.chat-sidebar, .sw-chat-v2.sw-chat-direct>.chat-sidebar { display:none; }
 .sw-chat-v2 .chat-info.row.sw-room-body { display:flex; flex-direction:column; height:calc(100% - 68px); }
 .sw-chat-v2 .chat-info-top.sw-room-head { height:68px; min-height:68px; padding:9px 12px!important; gap:9px; }
 .sw-chat-v2 .sw-chat-back { display:flex; width:32px; height:36px; justify-content:center; align-items:center; color:#3a334a; font-size:24px; background:none!important; padding:0!important; border:0!important; }
 .sw-chat-v2 .sw-chat-info-toggle { display:flex; }
 .sw-chat-v2 .sw-room-name { font-size:15px; }
 .sw-chat-v2 .sw-room-avatar { flex-basis:40px; width:40px; height:40px; }
 .sw-chat-v2 .sw-message-column { width:100%!important; height:100%; border:0!important; }
 .sw-chat-v2 .chat-list { padding:14px 12px 18px; }
 .sw-chat-v2 .chat-list .chat-mess { font-size:16px; }
 .sw-chat-v2 .sw-composer { padding:9px 10px max(9px,env(safe-area-inset-bottom)); }
 .sw-chat-v2 .sw-profile-panel { display:none; }
 .sw-chat-v2.sw-show-details .sw-profile-panel { display:block; position:absolute; top:0; right:0; bottom:0; z-index:11; width:100%!important; max-width:none!important; overflow-y:auto; padding:36px 25px!important; background:#fff; }
 .sw-chat-v2.sw-show-details .sw-panel-close { display:flex; }
 .sw-chat-v2 .sw-profile-avatar { width:104px; height:104px; }
 .sw-chat-v2 .sw-profile-center { padding-top:40px; }
 .sw-chat-v2 .chat-sidebar .chat-item { padding:14px 13px!important; }
 .sw-chat-v2 .sw-sidebar-head { padding:19px 17px 12px; }
 .sw-chat-v2 .sw-room-body { overflow:hidden; }
}
@media (max-width:400px) {
 .sw-chat-v2 .chat-sidebar .chat-avatar { width:44px!important; min-width:44px!important; flex-basis:44px; height:44px!important; }
 .sw-chat-v2 .sw-conversation-main .name { font-size:13px; }
 .sw-chat-v2 .sw-conversation-main .time { font-size:10px; }
 .sw-chat-v2 .chat-list .sw-message-content { max-width:88%!important; }
}
@media (prefers-reduced-motion:reduce) { .sw-chat-v2 * { transition:none!important; animation-duration:.01ms!important; } }


/* ===============================================================
   SERPWORKS CHAT V2.1 — targeted UX corrections
   Preserve existing AJAX forms, attachments, tables & notifications.
   =============================================================== */
/* When the page is scrolled, keep the chat in view instead of leaving a
   tall blank region and the composer below the fold. Sticky only on chat. */
.dashboard-secstion.chat-section:has(> .sw-chat-v2) {
    position: sticky;
    top: 12px;
    z-index: 8;
    overflow: clip;
    isolation: isolate;
    width: 100%;
    max-width: 100%;
}
/* Page and message pane should share scroll momentum at the boundary.
   No overscroll contain: wheel/touch continues naturally into page. */
.sw-chat-v2 .chat-list,
.sw-chat-v2 ul.sw-conversation-list {
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch;
}
/* The site theme applies general purpose button dimensions, dark backgrounds
   and minimum widths. Defend our three icons on ALL breakpoints. */
.sw-chat-v2 button.sw-chat-ui-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    position: relative;
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #f7f2ff !important;
    background-image: none !important;
    color: #6440a5 !important;
    border: 1px solid #e6daf8 !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    outline-offset: 3px;
    text-align: center !important;
    font-size: 16px !important;
    line-height: 1 !important;
    transform: none !important;
    opacity: 1 !important;
    cursor: pointer;
}
.sw-chat-v2 button.sw-chat-ui-btn svg {
    display: block !important;
    flex: 0 0 auto !important;
    width: 19px !important;
    height: 19px !important;
    pointer-events: none;
    fill: none;
}
.sw-chat-v2 button.sw-chat-ui-btn:hover {
    background: #ede4ff !important;
    color: #5329a9 !important;
    border-color: #d5befb !important;
}
.sw-chat-v2 button.sw-chat-ui-btn:focus-visible {
    outline: 2px solid #7c3aed !important;
}
/* Desktop: no misleading back button, but info always has a real action. */
.sw-chat-v2 button.sw-chat-back.sw-chat-ui-btn { display: none !important; }
.sw-chat-v2 button.sw-chat-info-toggle.sw-chat-ui-btn { display: inline-flex !important; }
.sw-chat-v2 button.sw-panel-close.sw-chat-ui-btn {
    display: inline-flex !important;
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 14;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex-basis: 32px !important;
    border-radius: 9px !important;
}
.sw-chat-v2 .sw-room-head { overflow: hidden; min-width: 0; }
.sw-chat-v2 .sw-room-identity { overflow: hidden; }
.sw-chat-v2 .sw-profile-panel { min-width: 0; }
.sw-chat-v2 .sw-profile-center { padding-top: 30px; }
/* Full desktop details toggle actually collapses its column. */
@media (min-width: 1181px) {
    .sw-chat-v2.sw-details-hidden .chat-info.row.sw-room-body {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .sw-chat-v2.sw-details-hidden .sw-profile-panel { display: none !important; }
    .sw-chat-v2:not(.sw-details-hidden) .sw-profile-panel { display: block; }
}
/* Drawer on medium screens. Clicking info opens it, X really closes it. */
@media (min-width: 781px) and (max-width: 1180px) {
    .sw-chat-v2.sw-show-details .sw-profile-panel {
        overflow-y: auto;
        overscroll-behavior-y: auto;
    }
}
/* Mobile: dedicate the available viewport to chat, show the composer and
   preserve full-width header elements without theme button interference. */
@media (max-width: 780px) {
    .page-heading.chats { padding: 0 !important; margin: 0 0 14px !important; }
    .page-heading.chats h4 {
        display: flex !important;
        align-items: center;
        gap: 9px;
        margin: 0 0 5px !important;
        font-size: clamp(21px, 5.5vw, 26px) !important;
        font-weight: 750 !important;
        line-height: 1.2 !important;
        letter-spacing: -.5px;
    }
    .page-heading.chats .sw-chat-heading-icon {
        flex: 0 0 31px;
        display: grid !important;
        place-items: center;
        width: 31px !important;
        height: 31px !important;
        margin: 0 !important;
        border-radius: 10px !important;
        font-size: 17px !important;
    }
    .page-heading.chats .description {font-size: 13px !important; line-height: 1.45 !important; margin: 0 !important; }
    .dashboard-secstion.chat-section:has(> .sw-chat-v2) { top: 6px; border-radius: 14px; }
    .sw-chat-v2 { height: calc(var(--sw-visible-viewport, 100dvh) - 12px) !important; max-height: none !important; width: 100% !important; }
    .sw-chat-v2 .sw-chat-room, .sw-chat-v2>.chat-content { width:100%; min-width:0; overflow:hidden; }
    .sw-chat-v2 .chat-info.row.sw-room-body { min-height:0; height: calc(100% - 64px) !important; }
    .sw-chat-v2 .chat-info-top.sw-room-head {
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
        padding: 8px 11px !important;
        flex-wrap: nowrap !important;
        gap: 9px !important;
        overflow: hidden;
        width:100%;
        min-width:0;
    }
    .sw-chat-v2 button.sw-chat-back.sw-chat-ui-btn { display: inline-flex !important; }
    .sw-chat-v2 .sw-room-avatar {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        flex: 0 0 38px !important;
    }
    .sw-chat-v2 .sw-room-identity { min-width: 0 !important; flex: 1 1 auto !important; }
    .sw-chat-v2 .sw-room-name { font-size: 14px !important; line-height: 1.3; }
    .sw-chat-v2 .sw-room-presence { font-size: 11px; margin-top: 2px; }
    .sw-chat-v2 button.sw-chat-info-toggle.sw-chat-ui-btn { margin-left: auto !important; }
    .sw-chat-v2 .sw-message-column { min-height:0!important; display:flex!important; flex-direction:column!important; overflow:hidden; }
    .sw-chat-v2 .chat-list { flex: 1 1 auto !important; min-height:0 !important; max-height:none !important; overflow-y:auto; }
    .sw-chat-v2 .sw-composer { flex: 0 0 auto; width:100%; position: relative; z-index: 3; padding: 8px 9px max(9px,env(safe-area-inset-bottom)); box-shadow: 0 -3px 12px rgba(72,38,119,.025); }
    .sw-chat-v2 .sw-composer .jws-form-chat { padding:5px 9px 6px 11px; }
    .sw-chat-v2 .sw-composer .sw-chat-send { min-width: 68px!important; }
    .sw-chat-v2.sw-show-details .sw-profile-panel {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 29px 20px max(25px,env(safe-area-inset-bottom)) !important;
        background: #fff !important;
        overflow-y: auto !important;
        overscroll-behavior-y: auto !important;
        z-index: 13;
    }
    .sw-chat-v2 .sw-profile-center { padding-top: 45px; }
    .sw-chat-v2 .sw-profile-avatar { width: 90px; height: 90px; }
    .sw-chat-v2 button.sw-panel-close.sw-chat-ui-btn {top: 14px !important; right: 14px !important;}
}

/* Serpworks Chat V2.8 — branded icons, preserved link targets and file IDs. */
.sw-chat-v2 .sw-composer .sw-chat-send {
  gap: 10px !important;
  min-height: 43px !important;
  padding: 8px 13px !important;
  white-space: nowrap;
}
.sw-chat-v2 .sw-composer .sw-chat-send .sw-chat-send-img {
  display: block !important;
  flex: 0 0 25px;
  width: 25px !important;
  height: 25px !important;
  max-width: 25px !important;
  object-fit: contain;
  pointer-events: none;
}
.sw-chat-v2 .sw-profile-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap;
  gap: 9px !important;
  min-height: 43px;
  padding: 9px 12px;
  font-size: 14px;
}
.sw-chat-v2 .sw-profile-link .sw-profile-link-img {
  display: block !important;
  flex: 0 0 23px;
  width: 23px !important;
  height: 23px !important;
  object-fit: contain;
}
.sw-chat-v2 .chat-list .sw-message-files a {
  gap: 9px !important;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.4;
  min-height: 43px;
}
.sw-chat-v2 .sw-message-files .sw-chat-attachment-mark { flex: 0 0 auto; }
.sw-chat-v2 .sw-message-files .sw-chat-attachment-name { min-width:0; overflow-wrap:anywhere; }
.sw-chat-v2 .sw-message-files .sw-chat-download-img {
  display:block !important;
  flex: 0 0 25px;
  width:25px !important;
  height:25px !important;
  margin-left: auto;
  object-fit:contain;
}
.sw-chat-v2 .sw-file-pill { gap: 10px; min-height: 47px; }
.sw-chat-v2 .sw-file-pill .sw-file-label { font-size: 13px; line-height: 1.45; }
.sw-chat-v2 .sw-file-arrow {
  flex: 0 0 26px;
  width: 26px;
  height: 27px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}
.sw-chat-v2 .sw-file-arrow img {
  display: block !important;
  width: 26px !important;
  height: 26px !important;
  max-width: none;
  object-fit: contain;
}
@media(max-width:780px) {
  .sw-chat-v2 .sw-composer .sw-chat-send { gap:8px !important; padding: 8px 12px !important; }
  .sw-chat-v2 .sw-profile-link { gap: 8px !important; }
  .sw-chat-v2 .chat-list .sw-message-files a { gap: 8px !important; }
}

/* Serpworks v3.1.9: accessible separation for the profile icon and label. */
.sw-chat-v2 .sw-profile-link { gap: 0 !important; align-items: center !important; }
.sw-chat-v2 .sw-profile-link .sw-profile-link-text {
  display: inline-block !important;
  margin-left: 11px !important;
  line-height: 1.4 !important;
}
@media (max-width: 780px) {
  .sw-chat-v2 .sw-profile-link .sw-profile-link-text { margin-left: 9px !important; }
}


/* ===============================================================
   SERPWORKS CHAT V3 — focused frontend refinements, no new order UI
   =============================================================== */
.sw-chat-v2 .sw-sidebar-head { padding:22px 19px 13px; }
.sw-chat-v2 .sw-sidebar-title { font-size:18px; font-weight:740; }
.sw-chat-v2 .sw-thread-count { font-size:12px; min-width:25px; text-align:center; }
.sw-chat-v2 .chat-sidebar .chat-item { position:relative; min-height:72px; gap:12px; padding:12px 11px!important; }
.sw-chat-v2 .chat-sidebar .chat-item.active {
  background:#f0e8ff!important;
  box-shadow:inset 3px 0 0 #7c3aed;
}
.sw-chat-v2 .sw-conversation-main .name { font-size:14.5px; }
.sw-chat-v2 .sw-conversation-preview .content-short {font-size:13px; line-height:1.5;}
.sw-chat-v2 .sw-conversation-main .time {font-size:11.5px;}
.sw-chat-v2 .sw-conversation-attachment {display:inline-flex;align-items:center;gap:5px;font-size:12px;}
.sw-chat-v2 .sw-conversation-attachment img {width:16px;height:16px;object-fit:contain;}
.sw-chat-v2 .sw-room-avatar {flex-basis:48px;width:48px;height:48px;}
.sw-chat-v2 .sw-room-name {font-size:17px;}
.sw-chat-v2 .sw-room-presence {font-size:12px;}
.sw-chat-v2 .chat-list {padding:20px 18px 22px; background:#fff;}
.sw-chat-v2 .chat-list .chat-item.sw-message {padding:8px 0!important;}
.sw-chat-v2 .chat-list .chat-mess {border-radius:16px 16px 16px 6px;padding:12px 15px;font-size:16px;line-height:1.55;}
.sw-chat-v2 .chat-list .is-mine .chat-mess {border-radius:16px 16px 6px 16px;background:#ede3ff;}
.sw-chat-v2 .chat-list .sw-message-time {font-size:11px;line-height:1.4;margin-top:5px;}
.sw-chat-v2 .sw-profile-panel {padding:20px 15px!important;}
.sw-chat-v2 .sw-profile-avatar {width:93px;height:93px;}
.sw-chat-v2 .sw-profile-center h3 {font-size:18px;}
.sw-chat-v2 .sw-shared-files h4 {font-size:15px;}
.sw-chat-v2 .sw-file-pill {padding:10px;gap:10px;min-height:55px;}
.sw-chat-v2 .sw-file-label {font-size:13px;}
.sw-chat-v2 .sw-file-icon {min-width:38px;width:38px;height:38px;}
.sw-chat-v2 .sw-file-arrow {flex-basis:30px;width:30px;height:30px;}
.sw-chat-v2 .sw-file-arrow img {width:29px!important;height:29px!important;}
.sw-chat-v2 .sw-message-files .sw-chat-attachment-mark {width:23px;height:23px;flex:0 0 23px;object-fit:contain;}
.sw-chat-v2 .sw-message-files .sw-chat-download-img {flex:0 0 29px;width:29px!important;height:29px!important;}
.sw-chat-v2 .sw-attach-btn .sw-chat-attach-img {display:block;width:27px;height:27px;object-fit:contain;pointer-events:none;}
.sw-chat-v2 .sw-composer {padding:10px 13px 12px;}
.sw-chat-v2 .sw-composer .jws-form-chat {border-radius:15px;gap:3px 9px;padding:8px 10px 8px 13px;transition:border-color .18s, box-shadow .18s;}
.sw-chat-v2 .sw-composer .jws-form-chat:focus-within {border-color:#b492f4;box-shadow:0 0 0 3px rgba(124,58,237,.08);}
.sw-chat-v2 .sw-composer textarea {min-height:42px!important;line-height:1.5!important;padding:8px 1px 2px!important;}
.sw-chat-v2 .sw-composer .sw-attach-btn {display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:3px!important;border-radius:9px!important;}
.sw-chat-v2 .sw-composer .sw-attach-btn:hover {background:#f4edff!important;}
.sw-chat-v2 .sw-composer .sw-chat-send {display:inline-flex!important;align-items:center;justify-content:center;gap:9px!important;min-height:42px!important;padding:8px 15px!important;font-size:14px!important;}
.sw-chat-v2 .sw-composer .sw-chat-send .sw-chat-send-img {flex:0 0 24px;width:24px!important;height:24px!important;}
.sw-chat-v2 .sw-composer .sw-chat-send:focus-visible {outline:2px solid #7c3aed;outline-offset:3px;}
/* Jump-to-latest is tied to the actual message scroll, not the page scroll. */
.sw-chat-v2 .sw-jump-latest {position:absolute;right:18px;bottom:95px;z-index:6;display:inline-flex!important;align-items:center;justify-content:center;gap:7px;background:#fff!important;color:#6530bf!important;border:1px solid #d9c3fa!important;border-radius:999px!important;padding:9px 13px!important;font-size:12px!important;font-weight:750!important;box-shadow:0 5px 17px rgba(53,25,100,.14)!important;line-height:1.2!important;min-height:37px!important;}
.sw-chat-v2 .sw-jump-latest[hidden],.sw-chat-v2 .sw-thread-search[hidden],.sw-chat-v2 .sw-new-message-indicator[hidden] {display:none!important;}
.sw-chat-v2 .sw-jump-latest svg {display:block;flex:0 0 17px;}
.sw-chat-v2 .sw-jump-latest:hover {background:#f6efff!important;}
.sw-chat-v2 .sw-new-message-indicator {border-radius:20px;padding:2px 6px;font-size:10px;background:#7c3aed;color:#fff;}
.sw-chat-v2 .sw-thread-search {position:absolute;z-index:8;top:10px;left:12px;right:12px;max-height:min(66%,420px);display:flex;flex-direction:column;background:#fff;box-shadow:0 12px 35px rgba(45,22,85,.16);border:1px solid #e7d9fa;border-radius:15px;overflow:hidden;}
.sw-chat-v2 .sw-thread-search-top {display:flex;align-items:center;gap:8px;padding:10px;border-bottom:1px solid #eee8f6;}
.sw-chat-v2 .sw-thread-search-top input {flex:1;min-width:0;height:38px;border:1px solid #e4d8f6;background:#faf8ff;padding:8px 12px;border-radius:10px;font-size:14px;outline:0;}
.sw-chat-v2 .sw-thread-search-top input:focus {border-color:#a47eef;}
.sw-chat-v2 .sw-thread-search-top button {flex:0 0 35px!important;min-width:35px!important;width:35px!important;height:35px!important;font-size:23px!important;}
.sw-chat-v2 .sw-thread-search-results {min-height:55px;overflow:auto;padding:9px;scrollbar-width:thin;font-size:13px;color:#7a718b;}
.sw-chat-v2 .sw-search-result-count,.sw-chat-v2 .sw-search-message {margin:8px 10px 11px;font-size:12px;color:#847999;}
.sw-chat-v2 button.sw-thread-result {display:flex;align-items:stretch;flex-direction:column;gap:5px;width:100%;min-width:0;padding:11px 12px!important;background:#fff!important;border:0!important;border-bottom:1px solid #f0eaf7!important;text-align:left;border-radius:8px!important;box-shadow:none!important;}
.sw-chat-v2 button.sw-thread-result:hover,.sw-chat-v2 button.sw-thread-result:focus-visible {background:#f5eeff!important;}
.sw-chat-v2 .sw-thread-result-date {font-size:11px;color:#7e65a3;}
.sw-chat-v2 .sw-thread-result-preview {font-size:13px;color:#2d2340;line-height:1.45;overflow-wrap:anywhere;}
.sw-chat-v2 .sw-thread-result-older {font-size:11px;color:#91829e;}
.sw-chat-v2 .sw-found-message .chat-mess {outline:2px solid #a47af3;outline-offset:2px;}
@media (max-width:780px) {
 .page-heading.chats.sw-header-suppressed {display:none!important;}
 .sw-chat-v2 .chat-info-top.sw-room-head {gap:7px!important;padding:8px 9px!important;}
 .sw-chat-v2 .sw-room-avatar {width:41px!important;height:41px!important;min-width:41px!important;flex-basis:41px!important;}
 .sw-chat-v2 .sw-room-name {font-size:15px!important;}
 .sw-chat-v2 .sw-chat-search-toggle,.sw-chat-v2 .sw-chat-info-toggle {flex:0 0 36px!important;min-width:36px!important;width:36px!important;height:36px!important;}
 .sw-chat-v2 .chat-list {padding:15px 12px 19px;}
 .sw-chat-v2 .chat-list .chat-mess {font-size:15px!important;line-height:1.5!important;}
 .sw-chat-v2 .sw-composer {padding:8px 8px max(9px,env(safe-area-inset-bottom));}
 .sw-chat-v2 .sw-composer .jws-form-chat {padding:7px 8px 8px 10px;}
 .sw-chat-v2 .sw-jump-latest {bottom:90px;right:13px;}
 .sw-chat-v2 .sw-thread-search {top:7px;left:7px;right:7px;max-height:60%;}
}
@media (max-width:390px) {
 .sw-chat-v2 .sw-chat-search-toggle,.sw-chat-v2 .sw-chat-info-toggle {flex-basis:34px!important;width:34px!important;min-width:34px!important;height:34px!important;}
 .sw-chat-v2 .sw-room-avatar {width:36px!important;height:36px!important;min-width:36px!important;flex-basis:36px!important;}
 .sw-chat-v2 .chat-info-top.sw-room-head {gap:6px!important;}
 .sw-chat-v2 .sw-composer .sw-chat-send {gap:6px!important;padding:7px 10px!important;min-width:70px!important;}
 .sw-chat-v2 .sw-composer .sw-chat-send .sw-chat-send-img {width:22px!important;height:22px!important;flex-basis:22px;}
}

/* Ensure the viewport-edge chat wrapper includes its borders on phones. */
.dashboard-secstion.chat-section:has(> .sw-chat-v2) {box-sizing:border-box;}
.sw-chat-v2 .sw-thread-result-inactive {display:flex;align-items:stretch;flex-direction:column;gap:5px;width:100%;padding:11px 12px;border-bottom:1px solid #f0eaf7;background:#faf9fc;border-radius:8px;}

/* v3.2.1 hotfix: theme button rules had stretched Jump to Latest
   across the message pane. Anchor it to the message column, not the page. */
.sw-chat-v2 .sw-message-column { position:relative !important; }
.sw-chat-v2 .sw-message-column > button.sw-jump-latest {
  position:absolute !important;
  top:auto !important; bottom:105px !important;
  left:50% !important; right:auto !important;
  transform:translateX(-50%) !important;
  display:inline-flex !important; flex:0 0 auto !important;
  align-items:center !important; justify-content:center !important;
  width:max-content !important; min-width:0 !important;
  max-width:calc(100% - 28px) !important; height:auto !important;
  min-height:35px !important; max-height:43px !important;
  margin:0 !important; padding:8px 13px !important;
  border-radius:999px !important; font-size:12px !important;
  line-height:1.25 !important; white-space:nowrap !important;
  text-align:center !important; z-index:9 !important;
}
.sw-chat-v2 .sw-message-column > button.sw-jump-latest[hidden] {display:none !important;}
.sw-chat-v2 .sw-message-column > button.sw-jump-latest svg {
  flex:0 0 15px !important; width:15px !important; height:15px !important;
}
@media(max-width:780px) {
 .sw-chat-v2 .sw-message-column > button.sw-jump-latest {
   bottom:92px !important; padding:8px 12px !important;
   max-width:calc(100% - 20px) !important;
 }
}


/* SERPWORKS CHAT V3.1 — message reactions and quoted replies. Chat-only. */
.sw-chat-v2 .chat-list .sw-message-content { overflow:visible; }
.sw-chat-v2 .chat-list .sw-message-line { display:flex; align-items:center; gap:7px; max-width:100%; min-width:0; }
.sw-chat-v2 .chat-list .is-mine .sw-message-line { flex-direction:row-reverse; }
.sw-chat-v2 .chat-list .sw-message-line .chat-mess { min-width:0; flex:0 1 auto; }
.sw-chat-v2 .chat-list .sw-message-actions { display:inline-flex; align-items:center; gap:4px; flex:none; }
.sw-chat-v2 .chat-list button.sw-message-action { appearance:none!important; -webkit-appearance:none!important; display:inline-grid!important; place-items:center!important; width:28px!important; min-width:28px!important; max-width:28px!important; height:28px!important; min-height:28px!important; padding:0!important; background:#fff!important; border:1px solid #e8e0f5!important; color:#7656a4!important; border-radius:9px!important; box-shadow:0 2px 6px rgba(70,35,110,.06)!important; line-height:1!important; }
.sw-chat-v2 .chat-list button.sw-message-action:hover,.sw-chat-v2 .chat-list button.sw-message-action[aria-expanded="true"] { background:#eee6ff!important; color:#6931ce!important; border-color:#cab0f6!important; }
.sw-chat-v2 .chat-list button.sw-message-action svg { width:17px!important; height:17px!important; pointer-events:none; }
.sw-chat-v2 .chat-list .sw-reaction-popover { align-self:flex-start; background:#fff; padding:10px 12px 11px; margin-top:7px; border:1px solid #e4d7f8; border-radius:13px; box-shadow:0 9px 24px rgba(55,22,100,.13); max-width:100%; z-index:2; }
.sw-chat-v2 .chat-list .is-mine .sw-reaction-popover { align-self:flex-end; }
.sw-chat-v2 .chat-list .sw-reaction-popover[hidden],.sw-chat-v2 .sw-reply-draft[hidden] { display:none!important; }
.sw-chat-v2 .chat-list .sw-reaction-label { font-size:11px; font-weight:700; color:#6d5d86; margin-bottom:7px; }
.sw-chat-v2 .chat-list .sw-reaction-options { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:2px; }
.sw-chat-v2 .chat-list button.sw-reaction-option { appearance:none!important; background:transparent!important; color:#302843!important; border:1px solid transparent!important; padding:2px!important; margin:0!important; border-radius:8px!important; width:33px!important; min-width:0!important; height:36px!important; min-height:36px!important; font-size:21px!important; display:grid!important; place-items:center!important; line-height:1!important; }
.sw-chat-v2 .chat-list button.sw-reaction-option:hover { background:#f3edff!important; border-color:#decafb!important; }
.sw-chat-v2 .chat-list .sw-reaction-chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:5px; max-width:100%; }
.sw-chat-v2 .chat-list .sw-reaction-chips:empty { display:none; }
.sw-chat-v2 .chat-list button.sw-reaction-chip { appearance:none!important; display:inline-flex!important; align-items:center!important; gap:5px!important; background:#fff!important; border:1px solid #e6ddf1!important; border-radius:18px!important; padding:3px 8px!important; margin:0!important; box-shadow:0 2px 5px rgba(55,22,100,.04)!important; min-height:26px!important; height:auto!important; font-size:13px!important; line-height:1.2!important; color:#6b5b84!important; }
.sw-chat-v2 .chat-list button.sw-reaction-chip.is-selected { background:#f2ebff!important; border-color:#c8b1f8!important; color:#642fc4!important; }
.sw-chat-v2 .chat-list button.sw-reaction-chip:disabled, .sw-chat-v2 .chat-list button.sw-reaction-option:disabled { opacity:.5!important; cursor:wait!important; }
.sw-chat-v2 .chat-list .sw-reaction-count { font-size:11px; font-weight:700; }
.sw-chat-v2 .chat-list button.sw-reply-reference { appearance:none!important; align-self:flex-start; display:flex!important; flex-direction:column; text-align:left; gap:3px; border:0!important; border-left:3px solid #a57af0!important; border-radius:0 8px 8px 0!important; background:#faf7ff!important; box-shadow:none!important; padding:6px 10px!important; margin-bottom:5px!important; max-width:100%; line-height:1.3!important; min-height:0!important; color:#42315f!important; }
.sw-chat-v2 .chat-list .is-mine button.sw-reply-reference { align-self:flex-end; }
.sw-chat-v2 .chat-list .sw-reply-reference-author { color:#7138d0; font-size:11px; font-weight:740; }
.sw-chat-v2 .chat-list .sw-reply-reference-excerpt { font-size:12px; font-weight:450; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:300px; }
.sw-chat-v2 .sw-composer .sw-reply-draft { grid-column:1/-1; padding:9px 11px; margin-bottom:8px; background:#f4eeff; border-left:3px solid #9667e6; border-radius:8px; min-width:0; }
.sw-chat-v2 .sw-composer .sw-reply-draft-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sw-chat-v2 .sw-composer .sw-reply-draft-title { color:#6733bc; font-weight:740; font-size:12px; }
.sw-chat-v2 .sw-composer button.sw-reply-cancel { appearance:none!important; border:0!important; background:transparent!important; color:#67577e!important; font-size:22px!important; font-weight:400!important; padding:0!important; width:23px!important; height:23px!important; line-height:1!important; }
.sw-chat-v2 .sw-composer .sw-reply-draft-excerpt { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12px; color:#4d4167; margin-top:4px; }
.sw-chat-v2 .chat-list .sw-message-action:focus-visible,.sw-chat-v2 .chat-list .sw-reaction-option:focus-visible,.sw-chat-v2 .chat-list .sw-reaction-chip:focus-visible { outline:2px solid #7c3aed!important; outline-offset:2px; }
@media(max-width:780px) { .sw-chat-v2 .chat-list .sw-message-actions { flex-direction:column; gap:3px; } .sw-chat-v2 .chat-list button.sw-message-action { width:27px!important; min-width:27px!important; height:27px!important; min-height:27px!important; } }
@media(max-width:780px) { .sw-chat-v2 .chat-list .sw-reaction-options { grid-template-columns:repeat(5,minmax(0,1fr)); } .sw-chat-v2 .chat-list .sw-reaction-popover { padding:9px 10px; } }
@media(max-width:440px) { .sw-chat-v2 .chat-list .sw-reply-reference-excerpt { max-width:175px; } }


/* V3.3.18: Reaction and reply actions below the message, for both participants.
   Original chat data/notifications and reaction chips above the timestamp stay intact. */
.sw-chat-v2 .chat-list .sw-message-line { display:block!important; width:auto!important; max-width:100%!important; }
.sw-chat-v2 .chat-list .sw-message-line .chat-mess { display:block!important; max-width:100%!important; }
.sw-chat-v2 .chat-list .sw-message-actions {
    display:flex!important; flex-direction:row!important; gap:6px!important;
    align-items:center!important; justify-content:flex-start!important;
    align-self:flex-start!important; margin:6px 0 1px!important;
    max-width:100%!important;
}
.sw-chat-v2 .chat-list .is-mine .sw-message-actions {
    align-self:flex-end!important; justify-content:flex-end!important;
}
.sw-chat-v2 .chat-list button.sw-message-action {
    width:28px!important; min-width:28px!important; height:28px!important;
    min-height:28px!important; border-radius:9px!important;
}
.sw-chat-v2 .chat-list .sw-reaction-popover { margin-top:5px!important; }
.sw-chat-v2 .chat-list .is-mine .sw-reaction-chips,
.sw-chat-v2 .chat-list .is-mine .sw-message-time { align-self:flex-end!important; }
.sw-chat-v2 .chat-list .sw-reaction-chips { align-self:flex-start!important; margin-top:5px!important; }
.sw-chat-v2 .chat-list .sw-reaction-chips .sw-reaction-readonly {
    display:inline-flex!important; align-items:center!important; gap:5px!important;
    padding:3px 8px!important; min-height:26px!important;
    border-radius:18px!important; background:#fff!important; border:1px solid #e6ddf1!important;
    color:#6b5b84!important; font-size:13px!important; line-height:1.2!important;
    pointer-events:none!important;
}
@media(max-width:780px) {
    .sw-chat-v2 .chat-list .sw-message-actions { flex-direction:row!important; gap:5px!important; }
}


/* Serpworks Chat v3.3.19 — composer emoji picker, desktop and mobile. */
.sw-chat-v2 .sw-composer .sw-composer-tools {
    display:flex!important; flex:1 1 auto; min-width:0; align-items:center!important; gap:5px;
}
.sw-chat-v2 .sw-composer .sw-composer-tools .attachments-field {
    display:flex!important; flex-direction:row!important; align-items:center!important;
    flex:0 1 auto; min-width:0; max-width:calc(100% - 42px);
}
.sw-chat-v2 .sw-composer .sw-emoji-anchor {position:relative; flex:0 0 38px; width:38px; min-width:0; z-index:12;}
.sw-chat-v2 .sw-composer button.sw-emoji-toggle {
    appearance:none!important; display:flex!important; justify-content:center!important; align-items:center!important;
    width:36px!important; min-width:36px!important; height:36px!important; min-height:36px!important;
    padding:0!important; margin:0!important; border:0!important; border-radius:9px!important;
    background:transparent!important; box-shadow:none!important; color:#7c3aed!important;
}
.sw-chat-v2 .sw-composer button.sw-emoji-toggle:hover,
.sw-chat-v2 .sw-composer button.sw-emoji-toggle[aria-expanded="true"] {background:#f2ebff!important;}
.sw-chat-v2 .sw-composer button.sw-emoji-toggle svg {display:block; flex:none; pointer-events:none;}
.sw-chat-v2 .sw-composer .sw-emoji-picker {
    position:absolute!important; bottom:calc(100% + 13px)!important; left:-40px!important; right:auto!important;
    width:320px!important; max-width:min(320px,calc(100vw - 34px))!important;
    display:flex!important; flex-direction:column!important; gap:0!important;
    padding:11px 12px 12px!important; margin:0!important; border:1px solid #dfd0f5!important;
    border-radius:15px!important; background:#fff!important; color:#2f2447!important;
    box-shadow:0 12px 36px rgba(47,21,92,.18)!important;
    z-index:40!important; min-height:0!important; overflow:hidden!important;
}
.sw-chat-v2 .sw-composer .sw-emoji-picker[hidden] {display:none!important;}
.sw-chat-v2 .sw-composer .sw-emoji-header {display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:14px; font-weight:750; line-height:1.3; padding:0 1px 8px;}
.sw-chat-v2 .sw-composer button.sw-emoji-close {appearance:none!important; width:27px!important; height:27px!important; min-height:27px!important; padding:0!important; border:0!important; background:#f3edff!important; color:#6b35c5!important; border-radius:8px!important; font-size:20px!important; line-height:1!important;}
.sw-chat-v2 .sw-composer .sw-emoji-categories {display:grid!important; grid-template-columns:repeat(5,minmax(0,1fr))!important; gap:5px!important; padding:0 0 10px!important; border-bottom:1px solid #eee6f8;}
.sw-chat-v2 .sw-composer button.sw-emoji-category {appearance:none!important; display:grid!important; place-items:center!important; min-width:0!important; width:100%!important; height:35px!important; min-height:35px!important; border:1px solid transparent!important; border-radius:9px!important; background:#faf8ff!important; color:#5d338d!important; font-size:19px!important; padding:0!important;}
.sw-chat-v2 .sw-composer button.sw-emoji-category.is-current {background:#eee5ff!important; border-color:#d5bdf8!important;}
.sw-chat-v2 .sw-composer .sw-emoji-grid {display:grid!important; grid-template-columns:repeat(7,minmax(0,1fr))!important; gap:3px!important; padding:8px 1px 1px!important; overflow-y:auto!important; max-height:min(210px,32dvh)!important; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#d4c2ee transparent;}
.sw-chat-v2 .sw-composer button.sw-emoji-option {appearance:none!important; display:grid!important; place-items:center!important; width:100%!important; min-width:0!important; height:37px!important; min-height:37px!important; padding:0!important; margin:0!important; background:transparent!important; border:1px solid transparent!important; border-radius:9px!important; box-shadow:none!important; color:#332348!important; font-family:system-ui,sans-serif!important; font-size:24px!important; line-height:1!important;}
.sw-chat-v2 .sw-composer button.sw-emoji-option:hover {background:#f3edff!important; border-color:#e9dafa!important;}
.sw-chat-v2 .sw-composer button.sw-emoji-option:focus-visible,
.sw-chat-v2 .sw-composer button.sw-emoji-toggle:focus-visible,
.sw-chat-v2 .sw-composer button.sw-emoji-category:focus-visible {outline:2px solid #7c3aed!important; outline-offset:2px!important;}
@media(max-width:780px) {
    .sw-chat-v2 .sw-composer .sw-composer-actions {gap:5px!important;}
    .sw-chat-v2 .sw-composer .sw-composer-tools {gap:3px!important;}
    .sw-chat-v2 .sw-composer .sw-emoji-picker {left:-39px!important; max-width:min(320px,calc(100vw - 28px))!important; padding:10px!important;}
    .sw-chat-v2 .sw-composer .sw-emoji-grid {max-height:min(190px,28dvh)!important;}
}
@media(max-width:360px) {
    .sw-chat-v2 .sw-composer .sw-emoji-picker {width:284px!important; max-width:calc(100vw - 28px)!important;}
    .sw-chat-v2 .sw-composer button.sw-emoji-option {height:34px!important; min-height:34px!important; font-size:22px!important;}
    .sw-chat-v2 .sw-composer .sw-emoji-anchor {flex-basis:36px; width:36px;}
}

/* v3.3.22: Visible status label after the timestamp: gray Delivered and blue Read.
   Delivered indicates the message is saved to Serpworks, not delivery to a device. */
.sw-chat-v2 .chat-list .sw-message-time {
    display:inline-flex!important; align-items:center!important; gap:5px!important;
    white-space:nowrap!important;
}
.sw-chat-v2 .chat-list .sw-message-receipt {
    display:inline-flex!important; flex:0 0 auto!important; align-items:center!important;
    justify-content:center!important; gap:3px!important; color:#9299a6!important;
    vertical-align:middle!important; line-height:1.2!important;
}
.sw-chat-v2 .chat-list .sw-message-receipt svg {display:block!important; flex:0 0 auto!important; width:19px!important; height:15px!important;}
.sw-chat-v2 .chat-list .sw-message-receipt .sw-receipt-second {display:inline!important;}
.sw-chat-v2 .chat-list .sw-message-receipt .sw-receipt-label {
    display:inline-block!important; font-size:11px!important; font-weight:600!important;
    line-height:1.2!important; white-space:nowrap!important; color:inherit!important;
}
.sw-chat-v2 .chat-list .sw-message-receipt.is-read {color:#1688e9!important;}

/* Predator job title carried into the first user-composed chat message. */
.sw-chat-v2 .sw-predator-job-context{padding:9px 14px;border:1px solid #dfd5f4;border-radius:9px;margin:0 0 8px;background:#faf8ff;color:#2a213d;font-size:13px;line-height:1.4}
.sw-chat-v2 .sw-predator-job-context strong{color:#6337a8}
.sw-chat-v2 .sw-predator-job-context small{display:block;color:#6b687a;font-size:12px;margin-top:3px}


/* v3.3.38 — Avatar activates the existing chat profile info drawer only. */
.sw-chat-v2 .sw-chat-profile-trigger { cursor:pointer!important; }
.sw-chat-v2 .sw-chat-profile-trigger:focus-visible {
  outline:2px solid #7c3aed!important;
  outline-offset:3px!important;
  border-radius:50%;
}
.sw-chat-v2 .sw-profile-panel .sw-profile-avatar {cursor:default!important;}

/* v3.3.46 — Edit own text message for 60 seconds. Isolated to Chat V2. */
.sw-chat-v2 .chat-list .sw-message-edited {
  color:#8a72ad!important; font-size:11px!important; font-weight:550!important;
  white-space:nowrap; margin-left:2px;
}
.sw-chat-v2 .chat-list .sw-message-edit-panel[hidden],
.sw-chat-v2 .chat-list .sw-message-line[hidden],
.sw-chat-v2 .chat-list .sw-message-edited[hidden],
.sw-chat-v2 .chat-list .sw-message-edit-error[hidden] {display:none!important;}
.sw-chat-v2 .chat-list .sw-message-edit-panel {
  width:min(100%,450px); min-width:min(280px,75vw); padding:10px;
  border:1.5px solid #a56cf7; background:#fff; border-radius:13px;
  box-shadow:0 3px 13px rgba(70,35,115,.055);
}
.sw-chat-v2 .chat-list .sw-message-edit-input {
  display:block!important; width:100%!important; min-height:70px!important;
  max-height:220px!important; resize:vertical!important;
  background:#fff!important; color:#302843!important;
  font-size:14px!important; line-height:1.5!important;
  box-shadow:none!important; border:1px solid #ded1f3!important;
  border-radius:9px!important; outline:none!important; padding:9px 10px!important;
  margin:0!important; font-family:inherit!important;
}
.sw-chat-v2 .chat-list .sw-message-edit-input:focus {border-color:#7c3aed!important;}
.sw-chat-v2 .chat-list .sw-message-edit-buttons {display:flex; justify-content:flex-end; gap:7px; margin-top:8px;}
.sw-chat-v2 .chat-list .sw-message-edit-buttons button {
  display:inline-flex!important; justify-content:center!important; align-items:center!important;
  border-radius:9px!important; min-height:34px!important; padding:7px 16px!important;
  font-size:13px!important; font-weight:650!important; line-height:1.2!important;
  border:1px solid #decff6!important; background:#fff!important; color:#503d6d!important;
}
.sw-chat-v2 .chat-list .sw-message-edit-buttons .sw-edit-save {
  background:#7c3aed!important; border-color:#7c3aed!important; color:#fff!important;
}
.sw-chat-v2 .chat-list .sw-message-edit-buttons button:disabled {opacity:.55!important; cursor:wait!important;}
.sw-chat-v2 .chat-list .sw-message-edit-error {color:#c52d3d;font-size:12px;line-height:1.4;margin:7px 0 0;}
.sw-chat-v2 .chat-list .sw-message.sw-is-editing .sw-message-actions {display:none!important;}
@media(max-width:780px) {
  .sw-chat-v2 .chat-list .sw-message-edit-panel {width:100%;min-width:min(240px,72vw);padding:9px;}
  .sw-chat-v2 .chat-list .sw-message-edit-buttons button {min-height:36px!important;}
}


/* v3.3.47 — Mobile edit composer must remain inside the chat viewport.
   The previous min-width on the editor could exceed its parent message column. */
.sw-chat-v2 .chat-list .sw-message.sw-is-editing {
  width:100%!important; min-width:0!important; max-width:100%!important;
}
.sw-chat-v2 .chat-list .sw-message.sw-is-editing .sw-message-content {
  width:min(100%,450px)!important; max-width:100%!important;
  min-width:0!important; align-items:stretch!important;
}
.sw-chat-v2 .chat-list .sw-message.sw-is-editing .sw-message-edit-panel {
  display:block; width:100%!important; max-width:100%!important;
  min-width:0!important; box-sizing:border-box!important;
}
.sw-chat-v2 .chat-list .sw-message.sw-is-editing .sw-message-edit-input {
  width:100%!important; min-width:0!important; max-width:100%!important;
  box-sizing:border-box!important;
}
.sw-chat-v2 .chat-list .sw-message-edit-buttons {
  display:flex!important; align-items:center!important; justify-content:flex-end!important;
  width:100%!important; max-width:100%!important; min-width:0!important;
  flex-wrap:wrap!important; gap:8px!important; box-sizing:border-box!important;
}
.sw-chat-v2 .chat-list .sw-message-edit-buttons button {
  flex:0 1 auto!important; width:auto!important; max-width:100%!important;
  min-width:0!important; margin:0!important; box-sizing:border-box!important;
  white-space:nowrap!important;
}
@media (max-width:780px) {
  .sw-chat-v2 .chat-list .sw-message.sw-is-editing .sw-message-content {
    width:100%!important; max-width:100%!important; min-width:0!important;
  }
  .sw-chat-v2 .chat-list .sw-message.sw-is-editing .sw-message-edit-panel {
    padding:10px!important; min-width:0!important; max-width:100%!important;
  }
  .sw-chat-v2 .chat-list .sw-message-edit-buttons {
    flex-wrap:nowrap!important; justify-content:space-between!important; gap:8px!important;
  }
  .sw-chat-v2 .chat-list .sw-message-edit-buttons button {
    flex:1 1 0!important; width:calc(50% - 4px)!important; max-width:calc(50% - 4px)!important;
    min-height:38px!important; padding:9px 8px!important; font-size:13px!important;
  }
}
