.image-editor-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
}

.image-preview {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border: 1px solid #ccc;
  border-radius: 6px;
}

label.filed-label {
  font-weight: 600;
  margin-bottom: 4px;
  display: inline-block;
}

.cropper-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: none;
  flex-direction: column; /* 👈 change from row alignment */
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
  overflow: auto;
  gap: 16px;
  opacity: 100%;
}

.cropper-container-box {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  animation: fadeInScale 0.3s ease-in-out;
  box-sizing: border-box;
}

.cropper-container-box img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  background-color: #fff;
}

.cropper-container-box .cropper-container {
  background-color: #fff !important;
}

cropper-container {
  background-color: #fff !important;
  max-width: 200px !important;
}

.cropper-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
}

.cropper-buttons button,
.image-btn,
.upload-label {
  padding: 10px 18px;
  font-size: 14px;
  background-color: #007bff;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;

  flex-shrink: 0;
}

.cropper-buttons button:hover,
.image-btn:hover,
.upload-label:hover {
  background-color: #0056b3;
}

.image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.cropper-container-box .close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
}

.cropper-container-box .close-modal:hover {
  color: #000;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 📱 Responsive adjustments for small screens */
@media (max-width: 480px) {
  .cropper-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .cropper-buttons button,
  .cropper-buttons label {
    width: 100%;
    justify-content: center;
  }
}

.btn-apply {
  background-color: #28a745;
}
.btn-apply:hover {
  background-color: #218838;
}
.btn-cancel {
  background-color: #dc3545;
}
.btn-cancel:hover {
  background-color: #c82333;
}
