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

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

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

.acf-input .usm-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

/* Modern file input styling */
.usm-image-input {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  background-color: #fff;
  border: 2px dashed #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.usm-image-input:hover {
  border-color: #2271b1;
  background-color: #f6f7f7;
}

.usm-image-input:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

/* Style the file input button */
.usm-image-input::file-selector-button {
  padding: 8px 16px;
  margin-right: 12px;
  background-color: #2271b1;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.usm-image-input::file-selector-button:hover {
  background-color: #135e96;
}

/* For older browsers */
.usm-image-input::-webkit-file-upload-button {
  padding: 8px 16px;
  margin-right: 12px;
  background-color: #2271b1;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.usm-image-input::-webkit-file-upload-button:hover {
  background-color: #135e96;
}

.usm-image-input::-ms-browse {
  padding: 8px 16px;
  margin-right: 12px;
  background-color: #2271b1;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

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

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

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

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

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

.shn-crop {
  display: none;
}

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

.resize-container img {
  display: block;
}

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

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

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

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

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

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

.overlay {
  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 {
  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-field-wrapper {
  width: 100%;
  max-width: 100%;
}

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

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

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