/* Cot thong tin hoi thoai ben phai. (Tach tu styles.css - nap theo DUNG thu tu trong index.html) */

/* =====================================================================
   Cot "Thong tin nhom" / "Thong tin hoi thoai" ben phai
   ===================================================================== */
.info-panel {
  width: 320px; background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100%; flex-shrink: 0;
  animation: slide-in .3s var(--ease);
}
@keyframes slide-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.info-panel-header {
  padding: 0 12px 0 20px; min-height: 68px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.info-panel-header strong { font-size: 15px; font-weight: 700; }
.info-panel-header .link-btn {
  width: 32px; height: 32px; border-radius: 50%; color: var(--muted); font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.info-panel-header .link-btn:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.info-panel-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px 20px; }

/* Ho so: nen gradient phia sau avatar lon */
.info-profile {
  text-align: center; padding: 22px 0 18px; border-bottom: 1px solid var(--border-subtle); margin: 0 -20px 8px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
}
.info-avatar-lg, .info-avatar-lg-fallback {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px; object-fit: cover; display: block;
  box-shadow: 0 0 0 4px var(--bg-surface), 0 10px 26px rgba(0, 104, 255, .22);
}
.info-avatar-lg-fallback {
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; font-weight: 600;
  text-transform: uppercase; background-color: var(--primary);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .35), rgba(0, 0, 0, .12));
}
.info-name { font-weight: 700; font-size: 16.5px; word-break: break-word; padding: 0 20px; }

.info-section { padding: 12px 0; border-bottom: 1px solid var(--border); }
.info-section-toggle {
  width: 100%; background: none; border: none; padding: 4px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.info-chevron { color: var(--muted); transition: transform .2s var(--ease); font-size: 11px; }
.info-section.collapsed .info-chevron { transform: rotate(-90deg); }
.info-section.collapsed .info-members-list,
.info-section.collapsed .info-media-grid,
.info-section.collapsed .info-files-list,
.info-section.collapsed .info-links-list { display: none; }

.info-members-list, .info-files-list, .info-links-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
.info-members-list li, .info-files-list li, .info-links-list li {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px; font-size: 13px; border-radius: var(--radius-sm);
  transition: background .2s;
}
.info-members-list li:hover, .info-files-list li:hover, .info-links-list li:hover { background: var(--surface-2); }
.info-member-avatar, .info-member-avatar-fallback {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block;
}
.info-member-avatar-fallback {
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600;
  text-transform: uppercase; background-color: #98a2b3;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .35), rgba(0, 0, 0, .12));
}
.info-files-list a, .info-links-list a { color: var(--primary); text-decoration: none; word-break: break-all; }
.info-files-list a:hover, .info-links-list a:hover { text-decoration: underline; }
.info-file-icon { flex-shrink: 0; }

.info-media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.info-media-grid img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; background: var(--surface-hover);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.info-media-grid img:hover { transform: scale(1.04); box-shadow: var(--shadow); }
.info-empty-hint { color: var(--muted); font-size: 12px; padding: 8px 0; }

/* Man hinh hep: thu gon cot de khung chat khong bi bop */
@media (max-width: 1100px) {
  .sidebar { width: 290px; }
  .info-panel { width: 280px; }
}

/* Cua so hep: cot thong tin noi len tren khung chat thay vi chia cho */
@media (max-width: 1000px) {
  .info-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; box-shadow: var(--shadow-lg); }
}

/* Ton trong cai dat "giam chuyen dong" cua he dieu hanh */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Nut "Phân loại" / "Thông tin" o chat-header: icon SVG + chu */
.chat-header-actions .small-btn { display: inline-flex; align-items: center; gap: 6px; }
.chat-header-actions .small-btn svg { color: var(--muted); transition: color .2s; }
.chat-header-actions .small-btn:hover svg { color: var(--primary); }
