/* Channel composer fixes: keyboard lift, native media, GIF + notification controls. */
.icu-thread .icu-composer{
  grid-template-columns:none!important;
  bottom:var(--icu-keyboard-height,0px)!important;
  transition:bottom .16s ease-out;
}
.icu-thread .icu-composer.icu-keyboard-open{padding-bottom:8px!important}
.icu-bell-round,.icu-gif-round{
  display:grid;
  place-items:center;
  align-self:center;
  width:36px;
  height:36px;
  min-width:36px;
  padding:0;
  border:1px solid var(--iris-line,#ddd8e0);
  border-radius:50%;
  background:var(--iris-surface,#fff);
  color:var(--iris-muted,#817a87);
  font:inherit;
  font-size:9px;
  font-weight:800;
  line-height:1;
}
.icu-bell-round svg,.icu-channel-media-icon svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.icu-bell-round[data-silent="0"]{color:var(--iris-accent,#7052e7)}
.icu-gif-round{letter-spacing:-.03em;color:var(--iris-accent,#7052e7)}
.icu-gif-round[hidden]{display:none!important}
.icu-channel-media-preview{
  grid-column:1/-1;
  display:flex;
  gap:7px;
  max-width:100%;
  overflow-x:auto;
  padding:0 2px 2px;
  scrollbar-width:none;
}
.icu-channel-media-preview::-webkit-scrollbar{display:none}
.icu-channel-media-item{
  position:relative;
  flex:0 0 58px;
  width:58px;
  height:58px;
  overflow:hidden;
  border:1px solid var(--iris-line,#ddd8e0);
  border-radius:11px;
  background:var(--iris-surface-2,#f4f2f6);
}
.icu-channel-media-item img{display:block;width:100%;height:100%;object-fit:cover}
.icu-channel-media-item button{
  position:absolute;
  top:3px;
  right:3px;
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  padding:0;
  border:0;
  border-radius:50%;
  background:#000b;
  color:#fff;
  font:inherit;
  font-size:15px;
  line-height:1;
}
.icu-channel-two-option-sheet{padding-bottom:calc(22px + env(safe-area-inset-bottom))}
.icu-channel-media-choices{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.icu-channel-media-choice{
  display:grid;
  justify-items:center;
  gap:9px;
  min-height:96px;
  padding:14px 10px;
  border:1px solid var(--iris-line,#e4dfe6);
  border-radius:16px;
  background:var(--iris-surface-2,#f5f3f6);
  color:var(--iris-text,#211e25);
  font:inherit;
  font-size:12px;
  font-weight:720;
}
.icu-channel-media-icon{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:50%;
  background:var(--iris-surface,#fff);
  color:var(--iris-accent,#7052e7);
  box-shadow:0 1px 3px #0000000d;
}
.icu-channel-media-icon svg{width:23px;height:23px}
.icu-channel-gif{
  display:block;
  width:100%;
  max-height:58vh;
  margin:-8px -9px 7px;
  border-radius:15px 15px 10px 4px;
  object-fit:contain;
  background:#111;
}
body.iris-chat-open .icu-page{
  overscroll-behavior-y:contain!important;
}
.icu-broadcast{
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
}
.icu-broadcast.icu-long-pressing{transform:scale(.985);transition:transform .12s ease}
.icu-post-action-overlay{
  position:fixed;
  inset:0;
  z-index:2147482900;
  background:transparent;
}
.icu-post-action-toolbar{
  position:fixed;
  display:flex;
  overflow:hidden;
  transform:translate(-50%,-100%);
  border:1px solid color-mix(in srgb,var(--iris-line,#ddd8e0) 90%,transparent);
  border-radius:12px;
  background:color-mix(in srgb,var(--iris-surface,#fff) 96%,transparent);
  box-shadow:0 8px 28px #0003;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.icu-post-action-toolbar button{
  min-width:74px;
  min-height:42px;
  padding:0 14px;
  border:0;
  border-right:1px solid var(--iris-line,#e4dfe6);
  background:transparent;
  color:var(--iris-text,#211e25);
  font:inherit;
  font-size:13px;
  font-weight:720;
}
.icu-post-action-toolbar button:last-child{border-right:0}
.icu-post-action-toolbar button.danger{color:#d14f5d}
.icu-post-edit-sheet textarea{
  box-sizing:border-box;
  width:100%;
  min-height:116px;
  padding:12px;
  border:1px solid var(--iris-line,#ded9e0);
  border-radius:13px;
  background:var(--iris-surface-2,#f5f3f6);
  color:var(--iris-text,#211e25);
  font:inherit;
  font-size:15px;
  line-height:1.35;
  resize:none;
  outline:0;
}
.icu-post-edit-sheet textarea:focus{border-color:color-mix(in srgb,var(--iris-accent,#7052e7) 55%,var(--iris-line,#ded9e0))}
.icu-post-edit-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.icu-post-edit-actions button{
  min-height:44px;
  border:1px solid var(--iris-line,#e3dfe5);
  border-radius:12px;
  background:var(--iris-surface-2,#f5f3f6);
  color:var(--iris-text,#211e25);
  font:inherit;
  font-weight:720;
}
.icu-post-edit-actions button.primary{border-color:transparent;background:var(--iris-accent,#7052e7);color:#fff}
@media(max-width:420px){
  .icu-thread .icu-composer{
    grid-template-columns:none!important;
    gap:5px!important;
    padding-inline:8px!important;
  }
  .icu-bell-round,.icu-gif-round{width:34px;height:34px;min-width:34px}
}

/* Unified Iris glass composer treatment — matches the floating navbar. */
:where(.conversation-screen .message-compose,
  .group-chat-screen .group-message-compose,
  .thread-comment-composer,
  .icu-thread .icu-composer,
  .comment-form){
  box-sizing:border-box;
  border:1px solid color-mix(in srgb,var(--iris-line,#ececef) 72%,var(--iris-accent,#7052e7) 28%)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--iris-surface,#fff) 70%,transparent)!important;
  box-shadow:0 14px 36px var(--iris-shadow,rgba(0,0,0,.14)),inset 0 1px 0 color-mix(in srgb,var(--iris-text,#211e25) 9%,transparent)!important;
  backdrop-filter:blur(24px) saturate(1.28)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.28)!important;
}
:where(.conversation-screen .message-compose textarea,
  .group-chat-screen .group-message-compose textarea,
  .thread-comment-input,
  .icu-compose-input,
  .comment-form input){
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--iris-text,#211e25)!important;
  box-shadow:none!important;
}
:where(.conversation-screen .message-gif-button,
  .group-chat-screen .group-message-gif-button,
  .thread-comment-photo,
  .thread-comment-gif-button,
  .icu-compose-round,
  .icu-bell-round,
  .icu-gif-round){
  border:0!important;
  background:transparent!important;
  color:var(--iris-accent,#7052e7)!important;
  box-shadow:none!important;
}
:where(.conversation-screen .message-compose .primary,
  .group-chat-screen .group-send,
  .thread-comment-send,
  .icu-send,
  .comment-form .quiet){
  border:0!important;
  border-radius:999px!important;
  background:var(--iris-accent,#7052e7)!important;
  color:var(--iris-button-text,#fff)!important;
  box-shadow:none!important;
}
.thread-comment-form{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;
}
.thread-comment-composer{
  align-items:center!important;
  gap:7px!important;
  padding:5px 7px!important;
}
.comment-form{
  align-items:center;
  gap:7px!important;
  margin-top:12px;
  padding:5px 7px!important;
}
.comment-form input{min-height:40px!important;padding:8px 13px!important;}
.comment-form .quiet{min-height:40px;padding:0 13px!important;font-weight:700;}

/* Normal chats use flex, not a fixed grid. Hidden GIF controls therefore
   collapse completely instead of leaving an empty column that shifts the
   Message field and send button to one side. */
body.iris-chat-open #app .conversation-screen .message-compose,
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-compose{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  width:calc(100% - 20px)!important;
  min-width:0!important;
  max-width:660px!important;
  margin:0 10px max(6px,env(safe-area-inset-bottom))!important;
  padding:5px 7px!important;
  transform:none!important;
  flex:0 0 auto!important;
  border:1px solid color-mix(in srgb,var(--iris-line,#ececef) 72%,var(--iris-accent,#7052e7) 28%)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--iris-surface,#fff) 70%,transparent)!important;
  box-shadow:0 14px 36px var(--iris-shadow,rgba(0,0,0,.14)),inset 0 1px 0 color-mix(in srgb,var(--iris-text,#211e25) 9%,transparent)!important;
  backdrop-filter:blur(24px) saturate(1.28)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.28)!important;
}
body.iris-chat-open #app .conversation-screen .message-compose:focus-within,
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-compose:focus-within{
  margin-bottom:4px!important;
}
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-gif-button{
  flex:0 0 38px!important;
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
}
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-compose textarea{
  flex:1 1 0!important;
  min-width:0!important;
  width:auto!important;
  min-height:40px!important;
  height:40px;
  padding:9px 12px!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-gif-button{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-send{
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
}
body.iris-chat-open #app .conversation-screen .message-compose textarea{
  flex:1 1 0!important;
  min-width:0!important;
  width:auto!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Channel broadcast composer is a floating capsule, not a full-width footer. */
.icu-thread .icu-composer{
  width:min(calc(100% - 20px),700px)!important;
  padding:5px 7px!important;
  border:1px solid color-mix(in srgb,var(--iris-line,#ececef) 72%,var(--iris-accent,#7052e7) 28%)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--iris-surface,#fff) 70%,transparent)!important;
  box-shadow:0 14px 36px var(--iris-shadow,rgba(0,0,0,.14)),inset 0 1px 0 color-mix(in srgb,var(--iris-text,#211e25) 9%,transparent)!important;
  backdrop-filter:blur(24px) saturate(1.28)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.28)!important;
  bottom:calc(var(--icu-keyboard-height,0px) + max(8px,env(safe-area-inset-bottom)))!important;
}
.icu-thread .icu-composer.icu-keyboard-open{
  bottom:var(--icu-keyboard-height,0px)!important;
  padding-bottom:5px!important;
}

/* Keep Channel Discussion keyboard-height logic, but make the shell a real
   floating glass pill instead of a full-width bottom sheet. */
.group-chat-screen.channel-discussion-screen .channel-discussion-compose{
  left:10px!important;
  right:10px!important;
  width:auto!important;
  padding:5px 7px!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--iris-surface,#fff) 70%,transparent)!important;
  box-shadow:0 14px 36px var(--iris-shadow,rgba(0,0,0,.14)),inset 0 1px 0 color-mix(in srgb,var(--iris-text,#211e25) 9%,transparent)!important;
  backdrop-filter:blur(24px) saturate(1.28)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.28)!important;
}
.group-chat-screen.channel-discussion-screen .channel-discussion-compose:not(.keyboard-open){
  bottom:max(8px,env(safe-area-inset-bottom))!important;
}
.group-chat-screen.channel-discussion-screen .channel-discussion-compose.keyboard-open{
  bottom:var(--iris-discussion-keyboard-height,0px)!important;
  padding-bottom:5px!important;
}

/* Screenshot-reference composer system: chat pill vs. broadcast pill. */
.iris-composer-plus{
  display:grid!important;
  place-items:center!important;
  flex:0 0 36px!important;
  width:36px!important;
  min-width:36px!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--iris-accent,#7052e7)!important;
  font:inherit!important;
  font-size:30px!important;
  font-weight:350!important;
  line-height:1!important;
  box-shadow:none!important;
}
.iris-composer-plus:disabled{opacity:.45!important}

/* Chat / Group / DM pill: reference = supplied Group screenshot. */
body.iris-chat-open #app .conversation-screen .message-compose,
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-compose{
  width:calc(100% - 52px)!important;
  max-width:628px!important;
  min-height:54px!important;
  margin:0 26px max(8px,env(safe-area-inset-bottom))!important;
  padding:5px 7px!important;
  gap:3px!important;
  border-radius:999px!important;
}
body.iris-chat-open #app .conversation-screen .message-compose:focus-within,
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-compose:focus-within{
  margin-bottom:4px!important;
}
body.iris-chat-open #app .conversation-screen .message-gif-button,
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-gif-button{
  display:grid!important;
  place-items:center!important;
  flex:0 0 36px!important;
  width:36px!important;
  min-width:36px!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--iris-accent,#7052e7)!important;
  font-size:11px!important;
  font-weight:800!important;
}
body.iris-chat-open #app .conversation-screen .message-compose textarea,
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-compose textarea{
  flex:1 1 0!important;
  width:auto!important;
  min-width:0!important;
  min-height:42px!important;
  height:42px;
  max-height:104px!important;
  padding:10px 8px!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.iris-chat-open #app .conversation-screen .message-compose .primary,
body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-send{
  display:grid!important;
  place-items:center!important;
  flex:0 0 44px!important;
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  border-radius:50%!important;
  font-size:24px!important;
  line-height:1!important;
}

/* Post comments use the exact same chat pill instead of styling the footer. */
.thread-comment-form{
  padding:9px 26px calc(9px + env(safe-area-inset-bottom))!important;
}
.thread-comment-composer{
  display:grid!important;
  grid-template-columns:none!important;
  align-items:center!important;
  gap:3px!important;
  width:100%!important;
  min-height:54px!important;
  padding:5px 7px!important;
  border:1px solid color-mix(in srgb,var(--iris-line,#ececef) 72%,var(--iris-accent,#7052e7) 28%)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--iris-surface,#fff) 70%,transparent)!important;
  box-shadow:0 14px 36px var(--iris-shadow,rgba(0,0,0,.14)),inset 0 1px 0 color-mix(in srgb,var(--iris-text,#211e25) 9%,transparent)!important;
  backdrop-filter:blur(24px) saturate(1.28)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.28)!important;
}
.thread-comment-composer.without-gif{grid-template-columns:none!important}
.thread-comment-photo,.thread-comment-gif-button{
  display:grid!important;
  place-items:center!important;
  width:36px!important;
  min-width:36px!important;
  max-width:36px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--iris-accent,#7052e7)!important;
  box-shadow:none!important;
}
.thread-comment-photo{font-size:30px!important;font-weight:350!important;line-height:1!important}
.thread-comment-gif-button{font-size:11px!important;font-weight:800!important}
.thread-comment-input{
  min-height:42px!important;
  height:42px;
  padding:10px 8px!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
}
.thread-comment-send{
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  min-width:44px!important;
  max-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  padding:0!important;
  border-radius:50%!important;
  font-size:24px!important;
  line-height:1!important;
}

/* Linked Channel discussions use the same chat pill and controls. */
.group-chat-screen.channel-discussion-screen .channel-discussion-compose{
  left:26px!important;
  right:26px!important;
  display:flex!important;
  align-items:center!important;
  gap:3px!important;
  width:auto!important;
  min-height:54px!important;
  padding:5px 7px!important;
}
.group-chat-screen.channel-discussion-screen .channel-discussion-compose .iris-composer-plus,
.group-chat-screen.channel-discussion-screen .channel-discussion-compose .group-message-gif-button{
  flex:0 0 36px!important;
  width:36px!important;
  min-width:36px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--iris-accent,#7052e7)!important;
}
.group-chat-screen.channel-discussion-screen .channel-discussion-compose .group-message-gif-button{
  display:grid!important;place-items:center!important;font-size:11px!important;font-weight:800!important;border-radius:999px!important;
}
.group-chat-screen.channel-discussion-screen .channel-discussion-compose textarea{
  flex:1 1 0!important;
  width:auto!important;
  min-width:0!important;
  min-height:42px!important;
  height:42px;
  padding:10px 8px!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
}
.group-chat-screen.channel-discussion-screen .channel-discussion-compose .group-send{
  flex:0 0 44px!important;
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  padding:0!important;
  border-radius:50%!important;
}

/* Channel broadcast pill: reference = supplied OGU screenshot. */
.icu-thread .icu-composer{
  grid-template-columns:none!important;
  align-items:center!important;
  gap:4px!important;
  width:min(calc(100% - 20px),700px)!important;
  min-height:56px!important;
  padding:5px 7px!important;
}
.icu-thread .icu-compose-round{
  width:42px!important;height:44px!important;min-width:42px!important;
  border:0!important;background:transparent!important;color:var(--iris-accent,#7052e7)!important;
  font-size:32px!important;font-weight:350!important;
}
.icu-thread .icu-compose-input{
  min-height:44px!important;
  height:44px;
  padding:10px 14px!important;
  border:0!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--iris-surface-2,#f0edf2) 92%,transparent)!important;
  box-shadow:none!important;
}
.icu-thread .icu-gif-round{
  width:34px!important;height:40px!important;min-width:34px!important;
  border:0!important;background:transparent!important;font-size:10px!important;
}
.icu-thread .icu-bell-round{
  width:36px!important;height:40px!important;min-width:36px!important;
  border:0!important;background:transparent!important;
}
.icu-thread .icu-send{
  width:44px!important;height:44px!important;min-width:44px!important;
  border-radius:50%!important;font-size:24px!important;
}

/* Legacy inline feed comments use the same chat reference pill. */
.comment-form{
  display:grid!important;
  grid-template-columns:none!important;
  align-items:center!important;
  gap:3px!important;
  width:calc(100% - 52px)!important;
  min-height:54px!important;
  margin:12px 26px!important;
  padding:5px 7px!important;
  border:1px solid color-mix(in srgb,var(--iris-line,#ececef) 72%,var(--iris-accent,#7052e7) 28%)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--iris-surface,#fff) 70%,transparent)!important;
  box-shadow:0 14px 36px var(--iris-shadow,rgba(0,0,0,.14)),inset 0 1px 0 color-mix(in srgb,var(--iris-text,#211e25) 9%,transparent)!important;
  backdrop-filter:blur(24px) saturate(1.28)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.28)!important;
}
.comment-form .iris-composer-plus,
.comment-form .iris-gif-button{
  display:grid!important;
  place-items:center!important;
  width:36px!important;
  min-width:36px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--iris-accent,#7052e7)!important;
  box-shadow:none!important;
}
.comment-form .iris-gif-button{font-size:11px!important;font-weight:800!important}
.comment-form input{
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  height:42px!important;
  padding:10px 8px!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  box-shadow:none!important;
}
.comment-form .quiet{
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  min-width:44px!important;
  max-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  border-radius:50%!important;
  font-size:24px!important;
  line-height:1!important;
}
.comment-form .iris-gif-button[hidden]{display:none!important}
.comment-form:has(.iris-gif-button[hidden]){
  grid-template-columns:none!important;
}

/* Encrypted photos render like first-class message media. */
.group-message-photo,.dm-message-photo{
  display:block!important;
  width:auto!important;
  max-width:min(72vw,330px)!important;
  max-height:360px!important;
  border-radius:16px!important;
  object-fit:contain!important;
  background:transparent!important;
}
.group-message-photo-wrap,.dm-message-photo-wrap{background:transparent!important;border:0!important;box-shadow:none!important}

@media(max-width:360px){
  body.iris-chat-open #app .conversation-screen .message-compose,
  body.iris-chat-open #app .group-chat-screen:not(.channel-discussion-screen) .group-message-compose{width:calc(100% - 32px)!important;margin-inline:16px!important}
  .thread-comment-form{padding-inline:16px!important}
  .group-chat-screen.channel-discussion-screen .channel-discussion-compose{left:16px!important;right:16px!important}
}
