/* Circlique direct-message compatibility styles — original order preserved. */

/* directMessageBottomStackFixV1 */
/*
 * Keep the direct-message footer controls in normal document flow.
 * A legacy global .messageComposer sticky offset is intentionally overridden
 * only for #chatPane so the Premium banner can never sit behind the composer.
 */
body.chatOpen #chatPane > #chatQuotaBar{
  position:relative;
  inset:auto;
  z-index:6;
  flex:0 0 auto;
  margin:7px 0 0;
}
body.chatOpen #chatPane > .messageComposer{
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  z-index:6;
  flex:0 0 auto;
  margin:8px 0 0!important;
}
body.chatOpen #chatPane > .tiny{
  position:relative;
  flex:0 0 auto;
  margin:0;
  padding:9px 5px calc(12px + env(safe-area-inset-bottom))!important;
}
/* Keep the floating feedback control above the complete banner/composer/footer stack. */
body.chatOpen #betaFeedbackFabV2.chatModeV2{
  bottom:calc(218px + env(safe-area-inset-bottom))!important;
}
@media(max-width:600px){
  body.chatOpen #chatPane{
    box-sizing:border-box;
    height:100dvh;
    min-height:0!important;
    overflow:hidden;
  }
  body.chatOpen #chatPane > .chatBox{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
}

/* compactDirectMessageComposerV4 */
body.chatOpen #chatPane > .msgPhotoPreviewV3{
  position:relative;
  z-index:6;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) 38px;
  align-items:center;
  gap:9px;
  flex:0 0 auto;
  min-height:62px;
  margin:7px 0 0;
  padding:6px 8px;
  border:1px solid #53335d;
  border-radius:14px;
  background:#160d1b;
}
body.chatOpen #chatPane > .msgPhotoPreviewV3.hidden{display:none!important}
.msgPhotoPreviewV3 img{width:50px;height:50px;display:block;object-fit:cover;border-radius:10px;border:1px solid #6d4378;background:#0d0910}
.msgPhotoPreviewTextV3{min-width:0;display:flex;flex-direction:column;gap:2px;font-size:11px}
.msgPhotoPreviewTextV3 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#aa9caf;font-size:10px}
body.chatOpen #chatPane > .messageComposerCompactV4{
  display:grid!important;
  grid-template-columns:44px 44px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:7px!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-height:58px!important;
  max-height:60px!important;
  padding:6px!important;
  overflow:visible!important;
}
.messageComposerCompactV4 #msgPhotoFileV3{display:none!important}
.messageComposerCompactV4 #msgPhotoBtnV3{
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  border-radius:13px!important;
  font-size:20px!important;
  line-height:1!important;
  flex:none!important;
}
.messageComposerCompactV4 #messageInput{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  margin:0!important;
  padding:8px 9px!important;
  font-size:14px!important;
  line-height:1.2!important;
}
.messageComposerCompactV4 #messageSendBtn{
  width:auto!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:8px 13px!important;
  white-space:nowrap!important;
}
@media(max-width:370px){
  .messageComposerCompactV4 #messageSendBtn{padding-inline:10px!important}
  body.chatOpen #chatPane > .messageComposerCompactV4{gap:5px!important}
}

/* directMessageComposerGuardV5 */
/* The direct-message composer owns exactly four controls. Legacy file-picker
   helpers must not create additional grid items or expose instructional UI. */
body.chatOpen #chatPane > .messageComposerCompactV4{
  display:grid!important;
  grid-template-columns:44px 44px minmax(0,1fr) auto!important;
  grid-template-rows:44px!important;
  align-items:center!important;
  height:58px!important;
  min-height:58px!important;
  max-height:58px!important;
}
body.chatOpen #chatPane > .messageComposerCompactV4 > :not(#msgPhotoBtnV3):not(#msgVoiceBtnV15):not(#msgPhotoFileV3):not(#messageInput):not(#messageSendBtn){
  display:none!important;
}
body.chatOpen #chatPane > .messageComposerCompactV4 > #msgPhotoFileV3{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  min-height:0!important;
  opacity:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
}
body.chatOpen #chatPane > .messageComposerCompactV4 > #msgPhotoBtnV3{grid-column:1!important;grid-row:1!important}
body.chatOpen #chatPane > .messageComposerCompactV4 > #messageInput{grid-column:3!important;grid-row:1!important;display:block!important}
body.chatOpen #chatPane > .messageComposerCompactV4 > #messageSendBtn{grid-column:4!important;grid-row:1!important;display:block!important}


/* phase10MobileComposerV1
 * Let direct messages expand to several lines without triggering iOS form zoom.
 */
body.chatOpen #chatPane > .messageComposerCompactV4{
  grid-template-rows:minmax(44px,auto)!important;
  align-items:end!important;
  height:auto!important;
  min-height:58px!important;
  max-height:132px!important;
}
body.chatOpen #chatPane > .messageComposerCompactV4 > #messageInput{
  height:44px!important;
  min-height:44px!important;
  max-height:112px!important;
  overflow-y:auto!important;
  resize:none!important;
  padding:11px 10px!important;
  font-size:16px!important;
  line-height:1.35!important;
}
body.chatOpen #chatPane > .messageComposerCompactV4 > #msgPhotoBtnV3,
body.chatOpen #chatPane > .messageComposerCompactV4 > #messageSendBtn{
  align-self:end!important;
}

body.chatOpen #chatPane > .messageComposerCompactV4 > #msgVoiceBtnV15{grid-column:2!important;grid-row:1!important;display:grid!important;place-items:center;align-self:end;width:44px;height:44px;padding:0;margin:0;font-size:20px}

.msgSendingIdentityV26{flex-basis:100%;width:100%;font-size:13px;color:var(--muted);overflow-wrap:anywhere;padding:2px 0 6px}

.msgInboxSearchV27{flex-basis:100%;width:100%;min-width:0}.msgCardV3[hidden]{display:none!important}

.msgDateSeparatorV29{text-align:center;font-size:12px;color:var(--muted);padding:14px 6px 8px;clear:both}
