/* ===== Paint App ===== */
.paint-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: var(--font-ui);
}

.paint-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.paint-toolbar .separator {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
  margin: 0 2px;
}

.paint-tool-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font-ui);
  padding: 0;
  transition: background 0.1s, color 0.1s;
  position: relative;
}

.paint-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.paint-tool-btn.active {
  background: var(--selection);
  color: var(--text);
  border-color: var(--accent);
}

.paint-tool-btn svg {
  width: 16px;
  height: 16px;
}

.paint-tool-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--context-bg);
  color: var(--text);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  margin-top: 4px;
  border: 1px solid var(--border-subtle);
}

.paint-colors {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 170px;
}

.paint-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.1s;
}

.paint-color-swatch:hover {
  transform: scale(1.15);
}

.paint-color-swatch.active {
  border: 2px solid white;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.paint-active-color {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid var(--border-light);
  margin-left: 4px;
}

.paint-custom-color {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  background: none;
}

.paint-custom-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.paint-custom-color::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.paint-slider-group {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.paint-slider-group input[type="range"] {
  width: 70px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-subtle);
  border-radius: 2px;
  outline: none;
}

.paint-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.paint-undo-redo-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: background 0.1s, color 0.1s;
}

.paint-undo-redo-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.paint-undo-redo-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.paint-undo-redo-btn svg {
  width: 14px;
  height: 14px;
}

.paint-canvas-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #2a2a3c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paint-canvas {
  background: white;
  cursor: crosshair;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.paint-overlay-canvas {
  position: absolute;
  pointer-events: none;
}

.paint-statusbar {
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: 16px;
}
