/* src/tools/image-color-picker/tool.css */
.img-picker-root {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-family: inherit;
}

.img-picker-dropzone {
  border: 2px dashed #2a2d3a;
  border-radius: 0.75rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #13161f;
  transition: all 0.15s ease;
  cursor: pointer;
}

.img-picker-dropzone:hover,
.img-picker-dropzone.dragover {
  border-color: #4f8ef7;
  background: rgba(79, 142, 247, 0.05);
}

.picker-workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 840px) {
  .picker-workspace-grid {
    grid-template-columns: 1fr 300px;
  }
}

.canvas-panel {
  background: #13161f;
  border: 1px solid #2a2d3a;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #1a1d27;
  border-bottom: 1px solid #2a2d3a;
  font-size: 0.8125rem;
  font-weight: 600;
}

.canvas-scroll-wrap {
  position: relative;
  overflow: auto;
  min-height: 320px;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(45deg, #181b25 25%, transparent 25%),
    linear-gradient(-45deg, #181b25 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #181b25 75%),
    linear-gradient(-45deg, transparent 75%, #181b25 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  background-color: #0f1117;
  cursor: crosshair;
}

.main-image-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Sidebar Inspector */
.inspector-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.loupe-card {
  background: #13161f;
  border: 1px solid #2a2d3a;
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.loupe-canvas-wrap {
  width: 120px;
  height: 120px;
  border-radius: 9999px;
  border: 3px solid #4f8ef7;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  background: #0f1117;
}

.loupe-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.loupe-crosshair {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loupe-crosshair::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

.picked-color-card {
  background: #13161f;
  border: 1px solid #2a2d3a;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.color-swatch-large {
  height: 48px;
  border-radius: 0.5rem;
  border: 1px solid #2a2d3a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.875rem;
}

.val-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.5rem;
  background: #0f1117;
  border: 1px solid #2a2d3a;
  border-radius: 0.375rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

.copy-mini-btn {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 0.25rem;
  color: #9ca3af;
  font-size: 0.7rem;
  padding: 0.125rem 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-mini-btn:hover {
  color: #f0f2f8;
  border-color: #4f8ef7;
}

.palette-bar-card {
  background: #13161f;
  border: 1px solid #2a2d3a;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.palette-swatches-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dominant-chip {
  flex: 1;
  min-width: 48px;
  height: 42px;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
}

.dominant-chip:hover {
  transform: translateY(-2px);
}
