/**
 * Canvas Tabs Styling
 *
 * Theme-aware styling for canvas/Blockly tab system
 */

.CanvasTabs {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  pointer-events: all; /* Enable clicks on tabs */
}

.TabBar {
  display: flex;
  gap: var(--spacing-1);
  padding: var(--spacing-2);
  background-color: var(--theme-color-bg-2);
  border-bottom: 1px solid var(--theme-color-border-default);
  flex-shrink: 0;
}

.Tab {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background-color: var(--theme-color-bg-3);
  color: var(--theme-color-fg-default);
  border-radius: var(--radius-default) var(--radius-default) 0 0;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
  border: 1px solid transparent;
  border-bottom: none;

  &:hover {
    background-color: var(--theme-color-bg-4);
  }

  &.isActive {
    background-color: var(--theme-color-bg-1);
    color: var(--theme-color-fg-highlight);
    border-color: var(--theme-color-border-default);
    border-bottom-color: var(--theme-color-bg-1); // Hide bottom border
  }

  &:focus-visible {
    outline: 2px solid var(--theme-color-primary);
    outline-offset: -2px;
  }
}

.TabLabel {
  font-size: var(--theme-font-size-default);
  font-weight: 500;
  white-space: nowrap;
}

.TabCloseButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--theme-color-fg-default-shy);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-s);
  transition: all 0.15s ease;

  &:hover {
    background-color: var(--theme-color-bg-5);
    color: var(--theme-color-fg-highlight);
  }

  &:active {
    background-color: var(--theme-color-bg-4);
  }
}

.TabContent {
  flex: 1;
  overflow: hidden;
  position: relative;
  background-color: var(--theme-color-bg-1);
}

.CanvasContainer {
  width: 100%;
  height: 100%;
  position: relative;
}

.BlocklyContainer {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--theme-color-bg-1);
}
