@import '../../styles/mixins';

#modal-crop-image {
    .modal-dialog {
        @include screen-sm {
            max-width: calc(100% - 2.4rem);
        }
    }

    .image-container {
        img {
            max-height: calc(100vh - 28px - 28px - 69px - 69px - 16px - 16px - 2px);
        }
    }

    .modal-footer {
        .input-group {
            width: 200px;
        }
    }
}

.btn-select-image {
    display: none;

    body.iframe-mode & {
        display: inline-block;
    }
}

.image {
    position: relative;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;

    &:before {
        content: '';
        display: block;
        padding-top: 100%;
    }

    .image-bg {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1;
        background: #f5f5f5 no-repeat 50% 50% / contain;
    }

    .image-overlay {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1;
        background-color: rgba(0, 0, 0, .7);
        display: none;

        .image-overlay-inner {
            width: 100%;
            position: absolute;
            left: 0;
            top: 50%;
            transform: translate(0, -50%);

            .btn:not(:last-child) {
                margin-right: 5px;
            }
        }
    }

    &:hover {
        .image-overlay {
            display: block;
        }
    }
}
