.profile-photo-cropper-modal {
    position: fixed;
    inset: 0;
    z-index: 2050;
}

.profile-photo-cropper-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 17, 30, 0.72);
}

.profile-photo-cropper-dialog {
    position: relative;
    width: min(92vw, 860px);
    margin: 4vh auto;
    max-height: 92vh;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(9, 23, 38, 0.35);
    display: flex;
    flex-direction: column;
}

.profile-photo-cropper-header,
.profile-photo-cropper-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
}

.profile-photo-cropper-header {
    border-bottom: 1px solid #e2ebf2;
}

.profile-photo-cropper-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1f394d;
}

.profile-photo-cropper-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #eef3f7;
    color: #29455d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-photo-cropper-body {
    padding: 20px 22px 12px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.profile-photo-cropper-stage {
    position: relative;
    height: min(50vh, 520px);
    min-height: 320px;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(45deg, #eef3f7 25%, transparent 25%),
        linear-gradient(-45deg, #eef3f7 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eef3f7 75%),
        linear-gradient(-45deg, transparent 75%, #eef3f7 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.profile-photo-cropper-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    touch-action: none;
}

.profile-photo-cropper-canvas.is-dragging {
    cursor: grabbing;
}

.profile-photo-cropper-toolbar {
    padding: 12px 2px 4px;
}

.profile-photo-cropper-zoom-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #213f58;
}

.profile-photo-cropper-zoom {
    width: 100%;
}

.profile-photo-cropper-footer {
    border-top: 1px solid #e2ebf2;
    background: #ffffff;
    flex: 0 0 auto;
}

.profile-photo-cropper-ui {
    margin-top: 12px;
}

.profile-photo-cropper-preview {
    width: 132px;
    aspect-ratio: 6 / 7;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #d7e4ef;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo-cropper-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-photo-cropper-preview-empty {
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    color: #6d7d89;
}

.profile-photo-cropper-status {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.6;
    color: #6d7d89;
}

.profile-photo-cropper-status.is-error {
    color: #c83b3b;
}

html.profile-photo-cropper-open,
html.profile-photo-cropper-open body {
    overflow: hidden;
}

@media (max-width: 767px) {
    .profile-photo-cropper-dialog {
        width: calc(100vw - 20px);
        margin: 10px auto;
        border-radius: 16px;
        max-height: calc(100vh - 20px);
    }

    .profile-photo-cropper-header,
    .profile-photo-cropper-footer,
    .profile-photo-cropper-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .profile-photo-cropper-stage {
        min-height: 260px;
        height: 48vh;
    }

    .profile-photo-cropper-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .profile-photo-cropper-footer .btn {
        width: 100%;
    }
}
