﻿/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   OMNIS â€” Chat Drawer v4 (chat-drawer.css)
   Slide-out chat with tabs, toolbar (video/attach/emoji).
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* â”€â”€ Tab trigger on right edge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chat-drawer-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9998;
  background: var(--glass, rgba(20,20,30,0.85));
  border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 14px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family:'Figtree', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-2, #999);
  user-select: none;
}
.chat-drawer-tab:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
  padding-right: 10px;
}
.chat-drawer-tab .tab-icon {
  font-size: 18px;
  writing-mode: horizontal-tb;
}
.chat-drawer-tab .tab-badge {
  writing-mode: horizontal-tb;
  background: #dc2626;
  color: #fff;
  border-radius: 8px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
  display: none;
}
.chat-drawer-tab .tab-badge.has-unread { display: block; }
.chat-drawer-tab.active {
  background: rgba(220, 38, 38, 0.2);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

/* â”€â”€ Overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chat-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.chat-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* â”€â”€ Drawer panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chat-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  max-width: 90vw;
  z-index: 9999;
  background: var(--bg, #0d0d14);
  border-left: 1px solid var(--border, rgba(255,255,255,0.06));
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.chat-drawer.open { transform: translateX(0); }

/* â”€â”€ Header with tabs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 0;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
  background: var(--glass, rgba(20,20,30,0.85));
  flex-shrink: 0;
}
.chat-drawer-tabs { display: flex; flex: 1; }
.cdt-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--ink-3, #666);
  font-family:'Figtree', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.cdt-tab:hover { color: var(--ink-2, #999); background: rgba(255,255,255,0.02); }
.cdt-tab.active { color: #dc2626; border-bottom-color: #dc2626; }
.chat-drawer-close {
  width: 28px; height: 28px;
  border-radius: 6px; border: none;
  background: transparent;
  color: var(--ink-2, #999);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.chat-drawer-close:hover { background: rgba(255,255,255,0.06); color: #dc2626; }

/* â”€â”€ Body â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chat-drawer-body {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden; min-height: 0;
}
.cdt-panel {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden; min-height: 0;
}
.cdt-panel.hidden { display: none; }

/* â”€â”€ Toolbar (video, attach, emoji) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cdt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.06));
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
  position: relative;
}
.cdt-tb-left, .cdt-tb-right {
  display: flex;
  align-items: center;
  gap: 2px;
}
.cdt-tb-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--ink-3, #666);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}
.cdt-tb-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--ink, #e0e0e0);
}
.cdt-tb-btn-video:hover { color: #dc2626; }
.cdt-tb-btn-attach:hover { color: #3b82f6; }
.cdt-tb-btn-emoji:hover { color: #f59e0b; }

/* â”€â”€ Emoji picker â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cdt-emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 280px;
  max-height: 260px;
  background: var(--bg, #0d0d14);
  border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: 10px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 8px;
  margin-bottom: 4px;
  z-index: 10000;
}
.cdt-ep-section { margin-bottom: 6px; }
.cdt-ep-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3, #666);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 4px 2px;
}
.cdt-ep-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}
.cdt-ep-btn {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.1s;
}
.cdt-ep-btn:hover {
  background: rgba(255,255,255,0.08);
  transform: scale(1.15);
}

/* â”€â”€ Channels panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cdt-channels-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
  flex-shrink: 0;
}
.cdt-channels-title {
  font-size: 14px; font-weight: 700;
  color: var(--ink, #e0e0e0);
  margin-bottom: 2px;
}
.cdt-channels-sub {
  font-size: 11px;
  color: var(--ink-3, #666);
}
.cdt-channels-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.cdt-ch-item {
  display: flex; align-items: center;
  gap: 10px; padding: 10px 12px;
  border-radius: 8px; cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  margin-bottom: 2px;
}
.cdt-ch-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border, rgba(255,255,255,0.06));
}
.cdt-ch-item.active {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
}
.cdt-ch-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.cdt-ch-item.active .cdt-ch-icon { background: rgba(220, 38, 38, 0.15); }
.cdt-ch-info { flex: 1; min-width: 0; }
.cdt-ch-name {
  font-size: 13px; font-weight: 600;
  color: var(--ink, #e0e0e0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cdt-ch-item.active .cdt-ch-name { color: #f87171; }
.cdt-ch-desc {
  font-size: 11px; color: var(--ink-3, #666);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.cdt-ch-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cdt-ch-active-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
}
.cdt-ch-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3, #666);
}

/* â”€â”€ Mobile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 480px) {
  .chat-drawer { width: 100vw; }
  .chat-drawer-tab { padding: 10px 5px; font-size: 10px; }
  .cdt-emoji-picker { width: 100%; }
}

/* Hide AI FAB when drawer is open */
.chat-drawer.open ~ #chatFab, .chat-drawer.open ~ .omnis-ai-btn, .chat-drawer.open ~ #omnis-ai-btn { display: none !important; }
