/**
 * Included when fields of this type are rendered for editing by publishers.
 */

 .acf-field-imagecropperfreeform .setting-font-size {
    color: green;
}

.acf-input .usm-freeform-wrapper .usm-field {
    margin-bottom: 15px;
}

.acf-input .usm-freeform-wrapper .usm-field label {
  margin-right: 10px;
}

.usm-cropper-freeform{
  display: none;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.usm-cropper-freeform .croppie-container {
  width: 100% !important;
  max-width: 100%;
}

.usm-cropper-buttons-freeform {
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 10px;
  display: none;
}

.usm-cropper-buttons-freeform button{
  margin: 0 10px;
}

.component-freeform {
  position: relative;
  padding: 4em;
  width: 90%;
  height: 400px;
  border: 3px solid #49708A;
  max-width: 600px;
  overflow: hidden;
  margin: 0 auto;
  display: none;
}

.shn-crop-freeform {
  display: none;
}

.resize-container-freeform {
  position: relative;
  display: inline-block;
  cursor: move;
  margin: 0 auto;
}

.resize-container-freeform img {
  display: block;
}

.resize-container-freeform:hover img,
.resize-container-freeform:active img {
  outline: 2px dashed rgba(222, 60, 80, 0.9);
}

.resize-handle-ne-freeform,
.resize-handle-ne-freeform,
.resize-handle-se-freeform,
.resize-handle-nw-freeform,
.resize-handle-sw-freeform {
  position: absolute;
  display: block;
  width: 10px;
  height: 10px;
  background: rgba(222, 60, 80, 0.9);
  z-index: 999;
}

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

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

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

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

.overlay-freeform {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -150px;
  margin-top: -100px;
  z-index: 999;
  width: 200px;
  height: 200px;
  border: solid 2px rgba(222, 60, 80, 0.9);
  box-sizing: content-box;
  pointer-events: none;
}

.btn-crop-freeform {
  position: absolute;
  vertical-align: bottom;
  right: 5px;
  bottom: 5px;
  padding: 6px 10px;
  z-index: 999;
  background-color: #de3c50;
  border: none;
  border-radius: 5px;
  color: #FFF;
}

/* Responsive adjustments for the cropper field wrapper */
.usm-freeform-wrapper {
  width: 100%;
  max-width: 100%;
}

.usm-freeform-wrapper .usm-field {
  width: 100%;
  max-width: 100%;
}

/* Ensure cropped image display doesn't overflow */
.usm-crop-freeform {
  max-width: 100%;
  text-align: center;
}

.usm-crop-freeform img {
  max-width: 100%;
  height: auto;
}

/* Free-form specific styles */
.usm-freeform-wrapper .croppie-container .cr-viewport {
  border-radius: 0 !important; /* Remove circular viewport for free-form */
}

.usm-freeform-wrapper .croppie-container .cr-boundary {
  background: rgba(0,0,0,0.3);
}

/* Style the zoom control for better visibility */
.usm-freeform-wrapper .cr-slider-wrap {
  margin-top: 15px;
  background: #fff;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Style buttons for free-form cropper */
.usm-cropper-buttons-freeform {
  margin-top: 15px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
}

.usm-cropper-buttons-freeform button {
  background: #2271b1;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.usm-cropper-buttons-freeform button:hover {
  background: #135e96;
}

.usm-btn-crop-freeform {
  background: #00a32a !important;
}

.usm-btn-crop-freeform:hover {
  background: #008a20 !important;
}
