
#cropImagePanel {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: calc(100vw - 32px);
  border-width: 1px;
  border-style: solid;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  z-index: 10001;
  display: none;
  transition: box-shadow 0.2s ease;
  overflow: visible;
}

#cropImagePanel.crop-image-panel-visible {
  display: block;
}

#cropImagePanel.crop-image-panel-dragging {
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.26);
  cursor: grabbing;
}

#cropImagePanel .crop-image-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  gap: 12px;
  font-size: 14px;
}

#cropImagePanel .crop-image-panel-header button {
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

#cropImagePanel .crop-image-panel-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(90vh - 100px);
  overflow: auto;
}

.crop-canvas-container {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  padding: 10px;
  min-height: 200px;
  overflow: hidden;
}

.crop-canvas-container canvas {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.crop-image-panel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.crop-image-panel-footer button {
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  outline: none;
}

.crop-btn-primary {
  border-width: 1px;
  border-style: solid;
}

.crop-btn-cancel {
  border-width: 1px;
  border-style: solid;
}

/* Mobile responsive */
@media (max-width: 768px) {
  #cropImagePanel {
    top: 20px;
    width: calc(100vw - 32px);
    transform: translateX(-50%);
  }

  .crop-canvas-container {
    padding: 8px;
  }

  #cropImagePanel .crop-image-panel-body {
    max-height: calc(90vh - 80px);
  }
}
