.selected {
  outline: 2px dashed #3b82f6 !important;
  outline-offset: 2px;
}

.component-hover {
  outline: 1px solid #93c5fd;
  outline-offset: 2px;
}

.draggable {
  cursor: move;
}

.resizable {
  position: relative;
}

.resize-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: #3b82f6;
  border: 1px solid white;
}

.resize-handle.top-left { 
  top: -4px; 
  left: -4px; 
  cursor: nw-resize; 
}
.resize-handle.top-right { 
  top: -4px; 
  right: -4px; 
  cursor: ne-resize; 
}
.resize-handle.bottom-left { 
  bottom: -4px; 
  left: -4px; 
  cursor: sw-resize; 
}
.resize-handle.bottom-right { 
  bottom: -4px; 
  right: -4px; 
  cursor: se-resize; 
}

.canvas-grid {
  background-size: 20px 20px;
  background-image:
    linear-gradient(to right, #f0f0f0 1px, transparent 1px),
    linear-gradient(to bottom, #f0f0f0 1px, transparent 1px);
}

.preview-mode .selected,
.preview-mode .component-hover,
.preview-mode .resize-handle {
  display: none !important;
}

.viewport-tablet #canvas {
  max-width: 768px !important;
  margin: 0 auto;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.viewport-mobile #canvas {
  max-width: 375px !important;
  margin: 0 auto;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.component-enter {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

#inspector-panel {
  overflow-y: auto; 
  display: flex;
  flex-direction: column; 
}

#inspector-panel > div {
  margin-bottom: 1em; 
}

#inspector-panel .p-4 {
  padding: 1rem; 
}

#inspector-panel .mb-4 {
  margin-bottom: 1rem; 
}

#inspector-panel .p-2 {
  padding: 0.5rem; 
}

#inspector-panel .grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)); 
}

#inspector-panel .gap-2 {
  gap: 0.5rem; 
}

#inspector-panel .mb-2 {
  margin-bottom: 0.5rem; 
}