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

.img-crop-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem 1.35rem;
    background: #0b0d10;
    color: #fff;
    user-select: none;
}

.img-crop-overlay[hidden] {
    display: none !important;
}

.img-crop-overlay__bar {
    display: grid;
    grid-template-columns: 2.75rem 1fr 2.75rem;
    align-items: center;
    width: min(86vw, 560px);
    flex: 0 0 auto;
}

.img-crop-overlay__title {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    color: #f8fafc;
}

.img-crop-overlay__icon-btn,
.img-crop-overlay__zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.img-crop-overlay__icon-btn:hover,
.img-crop-overlay__zoom-btn:hover,
.img-crop-overlay__icon-btn:focus-visible,
.img-crop-overlay__zoom-btn:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
}

.img-crop-overlay__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.img-crop-overlay__frame {
    position: relative;
    width: min(86vw, calc(100dvh - 12.5rem), 560px);
    height: min(86vw, calc(100dvh - 12.5rem), 560px);
    border-radius: 1.1rem;
    overflow: hidden;
    background: #111;
    touch-action: none;
}

.img-crop-overlay__frame > img {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.img-crop-overlay__frame .cropper-container {
    width: 100% !important;
    height: 100% !important;
}

.img-crop-overlay__frame .cropper-view-box {
    outline: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.img-crop-overlay__frame .cropper-dashed,
.img-crop-overlay__frame .cropper-center,
.img-crop-overlay__frame .cropper-point,
.img-crop-overlay__frame .cropper-line {
    display: none;
}

.img-crop-overlay__frame .cropper-modal {
    background-color: #000;
    opacity: 0.42;
}

.img-crop-overlay__frame .cropper-face {
    background-color: transparent;
    opacity: 1;
    cursor: grab;
}

.img-crop-overlay__frame .cropper-face:active {
    cursor: grabbing;
}

.img-crop-overlay__loader {
    position: absolute;
    z-index: 2;
    width: 2rem;
    height: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-top-color: #fff;
    border-radius: 999px;
    animation: img-crop-spin 0.7s linear infinite;
}

.img-crop-overlay__loader[hidden] {
    display: none !important;
}

.img-crop-overlay__hint {
    margin: 0;
    color: rgba(248, 250, 252, 0.62);
    font-size: 0.8rem;
    text-align: center;
}

.img-crop-overlay__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: min(86vw, 560px);
}

.img-crop-overlay__done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.15rem;
    height: 4.15rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--bs-primary, #2fb344);
    color: #fff;
    font-size: 1.85rem;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
    cursor: pointer;
}

.img-crop-overlay__done:hover,
.img-crop-overlay__done:focus-visible {
    filter: brightness(1.06);
    outline: none;
}

.img-crop-overlay__done:disabled {
    opacity: 0.55;
    cursor: wait;
}

@keyframes img-crop-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 576px) {
    .img-crop-overlay {
        padding: 0.45rem 0.7rem 1rem;
    }

    .img-crop-overlay__frame {
        width: min(94vw, calc(100dvh - 11.5rem));
        height: min(94vw, calc(100dvh - 11.5rem));
        border-radius: 0.85rem;
    }
}
