/* ── Chat Panel Layout (sidebar positioning) ── */
.chat-panel {
  width: 340px;
  min-width: 300px;
  max-width: 380px;
  background: var(--surface2);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  max-height: 100%;
  transition: width 0.25s ease, min-width 0.25s ease;
  border-left: 1px solid var(--border);
  position: relative;
}

.chat-panel.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  border-left: none;
  opacity: 0;
  pointer-events: none;
}

.wb-chat-collapse {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  line-height: 1;
  padding: 0;
  transition: color 0.15s, background 0.15s;
}

.wb-chat-collapse:hover {
  color: var(--text);
  background: var(--bg3);
}

.wb-chat-expand-btn {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 60px;
  border-radius: 6px 0 0 6px;
  border: 1px solid var(--border);
  border-right: none;
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 5;
  transition: color 0.15s, background 0.15s;
  padding: 0;
  line-height: 1;
}

.wb-chat-expand-btn:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

/* ── Mobile Chat / Whiteboard Swipe Overlay ── */
.mobile-chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  pointer-events: none;
  overflow: hidden;
}

.mobile-chat-overlay.open {
  transform: translateX(0);
  pointer-events: auto;
}

.mobile-swipe-wrap {
  width: 200vw;
  height: 100%;
  display: flex;
  transition: transform 0.3s ease;
}

.mobile-swipe-wrap.show-wb {
  transform: translateX(-100vw);
}

.mobile-chat-container,
.mobile-wb-container {
  width: 100vw;
  height: 100%;
  flex-shrink: 0;
  overflow-y: auto;
}

.mobile-wb-container {
  background: var(--wb-bg);
  position: relative;
}

.mobile-wb-container #wb-viewport {
  width: 100%;
  height: 100%;
  background: var(--wb-bg);
  position: relative;
  overflow: hidden;
}

.mobile-wb-container #wb-board {
  width: 10000px;
  height: 10000px;
  position: absolute;
  background-image:
    radial-gradient(circle, var(--wb-dot) 1px, transparent 1px);
  background-size: 40px 40px;
}
