.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  width: calc(100% - 200px);
  height: calc(100% - 200px);
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.file-tree-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  max-width: 800px;
  width: var(--tree-width);
  overflow-y: auto;
}

.file-tree-section {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tree-actions {
  flex: 0 0 auto;
  display: flex;
  padding: 0 8px;
  gap: 8px;
}

.separator {
  width: 8px;
  margin: 0 -4px;
  background: transparent;
  position: relative;
  cursor: col-resize;
  z-index: 10;
  flex: none;
}

.separator::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #444;
  transition: background 0.2s;
}

.separator:hover::after,
.separator.dragging::after {
  background: #666;
}

codespin-file-tree {
  flex: 1;
  white-space: nowrap;
  display: block;
  width: 100%;
}

.content-container {
  flex: 1;
  height: 100%;
  overflow: hidden;
  min-width: 0;
}

.main-container {
  height: 100%;
  display: flex;
  gap: 0;
}

.button-container {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  margin-right: 24px;
}

.button {
  padding: 6px 12px;
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.button-cancel {
  background: #333;
}

.button-select {
  background: var(--select-bg, #2b579a);
  cursor: var(--select-cursor, pointer);
  opacity: var(--select-opacity, 1);
}

.button-disconnect {
  background: #444;
  flex: 1;
  margin: 0;
  max-width: 200px;
}

.button-select:disabled {
  --select-bg: #555;
  --select-cursor: not-allowed;
  --select-opacity: 0.7;
}

.viewer-container {
  height: 100%;
}
