.ratio-action {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;

    svg {
        color: $white;
    }

    &.ratio-action-overlay {
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.2);
        color: #fff;
        padding: 0 5%;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-pack: distribute;
        justify-content: space-around;
        border-radius: inherit;
        color: $white;

        .btn {
            -ms-flex-negative: 0;
            flex-shrink: 0;
            color: $white;
        }
    }
}

.ratio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1rem;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    opacity: 0;

    &.overlay-top {
        bottom: auto;
    }

    &.overlay-bottom {
        top: auto;
    }
}

.ratio-progress {

    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: -2px;
    z-index: 1;

    &.progress {
        height: .3rem;
        background-color: transparent;
    }

    .progress-bar {
        border-radius: 10px;
        background: $primary;
    }
}

.card-hover {



    &:hover {
        & .ratio:before {
            opacity: .7;
        }

        .ratio-overlay,
        .ratio-action {
            opacity: 1;
            pointer-events: initial;
        }
    }
}

.image-picker {
    position: relative;
    width: 100%;

    & input {
        display: none;
    }

    & .image-edit {
        position: absolute;
        left: 10px;
        top: 10px;
        font-size: 12px;
        font-weight: 500;
        padding: 10px 20px;
        cursor: pointer;
        display: inline-block;
        border-radius: $border-radius;
        background-color: #fff;
        box-shadow: $box-shadow;
        z-index: 100;
    }

    & .image-picker-preview {
        background-size: cover;
        background-repeat: no-repeat;
        background-position: 0;
        background-color: rgba(120, 120, 120, 0.1);
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        border-radius: $border-radius;
        position: relative;

        &[data-text]:bexfore {
            position: absolute;
            content: attr(data-text);
            opacity: .6;
        }

        & div {
            position: absolute;
            display: flex;
            flex-direction: column;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            font-size: rem(12px);
            color: $text-muted;

            & i {
                font-size: 3rem;
            }
        }

        &::after {
            content: '';
            display: block;
            padding-top: var(--slide-height);
        }
    }
}

.card {
    .image-zoom {
        overflow: hidden;
        border-radius: $border-radius;
        img {
            transition: transform .3s;
        }
    }

    &:hover .image-zoom img {
        transform: scale(1.25);
    }
}