/* Focused visual system for the standalone conversations workspace. */
#directChatPanel.page-panel.active {
  min-height: calc(100dvh - 86px);
  padding: 18px clamp(12px, 2.2vw, 32px) 28px;
  background: linear-gradient(135deg, #f6f9ff 0%, #eef4ff 52%, #f7fbff 100%);
}

#directChatPanel .direct-chat-shell {
  width: min(1480px, 100%);
  height: min(820px, calc(100dvh - 132px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid #d6e2f1;
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 22px 55px rgba(34, 70, 130, .12);
  direction: ltr;
}

#directChatPanel .direct-chat-members,
#directChatPanel .direct-chat-room { direction: rtl; min-width: 0; min-height: 0; }
#directChatPanel .direct-chat-members {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 19px 16px;
  border: 0;
  border-left: 1px solid #e0e8f3;
  border-radius: 0;
  background: #fbfdff;
}
#directChatPanel .direct-chat-sidebar-top { padding: 0 2px 2px; }
#directChatPanel .direct-chat-sidebar-title { font-size: 21px; color: #182b4d; }
#directChatPanel .direct-chat-sidebar-title-row::after { content: "پیام‌ها و گفتگوهای شما"; display: block; margin-top: 3px; color: #8290a8; font-size: 10px; }
#directChatPanel .direct-chat-sidebar-search { min-height: 44px; border: 1px solid #dce6f2; border-radius: 11px; background: #fff; box-shadow: none; }
#directChatPanel .direct-chat-sidebar-search:focus-within { border-color: #4c78f2; box-shadow: 0 0 0 3px rgba(76,120,242,.10); }
#directChatPanel .direct-chat-sidebar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#directChatPanel .direct-chat-sidebar-actions button { min-height: 40px; border-radius: 9px; font-weight: 800; }
#directChatPanel .direct-chat-sidebar-actions button:first-child { background: #2463eb; box-shadow: 0 7px 16px rgba(36,99,235,.18); }
#directChatPanel .direct-chat-sidebar-actions button:first-child,
#directChatPanel .direct-chat-sidebar-actions button:first-child *,
#directChatPanel .direct-chat-composer #directChatSendBtn,
#directChatPanel .direct-chat-composer #directChatSendBtn * { color: #fff !important; }
#directChatPanel .direct-chat-sidebar-actions button:last-child { border: 1px solid #cbd9ee; background: #fff; color: #29466f; }
#directChatPanel .direct-chat-sidebar-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 4px; border: 1px solid #e0e8f3; border-radius: 10px; background: #f3f7fc; }
#directChatPanel .direct-chat-sidebar-tabs button { min-height: 34px; border-radius: 7px; color: #6a7890; font-size: 11px; font-weight: 800; }
#directChatPanel .direct-chat-sidebar-tabs button.active { background: #fff; color: #2459d8; box-shadow: 0 3px 10px rgba(36,89,216,.10); }
#directChatPanel .direct-chat-sidebar-tabs button.active { color: #2459d8 !important; }
#directChatPanel .direct-chat-sidebar-section { min-height: 0; overflow: hidden; border: 1px solid #e0e8f3; border-radius: 12px; background: #fff; }
#directChatPanel .direct-chat-sidebar-section-head { padding: 10px 11px; border-bottom: 1px solid #edf2f8; }
#directChatPanel .direct-chat-member-list { max-height: none; padding: 7px; overflow: auto; }
#directChatPanel .direct-chat-member { min-height: 57px; margin: 2px 0; border: 1px solid transparent; border-radius: 9px; background: transparent; }
#directChatPanel .direct-chat-member:hover { border-color: #dce6f5; background: #f7faff; }
#directChatPanel .direct-chat-member.active { border-color: #bed1ff; background: #edf3ff; }

#directChatPanel .direct-chat-room {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f7faff;
}
#directChatPanel .direct-chat-header { flex: 0 0 auto; min-height: 76px; padding: 13px 20px; border: 0; border-bottom: 1px solid #dce7f4; background: rgba(255,255,255,.94); }
#directChatPanel .direct-chat-header-avatar { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg,#2563eb,#55b7f6); box-shadow: 0 7px 18px rgba(37,99,235,.18); }
#directChatPanel .direct-chat-header strong { color: #172b4d; font-size: 16px; }
#directChatPanel .direct-chat-header-status { color: #73839e; font-size: 11px; }
#directChatPanel .direct-chat-header-actions button { width: 36px; height: 36px; border: 1px solid #dce6f2; border-radius: 9px; background: #fff; color: #60718c; }
#directChatPanel .direct-chat-messages { flex: 1 1 auto; min-height: 0; padding: 24px clamp(16px, 4vw, 64px); background: radial-gradient(circle at 15% 15%, rgba(93,143,243,.09), transparent 28%), #f5f9ff; }
#directChatPanel .direct-chat-message { margin: 15px 0; }
#directChatPanel .direct-chat-message-bubble { max-width: min(650px, 78%); padding: 11px 14px; border: 1px solid #dce6f2; border-radius: 15px; background: #fff; box-shadow: 0 5px 16px rgba(33,70,125,.06); }
#directChatPanel .direct-chat-message.from-me .direct-chat-message-bubble { border-color: #bcd0ff; background: #e7efff; }
#directChatPanel .direct-chat-form { flex: 0 0 auto; padding: 12px 16px 16px; border-top: 1px solid #dce7f4; background: rgba(255,255,255,.94); }
#directChatPanel .direct-chat-composer { min-height: 58px; gap: 9px; padding: 7px; border: 1px solid #d2dfef; border-radius: 14px; background: #fff; box-shadow: 0 7px 18px rgba(39,76,130,.08); }
#directChatPanel .direct-chat-composer:focus-within { border-color: #5a82ee; box-shadow: 0 0 0 3px rgba(90,130,238,.10); }
#directChatPanel .direct-chat-composer textarea { min-height: 42px; padding: 10px 12px; color: #243858; }
#directChatPanel .direct-chat-composer .direct-chat-actions { gap: 5px; }
#directChatPanel .direct-chat-composer .direct-chat-actions button { width: 38px; height: 38px; border-radius: 9px; }
#directChatPanel .direct-chat-composer #directChatSendBtn { width: 64px; background: #2463eb; }
#directChatPanel .direct-chat-composer #directChatSendBtn:disabled { background: #b9c9e5; }

@media (max-width: 820px) {
  #directChatPanel.page-panel.active { min-height: calc(100dvh - 72px); padding: 8px 0 0; }
  #directChatPanel .direct-chat-shell { height: calc(100dvh - 80px); min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  #directChatPanel .direct-chat-members { position: absolute; inset: 0; z-index: 3; width: 100%; border: 0; }
  #directChatPanel .direct-chat-shell.is-room-open .direct-chat-members { display: none; }
  #directChatPanel .direct-chat-room { width: 100%; }
  #directChatPanel .direct-chat-header { min-height: 68px; padding: 10px 12px; }
  #directChatPanel .direct-chat-messages { padding: 18px 12px; }
  #directChatPanel .direct-chat-message-bubble { max-width: 88%; }
  #directChatPanel .direct-chat-form { padding: 8px 9px calc(9px + env(safe-area-inset-bottom)); }
}
