/* -------------------------------------------------------
   Accessories prototype (Issue #437)
   ------------------------------------------------------- */

/* Catalog grid in sidebar */
.accessory-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 6px 0;
}

.accessory-thumb {
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 4px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #555;
  transition: background 0.15s, border-color 0.15s;
}

.accessory-thumb:hover {
  background: #e0e0e0;
  border-color: #999;
}

.accessory-thumb:active {
  background: #d0d0d0;
}

/* Inline transform controls */
.accessory-controls {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}

.accessory-controls .control-button {
  min-width: 32px;
}

/* Mode-active cursor */
.accessory-mode-active #paintCanvas {
  cursor: crosshair;
}

/* Placed accessories */
.accessory {
  cursor: grab;
}

.accessory.dragging {
  cursor: grabbing;
  opacity: 0.85;
}

/* Accessory mode banner (Cozy Corner precedent) */
#accessoryModeBar {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(33, 150, 243, 0.95);
  color: #fff;
  padding: 10px 16px;
  z-index: 50;
  font-size: 0.9rem;
}

#accessoryModeBarText {
  flex: 1;
  text-align: center;
}

#exitAccessoryModeBtn {
  background: #fff;
  color: #2196f3;
  border: none;
  border-radius: 5px;
  padding: 6px 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

#exitAccessoryModeBtn:hover {
  background: #e3f2fd;
}

@media (max-width: 768px) {
  #accessoryModeBar {
    font-size: 0.8rem;
    padding: 8px 10px;
  }
}

/* Selection indicator (rendered via JS, but style fallback) */
.accessory-selection {
  fill: none;
  stroke: #2196f3;
  stroke-width: 3;
  stroke-dasharray: 10 5;
  pointer-events: none;
}
