/* ── ExpandedPane styles ──────────────────────────────────────────── */

/* ── Backdrop (modal variant only) ───────────────────────────────── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: expandedPaneFadeIn 0.15s ease;
}

@keyframes expandedPaneFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Modal container (single-pane modal variant) ─────────────────── */

.modalContainer {
  width: 90vw;
  height: 90vh;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-background, #ffffff);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  animation: expandedPaneScaleIn 0.2s ease;
}

@keyframes expandedPaneScaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes immersiveFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.modalBody {
  flex: 1;
  min-height: 0;
  display: flex;
}

/* ── Full container (single-pane full + multi-pane split) ────────── */

.fullContainer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-background, #ffffff);
  animation: expandedPaneScaleIn 0.2s ease;
}

/* ── Immersive mode ─────────────────────────────────────────────── */

.immersive {
  animation: expandedPaneFadeIn 0.15s ease;
}

.immersiveClosing {
  animation: immersiveFadeOut 0.2s ease forwards;
}

.immersiveCloseBtn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.immersiveCloseBtn {
  opacity: 0.5;
}

.immersiveCloseBtn:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* ── Single-pane full body ───────────────────────────────────────── */

.singleFull {
  flex: 1;
  min-height: 0;
  display: flex;
}

/* ── CSS Grid (multi-pane split) ─────────────────────────────────── */

.grid {
  flex: 1;
  min-height: 0;
  display: grid;
  /* grid-template-columns set via inline style */
}

/* ── Individual pane cell ────────────────────────────────────────── */

.pane {
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ── Column container (wraps 1-2 panes vertically) ──────────────── */

.column {
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.column > .pane {
  flex: 1;
  min-height: 0;
}

/* ── Pane content fills remaining space ──────────────────────────── */

.paneContent {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: auto;
}

/* ── Draggable divider between panes ─────────────────────────────── */

.divider {
  width: 8px;
  margin: 0 -4px;
  cursor: col-resize;
  z-index: 1;
  position: relative;
  background: transparent;
  transition: background 100ms;
}

.divider:hover,
.divider:active {
  background: var(--color-background-accent-muted, rgba(9, 105, 218, 0.15));
}

.divider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--color-border-muted, #d8dee4);
  transform: translateX(-50%);
}

.divider:hover::after,
.divider:active::after {
  background: var(--color-foreground-accent, #0969da);
  width: 2px;
}

/* ── Horizontal row divider (between stacked panes in a column) ── */

.rowDivider {
  height: 8px;
  margin: -4px 0;
  cursor: row-resize;
  z-index: 1;
  position: relative;
  background: transparent;
  transition: background 100ms;
  flex-shrink: 0;
}

.rowDivider:hover,
.rowDivider:active {
  background: var(--color-background-accent-muted, rgba(9, 105, 218, 0.15));
}

.rowDivider::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--color-border-muted, #d8dee4);
  transform: translateY(-50%);
}

.rowDivider:hover::after,
.rowDivider:active::after {
  background: var(--color-foreground-accent, #0969da);
  height: 2px;
}
