/* Node pane common styles */
.w-node-canvas {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface2);
  overflow: hidden;
}
[data-theme="dark"] .w-node-canvas {
  border: none;
}
.w-node-canvas canvas {
  width: initial !important;
}


/* Mode carousel common styles */

.w-mode-carousel {
  display: flex;
  gap: 4px;
  width: 100%;
  height: 200px; /* Increased to avoid squeezing */
}

/* Scroll buttons */

.w-mode-carousel .w-scroll-btn {
  width: 24px;
  border: 1px solid var(--border2);
  outline: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 4px;
  user-select: none;
  transition: all 0.2s;
  flex-shrink: 0;
}

.w-scroll-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.w-scroll-btn:hover {
  background: var(--surface3);
}

.w-scroll-btn:active {
  background: var(--surface1);
}

/* Mode panes */

.w-mode-panes {
  display: flex;
  gap: 16px;
  flex: 1;
  overflow-x: auto;
  padding-top: 10px;
  padding-bottom: 8px; /* Slightly reduced to give more space above */
  -webkit-overflow-scrolling: touch;
}

.w-mode-panes::-webkit-scrollbar {
  height: 10px;
  display: block;
}

.w-mode-panes::-webkit-scrollbar-track {
  background: var(--surface2);
  border-radius: 5px;
}

.w-mode-panes::-webkit-scrollbar-thumb {
  background-color: var(--text-dim);
  border-radius: 5px;
  border: 2px solid var(--surface2);
}

.w-mode-pane-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 220px; /* fixed width for carousel items */
  min-width: 0;
  overflow: hidden; /* Prevent child overflow from expanding container */
}

.w-mode-pane-item:first-child {
  margin-left: 12px;
}

.w-mode-pane-item:last-child {
  margin-right: 12px;
}

.w-mode-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; /* Slightly larger for better visibility */
  font-weight: 600;
  height: 14px;
  line-height: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.w-carousel-canvas {
  height: 150px;
  flex: 0 0 150px; /* Force exact height for carousel items */
  border: 1px solid var(--border2);
  border-radius: 4px;
  background: var(--surface2);
  overflow: hidden;
}

[data-theme="dark"] .w-carousel-canvas {
  border: none;
}

.w-carousel-canvas canvas {
  width: initial !important;
}

@media (max-width: 768px) {
  .w-mode-pane-item {
    flex: 0 0 180px; /* slightly smaller on mobile */
  }
}
