/* Suggestions dropdown (used in both left search + new chat) */
.ia-msg-suggest{
  margin-top:8px;
  border:1px solid var(--ia-line2);
  border-radius:12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.20)),
    rgba(0,0,0,0.35);
  max-height:240px;
  overflow:auto;
  display:none;
  box-shadow: 0 14px 40px rgba(0,0,0,0.55);
}
.ia-msg-suggest.open{ display:block; }

.ia-msg-suggest-item{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border:0;
  background:none;
  color: var(--ia-text);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
}
.ia-msg-suggest-item:hover{
  background: rgba(124,58,237,0.14);
}


.ia-msg-suggest-avatar{
  width:32px;
  height:32px;
  border-radius:999px;
  object-fit:cover;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--ia-line2);
}
.ia-msg-suggest-name{
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
}
.ia-msg-suggest-username{
  display:block;
  font-size: 12px;
  color: var(--ia-muted);
  margin-top: 2px;
}

.ia-msg-suggest-sub{
  display:block;
  font-size:12px;
  color: var(--ia-muted);
  margin-top:2px;
}

/* =========================
   New Chat modal (Discord-ish)
   ========================= */
.ia-msg-sheet{
  position: fixed;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: 99999;
}
.ia-msg-sheet.open{
  opacity: 1;
  pointer-events: auto;
}

.ia-msg-sheet-card{
  width: min(560px, 100%);
  background:
    radial-gradient(900px 420px at 30% 0%, rgba(124,58,237,0.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.35)),
    var(--ia-panel2);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 24px 90px rgba(0,0,0,0.70);
}

.ia-msg-sheet-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--ia-text);
  font-weight: 900;
  letter-spacing: 0.2px;
}

.ia-msg-sheet-label{
  display:block;
  margin: 10px 0 6px;
  color: var(--ia-muted);
  font-size:12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: none;
}

.ia-msg-sheet-input{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid var(--ia-line2);
  background: rgba(0,0,0,0.35);
  color: var(--ia-text);
  outline: none;
}
.ia-msg-sheet-input:focus{
  border-color: rgba(167,139,250,0.55);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
}

.ia-msg-sheet-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top: 12px;
}

.ia-msg-sheet-hint{
  margin-top: 12px;
  color: var(--ia-muted);
  font-size: 12px;
  line-height:1.35;
}

/* Make popup textarea consistent */
.ia-msg-sheet-card .ia-msg-text{
  width:100%;
  resize: vertical;
  min-height: 96px;
}
/* Incoming vs outgoing, driven by data-ia-msg-side */
.ia-msg-shell [data-ia-msg-side="in"]{
  margin-right:auto;
  border-color: rgba(255,255,255,0.10);
  background:
    radial-gradient(520px 180px at 10% 0%, rgba(59,130,246,0.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(0,0,0,0.26));
}
.ia-msg-shell [data-ia-msg-side="out"]{
  margin-left:auto;
  border-color: rgba(167,139,250,0.38);
  background:
    radial-gradient(600px 180px at 20% 0%, rgba(124,58,237,0.26), transparent 70%),
    linear-gradient(180deg, rgba(124,58,237,0.12), rgba(0,0,0,0.24));
}
.ia-msg-shell [data-ia-msg-side="out"] .ia-msg-when{ color: rgba(167,139,250,0.85); }
.ia-msg-shell [data-ia-msg-side="in"]  .ia-msg-when{ color: rgba(148,163,184,0.85); }


/* Fullscreen media viewer */
.ia-msg-media-viewer{
  position:fixed;
  inset:0;
  z-index:999999;
  display:none;
}
.ia-msg-media-viewer.is-open{ display:block; }
.ia-msg-media-viewer__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
}
.ia-msg-media-viewer__frame{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
}
.ia-msg-media-viewer__topbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  background:rgba(10,10,10,.86);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.ia-msg-media-viewer__title{
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#fff;
  font-weight:600;
}
.ia-msg-media-viewer__count{
  color:rgba(255,255,255,.7);
  font-size:12px;
}
.ia-msg-media-viewer__btn{
  appearance:none;
  border:0;
  background:rgba(255,255,255,.08);
  color:#fff;
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  text-decoration:none;
  line-height:1;
}
.ia-msg-media-viewer__btn:hover{ background:rgba(255,255,255,.14); }
.ia-msg-media-viewer__body{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  overflow:auto;
}
.ia-msg-media-viewer__media{
  max-width:min(1100px, 96vw);
  max-height:calc(100vh - 140px);
  display:flex;
  align-items:center;
  justify-content:center;
}
.ia-msg-media-viewer__media img,
.ia-msg-media-viewer__media video{
  max-width:100%;
  max-height:100%;
  border-radius:14px;
}
.ia-msg-media-viewer__media audio{
  width:min(820px, 92vw);
}
.ia-msg-media-viewer__img{
  transform-origin:center center;
  transition:transform 80ms linear;
}
.ia-msg-media-viewer__toolbar{
  display:flex;
  justify-content:center;
  gap:10px;
  padding:10px 12px;
  background:rgba(10,10,10,.86);
  border-top:1px solid rgba(255,255,255,.08);
}
