.image-crop-dialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
}

.image-crop-dialog.is-open {
    display: flex;
}

.image-crop-panel {
    width: min(100%, 420px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 18px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.image-crop-panel.is-wide {
    width: min(100%, 760px);
}

.image-crop-panel h4 {
    margin: 0 0 12px;
}

.image-crop-canvas {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: 0 auto 14px;
    border-radius: 4px;
    background: #222;
    cursor: grab;
    touch-action: none;
}

.image-crop-panel.is-wide .image-crop-canvas {
    max-width: 720px;
}

.image-crop-canvas.is-dragging {
    cursor: grabbing;
}

.image-crop-zoom {
    width: 100%;
    margin: 0 0 14px;
}

.image-crop-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

body.image-crop-open {
    overflow: hidden;
}

/* Title, stage with optional round guide, tool row */
.image-crop-panel { border-radius: 16px; }
.image-crop-panel h4 small { font-size: 60%; color: #6b7280; font-weight: 500; }
.image-crop-stage { position: relative; width: 100%; max-width: 360px; margin: 0 auto 14px; border-radius: 8px; overflow: hidden; line-height: 0; }
.image-crop-panel.is-wide .image-crop-stage { max-width: 720px; }
.image-crop-stage .image-crop-canvas { margin: 0; max-width: 100%; border-radius: 0; }
.image-crop-guide { display: none; position: absolute; inset: 0; pointer-events: none; border-radius: 50%;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); border: 2px dashed rgba(255, 255, 255, .85); }
.image-crop-panel.is-circle .image-crop-guide { display: block; }
.image-crop-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
.image-crop-tools .image-crop-zoom { margin: 0; flex: 1; accent-color: var(--sk-primary, #c23b36); }
.image-crop-tool { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 1px solid #e5e1e3; background: #fff;
    font-size: 20px; line-height: 1; cursor: pointer; color: #374151; }
.image-crop-tool:hover { background: var(--sk-primary-soft, #f6e4e3); color: var(--sk-primary, #c23b36); }
.image-crop-tool.rotate { margin-left: 4px; font-size: 18px; }
.image-crop-actions { flex-wrap: wrap; }
.image-crop-actions .btn { border-radius: 999px; }

/* Crop shapes (free crops), picture size, and the three choices */
.image-crop-dialog { font-family: 'Poppins', 'Noto Sans Gujarati', sans-serif; }
.image-crop-panel h4 { font-size: 18px; font-weight: 700; color: #1f2937; }
.image-crop-help { margin: 0 0 12px; font-size: 13.5px; color: #6b7280; }
.image-crop-ratios { display: none; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.image-crop-panel.is-free .image-crop-ratios { display: flex; }
.image-crop-ratios button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #e5e1e3; background: #fff; color: #374151; font-size: 13px; font-weight: 600; cursor: pointer; }
.image-crop-ratios button:hover { border-color: var(--sk-primary, #c23b36); color: var(--sk-primary, #c23b36); }
.image-crop-ratios button.is-on { background: var(--sk-primary, #c23b36); border-color: var(--sk-primary, #c23b36); color: #fff; }
.image-crop-panel.is-free { width: min(100%, 640px); }
.image-crop-panel.is-free .image-crop-stage { display: flex; justify-content: center; max-width: 100%; background: #1f2937; }
.image-crop-panel.is-free .image-crop-canvas { width: auto; height: auto; max-width: 100%; max-height: 56vh; }
.image-crop-info { margin: -6px 0 14px; font-size: 12px; color: #9ca3af; text-align: center; }
.image-crop-actions button { min-height: 40px; padding: 8px 16px; border-radius: 999px !important; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.image-crop-actions .image-crop-cancel { margin-right: auto; background: #f3f4f6; border-color: #e5e7eb; color: #374151; }
.image-crop-actions .image-crop-original { background: #fff; border-color: var(--sk-primary, #c23b36); color: var(--sk-primary, #c23b36); }
.image-crop-actions .image-crop-original:hover { background: var(--sk-primary-soft, #f6e4e3); }
.image-crop-actions .image-crop-apply { background: var(--sk-primary, #c23b36); border-color: var(--sk-primary, #c23b36); color: #fff; }
.image-crop-actions .image-crop-apply:hover { background: var(--sk-primary-dark, #9c2d29); }
@media (max-width: 560px) {
    .image-crop-actions button { flex: 1 1 100%; }
    .image-crop-actions .image-crop-cancel { margin-right: 0; order: 3; }
}
.image-crop-panel.is-busy .image-crop-stage { opacity: .6; }
.image-crop-panel button:disabled { opacity: .5; cursor: progress; }
.image-crop-panel { width: min(100%, 540px); }
.image-crop-panel button:focus { outline: none; }
.image-crop-panel button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--sk-primary-rgb, 194, 59, 54), .3); }
