/* Image Cropper Container */
.image_cropper {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    background-color: #fff;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.image_cropper.hidden {
    display: none;
}

/* All button styling within the image_cropper */
.image_cropper button,
.image_cropper .btn,
.image_cropper input[type="button"],
.image_cropper input[type="submit"] {
    /*background-color: #4CAF50;*/
    /*border: none;*/
    /*color: white;*/
    /*padding: 10px 20px;*/
    /*text-align: center;*/
    /*text-decoration: none;*/
    /*display: inline-block;*/
    /*font-size: 16px;*/
    /*margin: 4px 2px;*/
    /*cursor: pointer;*/
    /*border-radius: 4px;*/
    display: inline-block;
    margin: 6px;
    width: auto;
}

.image_cropper button:disabled,
.image_cropper .btn:disabled,
.image_cropper input[type="button"]:disabled,
.image_cropper input[type="submit"]:disabled {
    /*background-color: #cccccc;*/
}

/* Form controls styling */
.image_cropper input[type="range"] {
    width: 100%;
    margin: 10px 0;
    height: 25px;
}

.image_cropper .container {
    margin-bottom: 20px;
}

/* Make both containers have consistent styling */
.image_cropper .fileInfoContainer,
.image_cropper .imageContainer,
.image_cropper .croppedContainer {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* Since imageContainer has a specific display style initially,
   maintain that behavior while inheriting other styles */
.image_cropper .imageContainer {
    max-width: 100%;
    display: none;
    margin-top: 20px;
    margin-bottom: 20px;
}

.image_cropper .previewImage,
.image_cropper .originalPreview {
    max-width: 100%;
    display: block;
    margin: 0 auto;
    border: 1px solid #eee;
}

.image_cropper h3 {
    margin-top: 0;
    color: inherit;
}

/* Updated aspect ratio container for original preview with overlay */
.image_cropper .aspect-ratio-preview {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
    overflow: hidden;
}

/* This creates the overlay */
.image_cropper .aspect-ratio-preview::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.0);
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 1; /* Above the image */
}

/* This creates the visible window with the correct aspect ratio */
.image_cropper .aspect-ratio-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #000;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    z-index: 2; /* Above the overlay */
    box-sizing: border-box;
}

.image_cropper .croppedPreview {
    max-width: 100%;
    margin: 10px auto;
    display: block;
    border: 1px solid #eee;
}

.image_cropper .progress-container {
    width: 100%;
    background-color: #ddd;
    margin-top: 20px;
    margin-bottom: 10px;
    display: none;
    border-radius: 4px;
    overflow: hidden;
}

.image_cropper .progress-bar {
    width: 0%;
    height: 30px;
    background-color: #4CAF50;
    text-align: center;
    line-height: 30px;
    color: white;
    transition: width 0.3s ease;
}

.image_cropper .hidden {
    display: none !important;
}

.image_cropper .fileInput.hidden {
    display: none !important;
}

.image_cropper .quality-control {
    margin: 15px 0;
    width: 100%;
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
    box-sizing: border-box;
}

.image_cropper label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.image_cropper .helper-text {
    font-size: 12px;
    color: inherit;
    margin: 5px 0;
}

.image_cropper .info-text {
    color: #4169E1;
    font-style: italic;
}

/*.image_cropper .uploadResult {*/
/*    margin-top: 20px;*/
/*    padding: 10px;*/
/*    border-radius: 4px;*/
/*    background-color: #f8f8f8;*/
/*    border: 1px solid #eee;*/
/*}*/

.image_cropper .uploadResult p {
    margin: 5px 0;
}

/* New classes for file size indicators */
.image_cropper .text-success {
    color: green;
}

.image_cropper .text-error {
    color: red;
    font-weight: bold;
}

.image_cropper .text-info {
    color: blue;
}

.image_cropper {
    max-width: 700px;
}

.video-container video {
    background: #eeeeee;
}

.video-container video {
    width: 100%;
}

/* Cropper-specific overrides */
.image_cropper .cropper-container {
    max-width: 100%;
    margin-bottom: 15px;
}

.image_cropper .cropper-view-box {
    outline: 1px solid #39f;
    outline-color: rgba(51, 153, 255, 0.75);
}

.image_cropper .cropper-line {
    background-color: #39f;
}

.image_cropper .cropper-point {
    background-color: #39f;
}

.video-element::-webkit-media-controls {
    display: none !important;
}

.video-element::-webkit-media-controls-panel {
    display: none !important;
}

.video-element::-webkit-media-controls-play-button {
    display: none !important;
}

.video-element::-webkit-media-controls-start-playback-button {
    display: none !important;
}

@media (max-width: 530px) {
    .uploadOriginalBtn,
    .applyCropBtn {
        margin-bottom: 32px !important;
    }
}

.use-upload-btn {
    display: none !important;
}

.cropSavedFileIcon {
    position: absolute;
    width: 20px;
    height: 20px;
    background: grey;
    left: 0;
    top: 0;
    cursor: pointer;
    display: none;
}

.image_cropper .cancelEditModeBtn,
.image_cropper .cancelEditModeBtn2,
.image_cropper .cropSavedFileIcon {
    display: none;
}