/* Image Editor Modal Styles */
.image-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.image-editor-wrapper {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 95vw;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.image-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.image-editor-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

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

.btn-close-editor:hover {
    color: #ff6600;
}

#tui-image-editor {
    flex: 1;
    min-height: 500px;
    overflow: auto;
}

.image-editor-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    justify-content: center;
}

.image-editor-actions button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-upload {
    background: #007bff;
    color: white;
}

.btn-upload:hover {
    background: #0056b3;
}

.btn-save-image {
    background: #28a745;
    color: white;
}

.btn-save-image:hover {
    background: #218838;
}

.btn-save-image:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-cancel-image {
    background: #6c757d;
    color: white;
}

.btn-cancel-image:hover {
    background: #5a6268;
}

/* Image Editor Notifications */
.image-editor-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
}

.image-editor-notification.show {
    transform: translateX(0);
}

.image-editor-notification.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.image-editor-notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.image-editor-notification.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Editable Image Styles */
.editable-image {
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.editable-image:hover {
    opacity: 0.85;
    box-shadow: 0 4px 12px rgba(255, 140, 50, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-editor-wrapper {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .image-editor-actions {
        flex-direction: column;
    }

    .image-editor-actions button {
        width: 100%;
    }

    #tui-image-editor {
        min-height: 400px;
    }
}
