// Display flex
@mixin flex() {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

// Flax wrap
@mixin wrap() {
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

// Align
@mixin align() {
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
}

/*------------------------------------------------------------------
Instagram Feed
-------------------------------------------------------------------*/
.oew-insta {
    .oew-insta-header {
        @include flex();
        @include wrap();
        @include align();
        margin-bottom: 14px;
    }

    .oew-insta-left {
        @include flex();
        flex: 1;
    }

    .oew-insta-avatar {
        width: 75px;
        height: 75px;
        margin-right: 10px;

        img {
            width: 100%;
            height: 100%;
            -webkit-border-radius: 50%;
            -moz-border-radius: 50%;
            border-radius: 50%;
            -o-object-fit: cover;
            object-fit: cover;
        }
    }

    .oew-insta-username {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.3;
        margin: 0 0 4px;
        text-transform: capitalize;
    }

    .oew-insta-desc {
        font-size: 13px;
        line-height: 1.3;
        margin: 0;
        padding-top: 4px;
    }

    .oew-insta-button {
        margin-left: 10px;

        a {
            display: inline-block;
            background-color: #0095f6;
            color: #fff;
            padding: 12px 20px;
            font-size: 12px;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.5px;
            -webkit-border-radius: 3px;
            -moz-border-radius: 3px;
            border-radius: 3px;

            &:hover {
                background-color: #0065a7;
            }
        }

        svg {
            vertical-align: middle;
            font-size: 16px;
            height: 1em;
            margin-right: 10px;
        }
    }

    .oew-insta-pictures {
        @include flex();
        @include wrap();
    }

    .oew-insta-item {
        width: calc( 100% / 5 );

        .oew-insta-item-inner {
            position: relative;
            overflow: hidden;
        }

        .oew-insta-gallery-icon {
            position: absolute;
            right: 8px;
            top: 8px;

            svg {
                display: block;
                height: 1em;
                z-index: 1;
                fill: #fff;
                -webkit-filter: drop-shadow( 0 0 2px rgba(0,0,0,.4) );
                filter: drop-shadow( 0 0 2px rgba(0,0,0,.4) );
            }
        }

        .oew-insta-icon {
            @include flex();
            @include align();
            -webkit-justify-content: center;
            justify-content: center;
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            line-height: 1;
            background-color: rgba(19, 175, 240, 0.7);
            color: #fff;
            -webkit-transform: scale(0.8);
            -ms-transform: scale(0.8);
            transform: scale(0.8);
            opacity: 0;
            -webkit-transition: all 200ms;
            -o-transition: all 200ms;
            transition: all 200ms;

            svg {
                width: 20px;
            }
        }

        &:hover .oew-insta-icon {
            -webkit-transform: scale(1);
            -ms-transform: scale(1);
            transform: scale(1);
            opacity: 1;
        }
    }
}

/* RTL */
body.rtl {
    .oew-insta {
        .oew-insta-avatar {
            margin-left: 10px;
            margin-right: 0;
        }

        .oew-insta-button {
            margin-right: 10px;
            margin-left: 0;

            svg {
                margin-left: 10px;
                margin-right: 0;
            }
        }
    }
}

/* Responsive */
@media only screen and (max-width: 768px) {
    .oew-insta {
        .oew-insta-left {
            -webkit-flex-direction: column;
            -ms-flex-direction: column;
            flex-direction: column;
            @include align();
            text-align: center;
        }

        .oew-insta-avatar {
            margin: 0 0 10px;
        }

        .oew-insta-button {
            display: none;
        }
    }
}