/* ChatTasking thread-page corrections · 2026-07-26
   Loaded only by the public discussion page. */

/* Keep message action menus above later reply cards instead of clipping them. */
body.public-shell .thread-main .message{
  overflow:visible;
  isolation:isolate;
  z-index:1;
}
body.public-shell .thread-main .message.message-menu-open,
body.public-shell .thread-main .message:has(.action-menu[open]){
  z-index:120;
}
body.public-shell .thread-main .action-menu{
  z-index:2;
}
body.public-shell .thread-main .action-menu[open]{
  z-index:130;
}
body.public-shell .thread-main .action-menu summary{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:34px;
  background:var(--surface);
}
body.public-shell .thread-main .action-menu[open] summary{
  color:var(--primary);
  border-color:color-mix(in srgb,var(--primary) 36%,var(--border));
  background:color-mix(in srgb,var(--primary) 7%,var(--surface));
}
body.public-shell .thread-main .action-popover{
  z-index:140;
  min-width:190px;
  max-width:min(230px,calc(100vw - 28px));
}
body.public-shell .thread-main .action-menu.open-up .action-popover{
  top:auto;
  bottom:calc(100% + 8px);
}
body.public-shell .thread-main .action-popover form{
  width:100%;
}

/* Reaction emojis remain visible on both desktop and mobile. */
body.public-shell .thread-main .reaction-emoji{
  display:inline-grid!important;
  place-items:center;
  flex:0 0 auto;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
  font-style:normal;
}
body.public-shell .thread-main .reaction.active .reaction-count{
  color:#fff!important;
  background:rgba(255,255,255,.22)!important;
  border:1px solid rgba(255,255,255,.38);
  text-shadow:0 1px 1px rgba(0,0,0,.16);
}
body.public-shell .thread-main .reaction.active .reaction-emoji{
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.18));
}

/* Modern comment-order control. */
body.public-shell .discussion-heading-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  color:var(--muted);
}
body.public-shell .comment-order-form{
  display:flex;
  align-items:end;
  gap:7px;
  margin:0;
}
body.public-shell .comment-order-form label{
  display:grid;
  gap:3px;
  margin:0;
}
body.public-shell .comment-order-form label>span{
  font-size:.67rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
body.public-shell .comment-order-form select{
  min-height:35px;
  width:auto;
  min-width:174px;
  padding:6px 34px 6px 10px;
  border-radius:10px;
  font-size:.78rem;
  font-weight:700;
  background-color:var(--surface);
}

/* Premium-only attachment affordance; free members can still post text. */
body.public-shell .premium-attachment-field{
  padding:14px;
  border:1px solid color-mix(in srgb,#f59e0b 30%,var(--border));
  border-radius:13px;
  background:linear-gradient(135deg,color-mix(in srgb,#f59e0b 7%,var(--surface)),color-mix(in srgb,#10b981 5%,var(--surface)));
}
body.public-shell .attachment-label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
}
body.public-shell .premium-feature-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 8px;
  border-radius:999px;
  color:#92400e;
  background:#fef3c7;
  border:1px solid #fde68a;
  font-size:.68rem;
  font-weight:850;
  white-space:nowrap;
}
body.public-shell .premium-attachment-notice{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:11px;
  align-items:center;
  padding:13px 14px;
  border:1px dashed color-mix(in srgb,#f59e0b 42%,var(--border));
  border-radius:13px;
  background:color-mix(in srgb,#f59e0b 6%,var(--surface));
}
body.public-shell .premium-attachment-icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:linear-gradient(135deg,#f59e0b,#10b981);
  color:#fff;
  font-size:1.05rem;
  box-shadow:0 6px 16px rgba(245,158,11,.2);
}
body.public-shell .premium-attachment-notice strong,
body.public-shell .premium-attachment-notice small{
  display:block;
}
body.public-shell .premium-attachment-notice small{
  margin-top:2px;
  color:var(--muted);
  line-height:1.45;
}

@media(max-width:720px){
  body.public-shell .discussion-heading{
    align-items:flex-start;
    flex-direction:column;
    gap:12px;
  }
  body.public-shell .discussion-heading-tools{
    width:100%;
    align-items:stretch;
    justify-content:space-between;
    flex-direction:column;
    gap:8px;
  }
  body.public-shell .comment-order-form{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
  }
  body.public-shell .comment-order-form select{
    width:100%;
    min-width:0;
  }
  body.public-shell .premium-attachment-notice{
    grid-template-columns:auto minmax(0,1fr);
  }
  body.public-shell .premium-attachment-notice .btn{
    grid-column:1/-1;
    width:100%;
  }
  body.public-shell .thread-main .action-popover{
    right:auto;
    left:0;
  }
}
