/* Image Editor Modal Styles */

.pdfsp-editor-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.pdfsp-editor-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdfsp-editor-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pdfsp-editor-header {
    padding: 16px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #d32f2f;
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.pdfsp-editor-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pdfsp-editor-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.pdfsp-editor-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.pdfsp-editor-body {
    padding: 20px;
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pdfsp-editor-preview {
    flex: 1;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.pdfsp-editor-preview img {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

.pdfsp-editor-controls {
    border-top: 1px solid #ddd;
    padding-top: 16px;
}

.pdfsp-editor-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pdfsp-editor-btn {
    background: #fff;
    border: 2px solid #d32f2f;
    color: #d32f2f;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.pdfsp-editor-btn:hover {
    background: #d32f2f;
    color: #fff;
}

.pdfsp-editor-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pdfsp-editor-crop-controls {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
}

.pdfsp-editor-crop-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.pdfsp-editor-rotation-control {
    margin-top: 12px;
    padding: 12px;
    background: #f0f0f0;
    border-radius: 4px;
}

.pdfsp-editor-rotation-control label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.pdfsp-rotation-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdfsp-rotation-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    transition: background 0.2s;
}

.pdfsp-rotation-slider:hover {
    background: #ccc;
}

.pdfsp-rotation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d32f2f;
    cursor: pointer;
    transition: all 0.2s;
}

.pdfsp-rotation-slider::-webkit-slider-thumb:hover {
    background: #b71c1c;
    transform: scale(1.1);
}

.pdfsp-rotation-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d32f2f;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.pdfsp-rotation-slider::-moz-range-thumb:hover {
    background: #b71c1c;
    transform: scale(1.1);
}

.pdfsp-rotation-value {
    min-width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    background: #fff;
    color: #333;
}

.pdfsp-rotation-reset {
    background: #fff;
    border: 1px solid #d32f2f;
    color: #d32f2f;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s;
}

.pdfsp-rotation-reset:hover {
    background: #d32f2f;
    color: #fff;
}

.pdfsp-editor-btn-small {
    background: #fff;
    border: 1px solid #d32f2f;
    color: #d32f2f;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 6px;
    transition: all 0.2s;
}

.pdfsp-editor-btn-small:hover {
    background: #d32f2f;
    color: #fff;
}

.pdfsp-editor-footer {
    padding: 16px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

.pdfsp-editor-footer .button {
    min-width: 100px;
}

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

.cropper-view-box {
    outline: 1px solid #d32f2f;
    outline-color: rgba(211, 47, 47, 0.75);
}

.cropper-point {
    background-color: #d32f2f;
}

.cropper-line {
    background-color: #d32f2f;
}

.cropper-face {
    background-color: transparent !important;
}

/* Responsive */
@media (max-width: 768px) {
    .pdfsp-editor-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .pdfsp-editor-preview {
        min-height: 300px;
    }
    
    .pdfsp-editor-toolbar {
        justify-content: center;
    }
    
    .pdfsp-editor-btn {
        flex: 1;
        justify-content: center;
        min-width: 45%;
    }
}
