/* Thread tiles: Discord channel list vibe */
.ia-msg-thread{
  width:100%;
  text-align:left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ia-text);
  padding: 10px 12px;
  cursor:pointer;
  border-radius: 12px;
  margin: 6px 6px;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}

.ia-msg-thread:hover{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}

.ia-msg-thread.active{
  background:
    linear-gradient(180deg, rgba(124,58,237,0.22), rgba(0,0,0,0.10));
  border-color: rgba(167,139,250,0.35);
  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

.ia-msg-thread-name,
.ia-msg-thread-title{
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--ia-text);
}

.ia-msg-thread-last,
.ia-msg-thread-meta{
  font-size: 12px;
  color: var(--ia-muted);
  margin-top: 2px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Thread avatar + tighter mobile fit */
.ia-msg-thread-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.ia-msg-thread-avatar{
  width:28px;
  height:28px;
  border-radius:999px;
  flex:0 0 28px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.ia-msg-thread-initial{
  font-size:12px;
  font-weight:800;
  line-height:1;
  color: var(--ia-text);
  opacity:0.95;
}
.ia-msg-thread-text{
  min-width:0;
  flex:1;
}
@media (max-width: 820px){
  .ia-msg-thread{
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }
  .ia-msg-threadlist{
    padding-left: 12px;
    padding-right: 12px;
  }
}
body.ia-msg-fullscreen .ia-msg-thread{
  margin-left: 0;
  margin-right: 0;
}


/* ---- Mobile fit hardening: prevent any horizontal overflow ---- */
.ia-msg-thread,
.ia-msg-thread *{
  box-sizing: border-box;
}

.ia-msg-thread{
  max-width: 80%;
  width: 60%;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.ia-msg-threadlist{
  max-width: 100%;
  overflow-x: hidden;
}

/* Fullscreen/mobile: keep list snug inside card */
body.ia-msg-fullscreen .ia-msg-threadlist{
  padding-left: 10px !important;
  padding-right: 10px !important;
}
body.ia-msg-fullscreen .ia-msg-thread{
  margin: 6px 0 !important;
}
