/**
 * Стили кропера аватарки.
 */
#avatar-cropper-modal.modal.active { z-index: 2400; }

.cropper-modal-content {
    max-width: 420px;
    width: min(420px, 94vw);
    padding: 1.5rem 1.5rem 1.25rem;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    animation: confirmIn 220ms cubic-bezier(0.2, 0.9, 0.3, 1.05);
    text-align: center;
}

.cropper-title { margin: 0 0 0.25rem; }
.cropper-modal-content .modal-subtitle { margin: 0 0 1rem; }

/* Квадратная сцена + изображение под маской */
.cropper-stage {
    --size: 320px;
    position: relative;
    width: var(--size);
    height: var(--size);
    margin: 0 auto;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.cropper-stage:active { cursor: grabbing; }

@media (max-width: 480px) {
    .cropper-stage { --size: 280px; }
}

.cropper-img {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    max-width: none;
    max-height: none;
}

/* Маска: круглый «вырез» внутри квадратной сцены */
.cropper-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Квадратный режим: убираем круглую маску — обрезается весь квадрат сцены. */
.cropper-stage.cropper-stage-square .cropper-mask { display: none; }
.cropper-stage.cropper-stage-square { outline: 2px dashed rgba(15, 23, 42, 0.18); outline-offset: -2px; }

.cropper-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    /* Полупрозрачная белая «вуаль» между квадратом и кругом — едва заметная (15% непрозрачности). */
    box-shadow: 0 0 0 9999px rgba(255, 255, 255, 0.15);
    /* Тонкий светлый контур по краю круга. */
    border: 2px solid rgba(255, 255, 255, 0.9);
    outline: 1px dashed rgba(15, 23, 42, 0.18);
    outline-offset: -6px;
}

/* Слайдер зума */
.cropper-zoom {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 1rem 0 1.25rem;
    color: var(--gray-500);
}

.cropper-zoom input[type="range"] {
    flex: 1;
    appearance: none;
    height: 4px;
    background: var(--gray-200);
    border-radius: 999px;
    outline: none;
}

.cropper-zoom input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-500);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.45);
    border: 3px solid #fff;
}

.cropper-zoom input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-500);
    border: 3px solid #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.45);
}

.cropper-zoom-icon-sm { font-size: 0.8rem; }
.cropper-zoom-icon-lg { font-size: 1.05rem; }

.cropper-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.cropper-actions .btn { min-width: 7rem; }
