/* Halo chat stability layer: efficient composer, typing state, and responsive conversation header. */
body.social-authenticated :is(#direct-chat-composer,#halo-group-composer) {
  display: grid !important;
  grid-template-columns: 42px 42px minmax(80px, 1fr) 42px 46px !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 7px !important;
  border: 1px solid var(--cc-line-strong, rgba(255, 255, 255, .12)) !important;
  border-radius: 18px !important;
  background: color-mix(in srgb, var(--cc-panel-deep, #121923) 96%, var(--cc-shell, #08111f)) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .10), inset 0 1px rgba(255, 255, 255, .05) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  contain: layout paint;
}

body.social-authenticated :is(#direct-chat-composer,#halo-group-composer) .halo-combined-source {
  display: none !important;
}

body.social-authenticated .direct-chat-form > :is(#direct-chat-composer,#halo-group-composer) > :is(#halo-combined-tools-button,#halo-group-add) { grid-column: 1 !important; grid-row: 1 !important; order: initial !important; }
body.social-authenticated .direct-chat-form > :is(#direct-chat-composer,#halo-group-composer) > :is(#halo-translate-button,#halo-group-translate) { grid-column: 2 !important; grid-row: 1 !important; order: initial !important; }
body.social-authenticated .direct-chat-form > :is(#direct-chat-composer,#halo-group-composer) > :is(#direct-chat-input,#halo-group-input) { grid-column: 3 !important; grid-row: 1 !important; order: initial !important; }
body.social-authenticated .direct-chat-form > :is(#direct-chat-composer,#halo-group-composer) > :is(#halo-audio-note-button,#halo-group-microphone) { grid-column: 4 !important; grid-row: 1 !important; order: initial !important; }
body.social-authenticated .direct-chat-form > :is(#direct-chat-composer,#halo-group-composer) > :is(#direct-chat-send,#halo-group-submit) { grid-column: 5 !important; grid-row: 1 !important; order: initial !important; }

body.social-authenticated :is(#direct-chat-composer,#halo-group-composer) > button {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  place-items: center !important;
}

body.social-authenticated :is(#direct-chat-composer,#halo-group-composer) > button svg {
  width: 20px !important;
  height: 20px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.social-authenticated :is(#halo-combined-tools-button,#halo-group-add),
body.social-authenticated :is(#halo-translate-button,#halo-group-translate),
body.social-authenticated :is(#halo-audio-note-button,#halo-group-microphone) {
  background: color-mix(in srgb, var(--cc-panel-raised, #35404d) 74%, transparent) !important;
  color: var(--cc-muted, #aab4bf) !important;
}

body.social-authenticated :is(#halo-combined-tools-button,#halo-group-add):hover,
body.social-authenticated :is(#halo-translate-button,#halo-group-translate):hover,
body.social-authenticated :is(#halo-audio-note-button,#halo-group-microphone):hover {
  border-color: color-mix(in srgb, var(--cc-accent, #45c8dc) 35%, transparent) !important;
  color: var(--cc-text, #f4f7fb) !important;
}

body.social-authenticated :is(#direct-chat-input,#halo-group-input) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 42px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--cc-text, #f4f7fb) !important;
}

body.social-authenticated .direct-chat-form > :is(#direct-chat-composer,#halo-group-composer) > :is(#direct-chat-send,#halo-group-submit) {
  width: 46px !important;
  min-width: 46px !important;
  height: 42px !important;
  min-height: 42px !important;
  background: var(--cc-accent, #45c8dc) !important;
  color: #062531 !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--cc-accent, #45c8dc) 24%, transparent) !important;
}

.halo-combined-tools-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--cc-line-strong, rgba(255, 255, 255, .14));
  border-radius: 15px;
  background: color-mix(in srgb, var(--cc-panel-deep, #121923) 96%, transparent);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .34);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.halo-combined-tools-menu[hidden] { display: none !important; }
.halo-combined-tools-menu button {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--cc-text, #f4f7fb);
  text-align: left;
  cursor: pointer;
}
.halo-combined-tools-menu button:hover,
.halo-combined-tools-menu button:focus-visible { background: var(--cc-accent-soft, rgba(69, 200, 220, .12)); outline: 0; }
.halo-combined-tools-menu svg { width: 22px; height: 22px; fill: none; stroke: var(--cc-accent, #45c8dc); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.halo-combined-tools-menu span { display: grid; gap: 2px; }
.halo-combined-tools-menu b { font-size: 11px; }
.halo-combined-tools-menu small { color: var(--cc-muted, #aab4bf); font-size: 9px; }

/* In-call chat uses the same translation affordance inside its input surface. */
#chat-form .translate-toggle { display: none !important; }
#chat-form .chat-compose {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 44px !important;
  gap: 6px !important;
  align-items: center !important;
  padding: 6px !important;
  border: 1px solid var(--line, rgba(255, 255, 255, .1)) !important;
  border-radius: 15px !important;
  background: rgba(5, 10, 20, .28) !important;
}
#chat-form .chat-compose input {
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 8px 4px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#chat-form .halo-call-translate-button,
#chat-form #chat-send {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border-radius: 11px !important;
}
#chat-form .halo-call-translate-button {
  border: 1px solid rgba(255, 255, 255, .1) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: #9aa8bd !important;
  box-shadow: none !important;
}
#chat-form .halo-call-translate-button.is-active {
  border-color: color-mix(in srgb, var(--blue, #55b7ff) 42%, transparent) !important;
  background: color-mix(in srgb, var(--blue, #55b7ff) 14%, transparent) !important;
  color: #a8dcff !important;
}
#chat-form .halo-call-translate-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

html[data-theme="light"] body.social-authenticated :is(#direct-chat-composer,#halo-group-composer),
html[data-theme="light"] #chat-form .chat-compose { background: rgba(255, 255, 255, .78) !important; }
html[data-theme="light"] .halo-combined-tools-menu { background: rgba(250, 252, 255, .98); color: #172133; }
html[data-theme="light"] .halo-combined-tools-menu button { color: #172133; }

@media (max-width: 680px) {
  body.social-authenticated :is(#direct-chat-composer,#halo-group-composer) {
    grid-template-columns: 40px 40px minmax(56px, 1fr) 40px 44px !important;
    gap: 4px !important;
    padding: 5px !important;
    border-radius: 16px !important;
  }
  body.social-authenticated :is(#direct-chat-composer,#halo-group-composer) > button {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
  body.social-authenticated .direct-chat-form > :is(#direct-chat-composer,#halo-group-composer) > :is(#direct-chat-send,#halo-group-submit) { width: 44px !important; min-width: 44px !important; }
}

@media (max-width: 390px) {
  body.social-authenticated :is(#direct-chat-composer,#halo-group-composer) {
    grid-template-columns: 38px 38px minmax(48px, 1fr) 38px 42px !important;
  }
  body.social-authenticated :is(#direct-chat-composer,#halo-group-composer) > button {
    width: 38px !important;
    min-width: 38px !important;
  }
  body.social-authenticated .direct-chat-form > :is(#direct-chat-composer,#halo-group-composer) > :is(#direct-chat-send,#halo-group-submit) { width: 42px !important; min-width: 42px !important; }
}

/* Stable conversation identity layout. */
body.social-authenticated .direct-chat-header {
  grid-template-columns: 40px minmax(0, 1fr) auto !important;
  min-width: 0 !important;
}
body.social-authenticated .direct-chat-identity {
  min-width: 0 !important;
  overflow: hidden;
}
body.social-authenticated .direct-chat-header .direct-chat-meta {
  display: grid !important;
  grid-template-columns: 8px minmax(0, 1fr) !important;
  grid-template-areas: "presence state" ". detail" !important;
  align-items: center !important;
  column-gap: 7px !important;
  row-gap: 2px !important;
  min-width: 0 !important;
  line-height: 1.25 !important;
}
body.social-authenticated #direct-chat-presence { grid-area: presence; }
body.social-authenticated #direct-chat-state {
  grid-area: state;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.social-authenticated #direct-chat-last-seen,
body.social-authenticated #direct-chat-typing {
  grid-area: detail;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.social-authenticated #direct-chat-typing {
  color: var(--cc-accent, #45c8dc) !important;
  font-weight: 700;
}
body.social-authenticated #direct-chat-typing[hidden],
body.social-authenticated #direct-chat-last-seen[hidden] { display: none !important; }

@media (max-width: 680px) {
  body.social-authenticated .direct-chat-header {
    grid-template-columns: 34px 38px minmax(0, 1fr) !important;
    grid-template-areas: "back avatar identity" "actions actions actions" !important;
    height: auto !important;
    min-height: 112px !important;
    align-content: center !important;
    row-gap: 8px !important;
  }
  body.social-authenticated .direct-chat-header > #direct-chat-back { grid-area: back !important; }
  body.social-authenticated .direct-chat-header > #direct-chat-avatar { grid-area: avatar !important; }
  body.social-authenticated .direct-chat-header > .direct-chat-identity { grid-area: identity !important; }
  body.social-authenticated .direct-chat-actions {
    grid-area: actions !important;
    width: 100% !important;
    justify-content: flex-end !important;
  }
  body.social-authenticated .direct-chat-actions #direct-chat-audio-call {
    min-width: 40px !important;
    padding: 7px !important;
  }
  body.social-authenticated .direct-chat-actions #direct-chat-audio-call span { display: none !important; }
}

/* Halo v133 reference layout. Existing controls and behavior retain their IDs.
   Light/dark tokens, desktop rail, conversation list and real profile drawer. */
body.social-authenticated{--cc-chat-dock-shift:0px;--cc-canvas:#0e1723;--cc-shell:#17222e;--cc-panel:#17222e;--cc-panel-deep:#111c27;--cc-panel-raised:#22313f;--cc-line:#2a3948;--cc-line-strong:#3c4b5a;--cc-text:#edf3f8;--cc-muted:#9eafbe;--cc-faint:#7f93a5;--cc-accent:#00ad80;--cc-accent-strong:#008f6a;--cc-accent-soft:#153d35;--cc-incoming:#253442;--cc-outgoing:#174b3b;--cc-input:#22313f;--cc-shadow:0 18px 60px #0004;--ui-bg:var(--cc-panel);--ui-bg-soft:var(--cc-panel-deep);--ui-text:var(--cc-text);--ui-line:var(--cc-line);background:var(--cc-canvas)!important;color:var(--cc-text)!important;overflow:hidden!important}
html[data-theme=light] body.social-authenticated{--cc-canvas:#e8edf2;--cc-shell:#fff;--cc-panel:#fff;--cc-panel-deep:#f4f6f8;--cc-panel-raised:#eef2f5;--cc-line:#e7ebef;--cc-line-strong:#d6dfe7;--cc-text:#182234;--cc-muted:#66758a;--cc-faint:#91a0b1;--cc-accent:#00a879;--cc-accent-strong:#008f68;--cc-accent-soft:#e6f5ee;--cc-incoming:#fff;--cc-outgoing:#dff8df;--cc-input:#f0f3f6;--cc-shadow:0 18px 60px #2334471c}
body.social-authenticated .ambient{display:none!important}
body.social-authenticated .app-shell{display:flex!important;flex-direction:column!important;width:min(1600px,calc(100% - 48px))!important;height:calc(100dvh - 48px)!important;min-height:0!important;max-height:none!important;margin:24px auto!important;padding:0!important;border:1px solid var(--cc-line-strong)!important;border-radius:22px!important;background:var(--cc-shell)!important;box-shadow:var(--cc-shadow)!important;overflow:hidden!important}
body.social-authenticated .topbar{position:relative!important;inset:auto!important;display:flex!important;flex:0 0 64px!important;width:100%!important;height:64px!important;min-height:64px!important;max-height:none!important;margin:0!important;padding:10px 22px!important;border:0!important;border-bottom:1px solid var(--cc-line)!important;border-radius:0!important;background:var(--cc-panel)!important;backdrop-filter:none!important;transform:none!important;z-index:40!important}
body.social-authenticated .wordmark{font-size:22px!important;color:var(--cc-text)!important}
body.social-authenticated .logo-mark{width:34px!important;height:34px!important;border-radius:50%!important;background:var(--cc-accent)!important;color:#fff!important;box-shadow:none!important}
body.social-authenticated .topbar-actions{display:flex!important;align-items:center!important;gap:8px!important;width:auto!important;flex-wrap:nowrap!important;overflow:visible!important}
body.social-authenticated .topbar-actions button,body.social-authenticated .header-language select{background:var(--cc-panel-raised)!important;color:var(--cc-text)!important;border-color:var(--cc-line)!important;border-radius:12px!important;min-height:36px!important}
body.social-authenticated .footer{display:none!important}
body.social-authenticated #social-shell.social-shell{display:grid!important;grid-template-columns:164px minmax(0,1fr)!important;gap:0!important;flex:1 1 auto!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important}
body.social-authenticated #social-shell.social-shell .social-rail{transform:none!important;max-width:none!important;position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important;width:164px!important;height:100%!important;min-height:0!important;margin:0!important;padding:24px 12px!important;border:0!important;border-right:1px solid var(--cc-line)!important;border-radius:0!important;background:var(--cc-panel)!important;box-shadow:none!important;backdrop-filter:none!important;overflow:auto!important;z-index:20!important}
body.social-authenticated #social-shell.social-shell .social-rail-brand{display:grid!important;justify-items:start!important;gap:10px!important;width:100%!important;margin:0 0 26px!important;padding:0 10px!important;color:var(--cc-muted)!important;letter-spacing:.1em!important;font-size:11px!important}
body.social-authenticated .social-brand-pulse{width:30px!important;height:30px!important;background:var(--cc-accent)!important;border-radius:50%!important;box-shadow:none!important}
body.social-authenticated .social-brand-pulse:after{margin:10px!important}
body.social-authenticated #social-shell.social-shell .social-nav{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;margin:0!important;align-content:start!important}
body.social-authenticated #social-shell.social-shell .social-nav-button{flex-direction:row!important;text-align:left!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:100%!important;min-height:46px!important;padding:10px 12px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--cc-muted)!important;box-shadow:none!important}
body.social-authenticated #social-shell.social-shell .social-nav-button.is-active{background:var(--cc-accent-soft)!important;color:var(--cc-accent)!important}
body.social-authenticated #social-shell.social-shell .social-nav-button b{display:block!important;margin:0!important;font-size:13px!important;font-weight:600!important;line-height:1.3!important;letter-spacing:0!important;visibility:visible!important}
body.social-authenticated .social-nav-button svg{width:21px!important;height:21px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.7!important}
body.social-authenticated #social-shell .social-rail-security{display:grid!important;margin-top:auto!important;padding:30px 0 0!important;color:var(--cc-muted)!important}
body.social-authenticated #social-shell.social-shell>.social-main{display:flex!important;flex-direction:column!important;min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;padding:0!important;overflow:hidden!important;background:var(--cc-panel)!important}
body.social-authenticated #social-shell .social-main-header{flex:0 0 auto!important;height:68px!important;min-height:68px!important;margin:0!important;padding:14px 24px!important;border-bottom:1px solid var(--cc-line)!important;background:var(--cc-panel)!important}
body.social-authenticated #social-shell .social-main-header h1{font-size:23px!important;color:var(--cc-text)!important}
body.social-authenticated #social-shell .social-main-header .overline{color:var(--cc-muted)!important;font-size:9px!important}
body.social-authenticated[data-halo-social-view=chats] #social-shell .social-main-header{display:none!important}
body.social-authenticated #social-shell .social-view:not([hidden]){flex:1 1 auto!important;min-height:0!important;height:auto!important;overflow:auto!important;padding:20px!important}
body.social-authenticated #social-shell .social-view[data-social-panel=chats]:not([hidden]){display:flex!important;padding:0!important;overflow:hidden!important}
body.social-authenticated #social-shell .social-dashboard-grid{display:grid!important;grid-template-columns:320px minmax(0,1fr)!important;gap:0!important;width:100%!important;height:100%!important;min-height:0!important;border-radius:0!important;background:var(--cc-panel-deep)!important;overflow:hidden!important}
body.social-authenticated #social-shell .social-dashboard-grid:not(.direct-chat-open):after{content:'Your private conversations'!important;display:grid;place-content:center;color:var(--cc-muted);font-size:18px;font-weight:500}
body.social-authenticated #social-shell .social-contacts-card{display:flex!important;flex-direction:column!important;min-width:0!important;width:100%!important;min-height:0!important;height:100%!important;padding:0!important;margin:0!important;border:0!important;border-right:1px solid var(--cc-line)!important;border-radius:0!important;background:var(--cc-panel)!important;box-shadow:none!important;backdrop-filter:none!important;overflow:hidden!important}
body.social-authenticated #social-shell .social-card-head{flex:0 0 auto!important;align-items:center!important;gap:8px!important;padding:20px 16px 10px!important}
body.social-authenticated #social-shell .social-card-head h2{font-size:20px!important;color:var(--cc-text)!important;margin:0!important}
body.social-authenticated #social-shell .social-card-head p{display:none!important}
body.social-authenticated #social-shell .social-contact-head-actions{display:flex!important;align-items:center!important;gap:6px!important;flex:none!important}
body.social-authenticated #social-shell .social-count{width:24px!important;height:24px!important;font-size:10px!important;border:0!important;border-radius:50%!important;background:var(--cc-accent-soft)!important;color:var(--cc-accent)!important}
body.social-authenticated #social-shell .social-new-invite{display:grid!important;place-items:center!important;width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;border:0!important;border-radius:50%!important;background:var(--cc-panel-raised)!important;color:var(--cc-text)!important;padding:0!important;font-size:22px!important;box-shadow:none!important}
body.social-authenticated #halo-open-groups svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.social-authenticated #social-shell .social-search{flex:0 0 auto!important;margin:8px 16px 16px!important;padding:0 12px!important;border:0!important;border-radius:12px!important;background:var(--cc-input)!important;color:var(--cc-muted)!important}
body.social-authenticated #social-shell .social-search input{color:var(--cc-text)!important;min-height:42px!important;background:transparent!important;font-size:13px!important}
body.social-authenticated #social-shell .social-contact-list{align-items:stretch!important;justify-content:flex-start!important;display:flex!important;flex-direction:column!important;gap:3px!important;min-height:0!important;overflow:auto!important;padding:0 8px 16px!important;flex:1 1 auto!important}
body.social-authenticated #social-shell .social-contact{flex:0 0 auto!important;width:100%!important;height:76px!important;max-height:none!important;box-sizing:border-box!important;display:grid!important;grid-template-columns:46px minmax(0,1fr) auto!important;gap:12px!important;min-height:76px!important;padding:12px 10px!important;border:0!important;border-radius:12px!important;background:transparent!important;box-shadow:none!important;transform:none!important;color:var(--cc-text)!important}
body.social-authenticated #social-shell .social-contact:hover,body.social-authenticated #social-shell .social-contact.is-active{background:var(--cc-panel-raised)!important}
body.social-authenticated #social-shell .social-contact-avatar{width:46px!important;height:46px!important;border-radius:50%!important;background:var(--cc-accent-soft)!important;color:var(--cc-accent)!important;box-shadow:none!important;border:0!important;overflow:hidden!important}
body.social-authenticated #social-shell .social-contact-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important}
body.social-authenticated #social-shell .social-contact-identity strong{font-size:14px!important;color:var(--cc-text)!important;font-weight:600!important}
body.social-authenticated #social-shell .social-contact-identity small{font-size:11px!important;color:var(--cc-muted)!important}
body.social-authenticated #social-shell .social-contact-identity p{font-size:11px!important;color:var(--cc-muted)!important}
body.social-authenticated #social-shell .social-contact-actions{display:flex!important;grid-column:auto!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;width:auto!important;min-width:0!important;gap:3px!important;flex-wrap:nowrap!important}
body.social-authenticated #social-shell .social-contact-actions button{position:relative!important;display:grid!important;place-items:center!important;width:28px!important;min-width:28px!important;max-width:28px!important;height:36px!important;min-height:36px!important;margin:0!important;padding:5px!important;font-size:14px!important;background:transparent!important;border:0!important;color:var(--cc-muted)!important;box-shadow:none!important;overflow:hidden!important;border-radius:9px!important}
body.social-authenticated #social-shell .social-contact-actions button::before,body.social-authenticated #social-shell .social-contact-actions button::after{content:none!important;display:none!important}
body.social-authenticated #social-shell .social-contact-actions svg{display:block!important;width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important}
body.social-authenticated #social-shell.social-shell .social-nav-button .nav-icon{display:inline-flex!important;margin:0!important;align-items:center!important;justify-content:center!important;flex:none!important}
body.social-authenticated #social-shell .social-contact-menu{width:28px!important;min-width:28px!important;min-height:36px!important}
body.social-authenticated #social-shell .social-empty{flex:1 1 auto!important;min-height:0!important;padding:24px!important;overflow:auto!important;color:var(--cc-muted)!important}
body.social-authenticated #social-shell .social-empty h3{color:var(--cc-text)!important}
body.social-authenticated #social-shell :is(#direct-chat-card,#halo-group-detail):not([hidden]){position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:var(--cc-panel-deep)!important;overflow:hidden!important;box-shadow:none!important;backdrop-filter:none!important}
body.social-authenticated #social-shell .direct-chat-header{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:none!important;box-sizing:border-box!important;align-self:stretch!important;flex-shrink:0!important;display:grid!important;grid-template-columns:46px minmax(0,1fr) auto!important;grid-template-areas:'avatar identity actions'!important;flex:0 0 auto!important;min-height:76px!important;margin:0!important;padding:14px 20px!important;border:0!important;border-bottom:1px solid var(--cc-line)!important;border-radius:0!important;background:var(--cc-panel)!important;box-shadow:none!important}
body.social-authenticated #social-shell #direct-chat-back{display:none!important}
body.social-authenticated #social-shell #direct-chat-avatar{grid-area:avatar!important}
body.social-authenticated #social-shell .direct-chat-identity{grid-area:identity!important}
body.social-authenticated #social-shell .direct-chat-identity h2{font-size:15px!important;color:var(--cc-text)!important;margin-bottom:4px!important}
body.social-authenticated #social-shell .direct-chat-actions{grid-area:actions!important;width:auto!important;display:flex!important;gap:6px!important}
body.social-authenticated #social-shell .direct-chat-actions button{display:grid!important;place-items:center!important;min-width:34px!important;width:34px!important;height:34px!important;min-height:34px!important;padding:6px!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--cc-text)!important;box-shadow:none!important}
body.social-authenticated #social-shell .direct-chat-actions button span{display:none!important}
body.social-authenticated #social-shell .direct-chat-actions svg{width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important}
body.social-authenticated #social-shell .direct-chat-notice{transform:none!important;width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;flex:0 0 auto!important;padding:7px 12px!important;font-size:9px!important;color:var(--cc-muted)!important;background:var(--cc-panel-deep)!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere!important}
body.social-authenticated #social-shell :is(#direct-chat-messages,#halo-group-messages){flex:1 1 auto!important;min-height:0!important;padding:26px!important;gap:14px!important;overflow:auto!important;background-color:var(--cc-panel-deep)!important;background-image:radial-gradient(var(--cc-line) .7px,transparent .7px)!important;background-size:18px 18px!important}
body.social-authenticated #social-shell .direct-chat-empty{left:0!important;right:0!important;width:100%!important;max-width:none!important;transform:none!important;margin:0!important;padding:20px!important;box-sizing:border-box!important}
body.social-authenticated #social-shell .direct-chat-message{max-width:min(82%,520px)!important;padding:12px 15px!important;background:var(--cc-incoming)!important;border:1px solid var(--cc-line)!important;border-radius:13px 13px 13px 4px!important;color:var(--cc-text)!important;box-shadow:0 2px 4px #00000005!important}
body.social-authenticated #social-shell .direct-chat-message.outgoing{background:var(--cc-outgoing)!important;border-color:color-mix(in srgb,var(--cc-accent) 15%,var(--cc-line))!important;border-radius:13px 13px 4px 13px!important}
body.social-authenticated #social-shell .direct-chat-message p{font-family:var(--halo-chat-font,inherit)!important;font-size:var(--halo-chat-size,15px)!important;color:inherit!important;line-height:1.55!important}
body.social-authenticated #social-shell .direct-chat-message time{font-size:10px!important;color:var(--cc-muted)!important}
body.social-authenticated #social-shell .direct-chat-message .translated{color:var(--cc-accent)!important}
body.social-authenticated #social-shell .direct-chat-form{flex:0 0 auto!important;position:relative!important;inset:auto!important;width:100%!important;max-width:none!important;margin:0!important;padding:12px 16px 16px!important;border:0!important;background:var(--cc-panel-deep)!important;border-radius:0!important;transform:none!important}
body.social-authenticated #social-shell .direct-chat-form>:is(#direct-chat-composer,#halo-group-composer){position:relative!important;inset:auto!important;transform:none!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;min-width:0!important;width:100%!important;border-radius:24px!important;background:var(--cc-panel)!important;border-color:var(--cc-line)!important;box-shadow:0 3px 16px #00000009!important}
body.social-authenticated #social-shell :is(#direct-chat-composer,#halo-group-composer)>button{border-radius:50%!important}
body.social-authenticated #social-shell :is(#direct-chat-send,#halo-group-submit){background:var(--cc-accent)!important;color:#fff!important}
body.social-authenticated #social-shell .halo-transfer-tray{flex:0 0 auto!important;max-height:140px!important;background:var(--cc-panel)!important;color:var(--cc-text)!important;border-color:var(--cc-line)!important}
body.social-authenticated #social-shell .halo-contact-details-sidebar{position:absolute!important;inset:0 0 0 auto!important;z-index:80!important;width:min(300px,100%)!important;height:100%!important;background:var(--cc-panel)!important;color:var(--cc-text)!important;box-shadow:-8px 0 24px #00000012!important;overflow:hidden!important;transform:translateX(105%)!important;transition:transform .2s ease!important}
body.social-authenticated #social-shell .halo-contact-details-sidebar[hidden]{display:none!important}
body.social-authenticated #social-shell .halo-contact-details-sidebar.is-open{display:block!important;transform:none!important}
body.social-authenticated #social-shell .halo-contact-sidebar-head{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:16px!important;border-bottom:1px solid var(--cc-line)!important}
body.social-authenticated #social-shell .halo-contact-details-close{width:32px!important;height:32px!important;border:0!important;border-radius:50%!important;background:var(--cc-panel-raised)!important;color:var(--cc-text)!important;font-size:20px!important;cursor:pointer!important}
body.social-authenticated #social-shell .halo-contact-sidebar-scroll{height:calc(100% - 66px)!important;overflow:auto!important;padding:24px 20px!important;text-align:center!important}
body.social-authenticated #social-shell .halo-contact-details-avatar{min-width:100px!important;min-height:100px!important;max-width:100px!important;max-height:100px!important;aspect-ratio:1!important;flex:none!important;box-sizing:border-box!important;display:grid!important;place-items:center!important;width:100px!important;height:100px!important;margin:0 auto 16px!important;padding:0!important;border:0!important;border-radius:50%!important;background:var(--cc-accent-soft)!important;color:var(--cc-accent)!important;overflow:hidden!important;font-size:28px!important;cursor:pointer!important}
body.social-authenticated #social-shell .halo-contact-details-avatar img{width:100%!important;height:100%!important;object-fit:cover!important}
body.social-authenticated #social-shell .halo-contact-sidebar-scroll h2{font-size:19px!important;color:var(--cc-text)!important}
body.social-authenticated #social-shell .halo-contact-details-username{color:var(--cc-accent)!important;font-size:12px!important}
body.social-authenticated #social-shell .halo-contact-details-country{color:var(--cc-muted)!important;font-size:12px!important}
body.social-authenticated #social-shell .halo-contact-detail-row{grid-template-columns:1fr!important;display:grid!important;gap:6px!important;padding:14px 0!important;border-bottom:1px solid var(--cc-line)!important;text-align:left!important;overflow-wrap:anywhere!important}
body.social-authenticated #social-shell .halo-contact-detail-row b{font-size:10px!important;text-transform:uppercase!important;letter-spacing:.06em!important;color:var(--cc-muted)!important}
body.social-authenticated #social-shell .halo-contact-detail-row span{font-size:13px!important;color:var(--cc-text)!important}
body.social-authenticated #social-shell .halo-contact-detail-tags{display:flex!important;flex-wrap:wrap!important;gap:5px!important}
body.social-authenticated #social-shell .halo-contact-detail-tags i{font-style:normal!important;border-radius:8px!important;background:var(--cc-panel-raised)!important;padding:5px!important;font-size:11px!important}
body.social-authenticated #social-shell .halo-contact-details-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:20px!important}
body.social-authenticated #social-shell .halo-contact-details-actions button{min-height:44px!important;border:1px solid var(--cc-line)!important;border-radius:12px!important;background:var(--cc-panel-raised)!important;color:var(--cc-text)!important;cursor:pointer!important}
body.social-authenticated #social-shell .halo-contact-details-actions button span{display:block!important;font-size:11px!important}
body.social-authenticated #halo-group-workspace{color:var(--cc-text)}
body.social-authenticated :focus-visible{outline:2px solid var(--cc-accent)!important;outline-offset:3px}
@media(min-width:1280px){body.social-authenticated #social-shell :is(#direct-chat-card,#halo-group-detail):has(.halo-contact-details-sidebar.is-open){padding-right:240px!important}body.social-authenticated #social-shell .halo-contact-details-sidebar{width:240px!important;box-shadow:none!important;border-left:1px solid var(--cc-line)!important}}
@media(min-width:681px) and (max-width:1000px){body.social-authenticated #social-shell.social-shell{grid-template-columns:76px minmax(0,1fr)!important}body.social-authenticated #social-shell.social-shell .social-rail{width:76px!important;padding:20px 8px!important}body.social-authenticated #social-shell.social-shell .social-nav-button{flex-direction:column!important;justify-content:center!important;gap:6px!important;padding:10px 4px!important}body.social-authenticated #social-shell.social-shell .social-nav-button b{font-size:9px!important}body.social-authenticated #social-shell .social-dashboard-grid{grid-template-columns:260px minmax(0,1fr)!important}body.social-authenticated #social-shell .social-rail-brand{padding:0!important;justify-items:center!important}}
@media(max-width:680px){
 body.social-authenticated .app-shell{width:100%!important;height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important}
 body.social-authenticated .topbar{flex-basis:60px!important;height:60px!important;min-height:60px!important;padding:8px 16px!important;margin:0!important;border-radius:0!important}
 body.social-authenticated #social-shell.social-shell{display:block!important;position:relative!important;height:calc(100% - 60px)!important;padding:0 0 calc(68px + env(safe-area-inset-bottom))!important;overflow:hidden!important}
 body.social-authenticated #social-shell.social-shell .social-rail{position:absolute!important;inset:auto 0 0!important;display:block!important;width:100%!important;height:calc(68px + env(safe-area-inset-bottom))!important;min-height:0!important;margin:0!important;padding:6px 8px calc(6px + env(safe-area-inset-bottom))!important;border:0!important;border-top:1px solid var(--cc-line)!important;border-radius:0!important;background:var(--cc-panel)!important;overflow:visible!important;z-index:100!important}
 body.social-authenticated #social-shell.social-shell .social-rail-brand,body.social-authenticated #social-shell .social-rail-security{display:none!important}
 body.social-authenticated #social-shell.social-shell .social-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important;height:56px!important}
 body.social-authenticated #social-shell.social-shell .social-nav-button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-height:52px!important;padding:5px 2px!important;border-radius:10px!important}
 body.social-authenticated #social-shell.social-shell .social-nav-button b{font-size:10px!important}
 body.social-authenticated #social-shell .social-dashboard-grid{display:block!important;height:100%!important}
 body.social-authenticated #social-shell .social-dashboard-grid:not(.direct-chat-open):after{display:none!important}
 body.social-authenticated #social-shell .social-dashboard-grid.direct-chat-open .social-contacts-card{display:none!important}
 body.social-authenticated #social-shell .social-contacts-card{border:0!important}
 body.social-authenticated #social-shell .social-card-head{padding:18px 18px 8px!important}
 body.social-authenticated #social-shell .social-card-head h2{font-size:23px!important}
 body.social-authenticated #social-shell .social-contact-list{padding:0 10px 12px!important}
 body.social-authenticated #social-shell .social-contact{grid-template-columns:50px minmax(0,1fr) auto!important;min-height:82px!important}
 body.social-authenticated #social-shell .social-contact-avatar{width:50px!important;height:50px!important}
 body.social-authenticated #social-shell :is(#direct-chat-card,#halo-group-detail):not([hidden]){position:relative!important;inset:auto!important;height:100%!important;border-radius:0!important}
 body.social-authenticated #social-shell .direct-chat-header{grid-template-columns:30px 40px minmax(0,1fr) auto!important;grid-template-areas:'back avatar identity actions'!important;min-height:72px!important;padding:10px 12px!important;gap:7px!important}
 body.social-authenticated #social-shell #direct-chat-back{grid-area:back!important;display:grid!important;place-items:center!important;width:30px!important;height:40px!important;background:transparent!important;border:0!important;color:var(--cc-text)!important}
 body.social-authenticated #social-shell #direct-chat-avatar{width:40px!important;height:40px!important}
 body.social-authenticated #social-shell .direct-chat-identity h2{font-size:13px!important}
 body.social-authenticated #social-shell .direct-chat-actions{gap:2px!important}
 body.social-authenticated #social-shell .direct-chat-actions button{width:28px!important;min-width:28px!important;height:32px!important;padding:4px!important}
 body.social-authenticated #social-shell .direct-chat-meta{font-size:9px!important}
 body.social-authenticated #social-shell :is(#direct-chat-messages,#halo-group-messages){padding:18px 14px!important;gap:12px!important}
 body.social-authenticated #social-shell .direct-chat-message{max-width:90%!important;padding:10px 12px!important}
 body.social-authenticated #social-shell .direct-chat-form{padding:8px 10px 12px!important}
 body.social-authenticated #social-shell .halo-contact-details-sidebar{width:100%!important}
}
/* Preserve device chat personalization instead of replacing its preferences. */
html[data-halo-chat-background=clean] body.social-authenticated #social-shell :is(#direct-chat-messages,#halo-group-messages){background-image:none!important}
html[data-halo-chat-background=grid] body.social-authenticated #social-shell :is(#direct-chat-messages,#halo-group-messages){background-image:linear-gradient(var(--cc-line) 1px,transparent 1px),linear-gradient(90deg,var(--cc-line) 1px,transparent 1px)!important;background-size:24px 24px!important}
html[data-halo-chat-background=aurora] body.social-authenticated #social-shell :is(#direct-chat-messages,#halo-group-messages){background-image:radial-gradient(ellipse at top right,color-mix(in srgb,var(--halo-chat-accent) 16%,transparent),transparent 65%)!important}
html[data-halo-chat-shape=soft] body.social-authenticated #social-shell .direct-chat-message{border-radius:12px!important}
html[data-halo-chat-shape=square] body.social-authenticated #social-shell .direct-chat-message{border-radius:5px!important}
html[data-halo-chat-density=compact] body.social-authenticated #social-shell :is(#direct-chat-messages,#halo-group-messages){gap:7px!important}
html[data-halo-chat-density=spacious] body.social-authenticated #social-shell :is(#direct-chat-messages,#halo-group-messages){gap:20px!important}
@media(prefers-reduced-motion:reduce){body.social-authenticated #social-shell .halo-contact-details-sidebar{transition:none!important}}

html[data-halo-chat-color] body.social-authenticated #social-shell .direct-chat-message.outgoing{background:color-mix(in srgb,var(--halo-chat-accent) 18%,var(--cc-panel))!important}
html[data-chat-theme=ice] body.social-authenticated #social-shell :is(#direct-chat-card,#halo-group-detail){--cc-panel-deep:#edf6ff;--cc-incoming:#fff;--cc-outgoing:#dcecff;--cc-text:#13243a;--cc-muted:#60758c;--cc-line:#cfe0f2}
html[data-chat-theme=midnight] body.social-authenticated #social-shell :is(#direct-chat-card,#halo-group-detail){--cc-panel-deep:#080d1b;--cc-incoming:#151d2c;--cc-text:#edf3f8;--cc-muted:#9eafbe;--cc-line:#2a3948}
html[data-chat-theme=rose] body.social-authenticated #social-shell :is(#direct-chat-card,#halo-group-detail){--cc-panel-deep:#211422;--cc-incoming:#352034;--cc-text:#fff0f8;--cc-muted:#c5a9bf;--cc-line:#54334e}
html[data-chat-theme=mint] body.social-authenticated #social-shell :is(#direct-chat-card,#halo-group-detail){--cc-panel-deep:#0b1b1a;--cc-incoming:#15312c;--cc-text:#edf8f3;--cc-muted:#a2beb1;--cc-line:#2c4c43}
html[data-halo-chat-theme=soft] body.social-authenticated #social-shell .direct-chat-message{box-shadow:0 5px 14px #0000000a!important}
html[data-halo-chat-theme=midnight] body.social-authenticated #social-shell :is(#direct-chat-messages,#halo-group-messages){background-color:#101826!important}
