/* HivePress Image Crop Editor - Production Styles */

/* Modal Styles */
#hivepress-crop-modal, #hivepress-upload-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.8);
}

.crop-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.crop-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 95vw;
    max-height: 95vh;
    width: 1200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    background: #f9f9f9;
    flex-shrink: 0;
}

.crop-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.crop-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.crop-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.crop-modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.crop-container {
    flex: 2;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    min-height: 500px;
    position: relative;
}

#hivepress-crop-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.crop-info {
    flex: 1;
    padding: 20px;
    border-left: 1px solid #ddd;
    background: #fff;
    min-width: 300px;
    overflow-y: auto;
}

.crop-preview {
    margin-bottom: 30px;
}

.crop-preview h4,
.crop-options h4,
.file-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}


.crop-options {
    margin-bottom: 30px;
}

.aspect-ratio-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.aspect-btn {
    font-size: 12px;
    padding: 6px 12px;
    line-height: 1.2;
    min-width: 50px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aspect-btn.button-primary {
    background: #007cba;
    border-color: #005a87;
    color: #fff;
}

.quality-setting {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quality-setting label {
    font-weight: 500;
    min-width: 50px;
}

#crop-quality {
    flex: 1;
    max-width: 120px;
}

.quality-value {
    font-weight: 500;
    color: #007cba;
    min-width: 35px;
}

.file-info {
    margin-bottom: 20px;
}

.file-details p {
    margin: 8px 0;
    font-size: 13px;
    color: #666;
}

.file-details strong {
    color: #333;
    min-width: 60px;
    display: inline-block;
}

.crop-modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f9f9f9;
    flex-shrink: 0;
}

.crop-modal-footer .button {
    margin: 0;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crop-modal-footer .button-primary {
    background: #007cba;
    border-color: #005a87;
    color: #fff;
}

.crop-modal-footer .button-primary:hover {
    background: #005a87;
}

.crop-modal-footer .button-secondary {
    background: #f7f7f7;
    border-color: #ccd0d4;
    color: #2c3338;
}

/* Progress Modal */
.progress-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.progress-modal-content h3 {
    margin: 0 0 30px 0;
    font-size: 18px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #007cba, #005a87);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Notifications */
.hp-notice {
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.hp-notice--success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.hp-notice--error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Cropper.js customizations */
.cropper-container {
    background: #f5f5f5;
}

.cropper-view-box {
    outline: 2px solid #007cba;
    outline-color: rgba(0, 124, 186, 0.75);
}

.cropper-face {
    background: rgba(255, 255, 255, 0.1);
}

.cropper-line,
.cropper-point {
    background-color: #007cba;
}

.cropper-point.point-se {
    width: 8px;
    height: 8px;
    background-color: #007cba;
    border-radius: 50%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .crop-modal-content {
        width: 95vw;
        height: 95vh;
    }
    
    .crop-info {
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .crop-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .crop-modal-body {
        flex-direction: column;
    }
    
    .crop-container {
        flex: 1;
        min-height: 300px;
        padding: 15px;
    }
    
    .crop-info {
        border-left: none;
        border-top: 1px solid #ddd;
        flex: none;
        padding: 15px;
        max-height: 40vh;
    }
    
    
    .aspect-ratio-buttons {
        gap: 6px;
    }
    
    .aspect-btn {
        font-size: 11px;
        padding: 5px 8px;
        min-width: 40px;
    }
    
    .crop-modal-footer {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .crop-modal-footer .button {
        flex: 1;
        min-width: 120px;
    }
}

/* Accessibility */
.crop-modal-close:focus,
.aspect-btn:focus,
.crop-and-upload:focus,
.crop-skip:focus,
.crop-cancel:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .crop-modal-content {
        border: 2px solid #000;
    }
    
    .cropper-view-box {
        outline-color: #000;
    }
    
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .crop-modal-overlay,
    .progress-modal-content h3,
    .hp-notice {
        animation: none;
        transition: none;
    }
    
    .progress-fill {
        transition: none;
    }
}}
}
}
