.konfx-photo-crop-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, .5);
}

.konfx-photo-crop-dialog {
    width: min(100%, 500px);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 4px;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    overflow: hidden;
}

.konfx-photo-crop-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.konfx-photo-crop-footer {
    padding: 0 1rem 1rem;
}

.konfx-photo-crop-body {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 1.5rem;
    overflow: auto;
}

.konfx-photo-crop-stage {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow: hidden;
}

.konfx-photo-crop-frame {
    position: relative;
    width: min(100%, var(--crop-frame-width, 420px));
    aspect-ratio: var(--crop-ratio, 1 / 1);
    background: transparent;
    overflow: hidden;
    cursor: grab;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .16);
    touch-action: none;
}

.konfx-photo-crop-frame:active {
    cursor: grabbing;
}

.konfx-photo-crop-image {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    max-height: none;
    user-select: none;
    pointer-events: none;
    transform-origin: center;
}

.konfx-photo-crop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #334155;
    font-size: 13px;
}

.konfx-photo-crop-controls label {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0;
}

.konfx-photo-crop-controls input[type=range] {
    width: 100%;
    min-width: 0;
}

.konfx-photo-crop-meta {
    flex: 0 0 auto;
    padding: .375rem .75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #64748b;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .konfx-photo-crop-stage {
        min-height: 240px;
    }

    .konfx-photo-crop-controls {
        align-items: stretch;
        flex-direction: column;
    }
}
