/* 기본 스타일링은 Tailwind가 처리하지만 특수한 스타일은 여기에 정의 */

/* 캔버스 스타일 */
#canvas {
  position: relative;
  transition: width 0.3s, height 0.3s;
  min-height: 400px;
}

/* 가구 스타일 */
.furniture {
  position: absolute;
  border: 2px solid #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
  cursor: move;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.1s, border-color 0.2s;
  z-index: 10;
}

.furniture.selected {
  border-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.15);
  z-index: 20;
}

.furniture-label {
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #1f2937;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.furniture-size {
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: #4b5563;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

/* 핸들 스타일 */
.resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: white;
  border: 2px solid #f59e0b;
  z-index: 30;
}

.rotate-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #f59e0b;
  border: 2px solid white;
  border-radius: 50%;
  cursor: crosshair;
  z-index: 30;
}

/* 핸들 위치 */
.handle-n {
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  cursor: n-resize;
}

.handle-e {
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  cursor: e-resize;
}

.handle-s {
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  cursor: s-resize;
}

.handle-w {
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
  cursor: w-resize;
}

.handle-nw {
  top: -6px;
  left: -6px;
  cursor: nw-resize;
}

.handle-ne {
  top: -6px;
  right: -6px;
  cursor: ne-resize;
}

.handle-se {
  bottom: -6px;
  right: -6px;
  cursor: se-resize;
}

.handle-sw {
  bottom: -6px;
  left: -6px;
  cursor: sw-resize;
}

.handle-rotate {
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
}

/* 가구 목록 아이템 */
.furniture-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: #f3f4f6;
  border-radius: 4px;
  border-left: 4px solid #3b82f6;
}

.furniture-list-item.selected {
  border-left-color: #f59e0b;
  background-color: #fef3c7;
}

.furniture-list-item button {
  opacity: 0.7;
}

.furniture-list-item button:hover {
  opacity: 1;
}

/* 입력 스타일 보완 */
input[type="number"], input[type="text"] {
  appearance: none;
  border-width: 1px;
  padding: 0.5rem 0.75rem;
}
