.image-resizer-upload {
    border: 2px dashed var(--theme-border, var(--bs-border-color));
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    background: var(--theme-surface, #f8f9fa);
}

.image-resizer-upload.drag-over {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.05);
}

.image-resizer-file-list {
    max-height: 220px;
    overflow-y: auto;
}

.image-resizer-file-list .list-group-item {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.image-resizer-file-list .list-group-item.active {
    border-left: 3px solid var(--bs-primary);
}

.image-resizer-file-list .file-remove-btn {
    flex-shrink: 0;
}

.image-resizer-preview-panel .card-body.image-resizer-output-body {
    background: var(--theme-surface, #f8f9fa);
    min-height: 220px;
}

.image-resizer-preview-panel.drag-over {
    outline: 2px dashed var(--bs-primary);
    outline-offset: 4px;
    border-radius: 0.5rem;
}

.image-resizer-crop-wrap {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--theme-surface, #f8f9fa);
    border-radius: 0.375rem;
}

html[data-theme="dark"] .image-resizer-crop-wrap:not(.has-image),
html[data-theme="true-dark"] .image-resizer-crop-wrap:not(.has-image),
html.theme-dark .image-resizer-crop-wrap:not(.has-image),
html.theme-true-dark .image-resizer-crop-wrap:not(.has-image),
html[data-theme="dark"] .image-resizer-preview-panel .image-resizer-output-body:not(.has-preview),
html[data-theme="true-dark"] .image-resizer-preview-panel .image-resizer-output-body:not(.has-preview),
html.theme-dark .image-resizer-preview-panel .image-resizer-output-body:not(.has-preview),
html.theme-true-dark .image-resizer-preview-panel .image-resizer-output-body:not(.has-preview) {
    background-color: #0d1117;
}

#sourceCanvas {
    max-width: 100%;
    display: block;
    cursor: crosshair;
}

.image-resizer-crop-overlay {
    position: absolute;
    pointer-events: none;
}

.image-resizer-crop-overlay .crop-box {
    position: absolute;
    border: 2px solid var(--bs-primary);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    cursor: move;
    box-sizing: border-box;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--bs-primary);
    border: 2px solid #fff;
    border-radius: 2px;
    pointer-events: auto;
}

.crop-handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }

.image-resizer-preview-wrap {
    display: inline-block;
    padding: 0;
    border-radius: 0;
    border: 1px solid var(--theme-border, var(--bs-border-color));
    background: transparent;
    line-height: 0;
}

#previewCanvas {
    max-width: 100%;
    display: block;
    border-radius: 0;
    background: transparent;
}
