/* Image customization styles */
.image-toolbar {
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-bottom: 5px;
  gap: 5px;
  max-width: 500px;
  flex-wrap: wrap;
  animation: toolbarFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(74, 110, 255, 0.2);
  backdrop-filter: blur(5px);
}

.image-toolbar .toolbar-group {
  display: flex;
  gap: 3px;
  border-right: 1px solid #eee;
  padding-right: 5px;
  margin-right: 5px;
}

.image-toolbar .toolbar-group:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.image-toolbar .toolbar-btn {
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
  gap: 4px;
}

.image-toolbar .toolbar-btn:hover {
  background-color: #f0f0f0;
}

.image-toolbar .toolbar-btn.active {
  background-color: #e0e0ff;
  color: #4a6eff;
}

.image-toolbar .border-color-picker,
.image-toolbar .bg-color-picker {
  position: absolute;
  top: 100%;
  left: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  opacity: 0;
  cursor: pointer;
}

.image-toolbar .toolbar-btn:hover .border-color-picker,
.image-toolbar .toolbar-btn:hover .bg-color-picker {
  opacity: 1;
}

.image-toolbar .width-select {
  position: absolute;
  top: 100%;
  left: 0;
  padding: 3px;
  border-radius: 4px;
  border: 1px solid #ddd;
  z-index: 1;
  display: none;
  background: white;
  font-size: 12px;
}

.image-toolbar .toolbar-btn:hover .width-select {
  display: block;
}

.image-toolbar .hidden {
  display: none;
}

.image-toolbar .toggle-text {
  font-size: 0.8rem;
}

/* Enhanced animations for objects */
.object {
  position: absolute;
  cursor: grab;
  user-select: none;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s ease, 
              filter 0.3s ease;
  will-change: transform;
}

.object:active {
  cursor: grabbing;
}

.object.dragging {
  cursor: grabbing;
  z-index: 1000;
  transform: scale(1.08) rotate(1deg) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25), 0 8px 10px rgba(0, 0, 0, 0.15) !important;
  filter: brightness(1.05) drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

@keyframes objectBounce {
  0% { transform: scale(1.08) rotate(1deg); }
  40% { transform: scale(0.95) rotate(0deg); }
  70% { transform: scale(1.02) rotate(0.5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.object.drag-released {
  animation: objectBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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