
/* Circle crop overlay */
.circle-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 9999px var(--overlay-black-50);
    pointer-events: none;
    z-index: 1400;
}

/* Active button state for crop modes */
.action-btn.active {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

/* Fixed cropper container styles */
.cropper-container {
    max-width: 100% !important;
    margin: 0 auto !important;
    touch-action: none; /* Disable double-tap zoom */
}

/* Prevent unwanted movements */
.cropper-view-box {
    outline: 1px solid #fff;
    outline-color: rgba(255, 255, 255, 0.75);
}

/* Keep crop box stable */
.cropper-face {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Disable double-tap zoom on all buttons */
button, .btn, .upload-btn {
    touch-action: manipulation;
}

.crop-controls button {
    touch-action: manipulation;
}

/* Dimension overlay in crop box */
.crop-dimension-overlay {
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--overlay-black-60);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    pointer-events: none;
    z-index: 1500;
    white-space: nowrap;
    box-shadow: 0 2px 8px var(--overlay-black-20);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.crop-dimension-overlay.active {
    opacity: 1;
}

.floating-download-btn {
    position: absolute;
    z-index: 2000; /* Higher than cropper UI elements */ 
    opacity: 0.9;
    transition: all 0.3s ease;
    display: none; /* Initially hidden, will be shown and positioned via JS */
    transform: translateY(10px); /* Slight offset from crop box */
}

.floating-download-btn:hover {
    opacity: 1;
}

.floating-download-btn .btn {
    box-shadow: 0 2px 5px var(--overlay-black-20);
    font-weight: 500;
}
 

/* Button styles */
.text-center .btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.btn-group {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}
 

.cropper-container {
    margin: 0 auto;
}

#file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.justify-content-center {
    justify-content: center;
}

/* Responsive adjustments for the crop container */
@media screen and (max-width: 768px) { 
    #crop-container {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
    
}

/* For very small screens */
@media screen and (max-width: 480px) { 
    
    .text-center .btn-toolbar {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .crop-controls {
        padding: 0 10px;
    }
    
    .btn-group {
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
        width: 100%;
    }
     
}

 
/* Specific styling for the crop controls container */
.crop-controls {
    width: 100%;
    display: block;
    clear: both;
    position: relative;
    text-align: center;
}

/* Disabled social media button styling */
.social-crop-btn.disabled-social-btn,
.social-crop-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #e0e0e0 !important;
    color: #999 !important;
    border-color: #ccc !important;
    pointer-events: none;
}

.social-crop-btn.disabled-social-btn:hover,
.social-crop-btn:disabled:hover {
    background-color: #e0e0e0 !important;
    color: #999 !important;
    transform: none;
}