/* ── Panels (shared) ──────────────────────────────── */

.ui-panel {
  position: absolute;
  top: 40px;
  bottom: 28px;
  width: 280px;
  background: var(--bg-panel);
  border: 1px solid var(--border-panel);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.ui-panel.hidden {
  pointer-events: none;
  opacity: 0;
}

.panel-left {
  left: 0;
  border-left: none;
  border-top: none;
}

.panel-left.hidden {
  transform: translateX(-100%);
}

.panel-right {
  right: 0;
  border-right: none;
  border-top: none;
}

.panel-right.hidden {
  transform: translateX(100%);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-panel);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
}

.panel-close {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.panel-close:hover {
  background: var(--bg-hover);
  color: var(--text-bright);
}

.panel-content {
  flex: 1;
  overflow: hidden;
  padding: 14px;
  font-size: 13px;
  color: var(--text-body);
  display: flex;
  flex-direction: column;
}

/* ── Panel resize handle ──────────────────────────── */

.panel-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  z-index: 2;
  transition: background 0.15s;
}

.panel-left .panel-resize-handle {
  right: -4px;
}

.panel-right .panel-resize-handle {
  left: -4px;
}

.panel-resize-handle:hover,
.panel-resize-handle.resizing {
  background: var(--border-btn-hover);
  opacity: 0.6;
}
