/* ============================================
   AVATAR CROPPER (диалог кадрирования аватара)
   Chrome comes from .luma-modal; this file only sizes the crop stage and
   maps Cropper.js's own colours onto the theme variables. No literal colours.
   ============================================ */

.avatar-cropper-modal__dialog {
    max-width: 520px;
}

.avatar-cropper__stage {
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--input-bg);
}

/* Cropper replaces this <img> with its own container; before that it must not
   blow the modal open on a large photo. */
.avatar-cropper__image {
    display: block;
    max-width: 100%;
}

.avatar-cropper__stage .cropper-container {
    max-height: 60vh;
}

.avatar-cropper__hint {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* --- Cropper.js chrome, themed ------------------------------------------ */

.avatar-cropper-modal .cropper-view-box {
    outline: 1px solid var(--bs-primary);
    outline-color: var(--bs-primary);
}

.avatar-cropper-modal .cropper-line,
.avatar-cropper-modal .cropper-point {
    background-color: var(--bs-primary);
}

.avatar-cropper-modal .cropper-point {
    width: 8px;
    height: 8px;
    opacity: 1;
}

.avatar-cropper-modal .cropper-dashed {
    border-color: var(--border-color);
}

.avatar-cropper-modal .cropper-face {
    background-color: transparent;
}

/* --- 375px viewport ------------------------------------------------------ */

@media (max-width: 575.98px) {
    .avatar-cropper-modal__dialog {
        max-width: none;
        margin: 0.5rem;
    }

    .avatar-cropper__stage,
    .avatar-cropper__stage .cropper-container {
        max-height: 50vh;
    }

    .avatar-cropper-modal .modal-footer {
        flex-wrap: nowrap;
    }

    .avatar-cropper-modal .modal-footer .btn-card-action {
        flex: 1 1 auto;
        justify-content: center;
    }
}
