/* Shared image crop editor overlay (see assets/js/image-cropper/crop-editor.js) */
#imgCropOverlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
}
#imgCropOverlay.open { display: flex; }
#imgCropOverlay .ico-dialog {
    background: #fff;
    border-radius: 10px;
    width: min(960px, 94vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
#imgCropOverlay .ico-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #212529;
    color: #fff;
    font-weight: 600;
}
#imgCropOverlay .ico-body {
    display: flex;
    gap: 14px;
    padding: 14px;
    min-height: 0;
    flex: 1;
}
#imgCropOverlay .ico-stage {
    flex: 1 1 auto;
    min-width: 0;
    background: #111;
    border-radius: 6px;
    overflow: hidden;
    max-height: 68vh;
}
#imgCropOverlay .ico-stage img { max-width: 100%; display: block; }
#imgCropOverlay .ico-side {
    flex: 0 0 210px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#imgCropOverlay .ico-tools,
#imgCropOverlay .ico-ratio { display: flex; gap: 6px; flex-wrap: wrap; }
#imgCropOverlay .ico-tools .btn { border: 1px solid #dee2e6; }
#imgCropOverlay .ico-prev-label { font-weight: 600; font-size: 13px; margin-bottom: -4px; }
#imgCropOverlay .ico-prev-cell { text-align: center; font-size: 12px; color: #6c757d; }
#imgCropOverlay .ico-prev-frame {
    width: 150px;
    aspect-ratio: 3 / 4; /* overridden per-call via inline style */
    margin: 0 auto 4px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}
/* Cropper writes the live preview into .ico-preview; fill the frame (cover) */
#imgCropOverlay .ico-prev-img { width: 100%; height: 100%; overflow: hidden; }
#imgCropOverlay .ico-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e9ecef;
}
@media (max-width: 640px) {
    #imgCropOverlay .ico-body { flex-direction: column; }
    #imgCropOverlay .ico-side { flex-basis: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
    #imgCropOverlay .ico-stage { max-height: 46vh; }
    #imgCropOverlay .ico-prev-frame { width: 96px; }
}
