/*=============================
=            photo            =
=============================*/
@screen-lg-xs-max: 1024px;
@screen-lg-xs-min: 1025px;

//----------  General  ----------
.text-transition{transition:color 0.3s;}
.ver-center(){top:50%;transform:translateY(-50%);}

//----------  Albums listing  ----------
#album-collection{
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;

    .flag_style_parent
    {
        position: absolute;
        display: flex;
        right: 8px;
        top: 0;
    }

    .photo-album-item{
        width: 33.33%;
        .mb-3();

        .item-outer{
            display: flex;
            flex-direction: column;
            position: relative;

            .item-media{
                position: relative;
                transition: box-shadow 0.3s;

                a{.bg-img-ratio(100%)}

                .item-total-photo{
                    height: 40px;
                    border-radius: 6px;
                    background-color: rgba(0,0,0,0.5);
                    color: #fff;
                    .fz-lh(20px);
                    position: absolute;
                    bottom: 8px;
                    right: 8px;
                    padding: 0 12px;
                    .items-center();

                    .ico{
                        margin-right: @grid-point+2;
                        display: inline-block;
                    }

                    html[dir='rtl'] &{
                        right: auto;
                        left: 8px;

                        .ico{
                            margin-right: 0;
                            margin-left: @grid-point+2;
                        }
                    }
                }

                &:before,
                &:after{
                    content: "";
                    height: 4px;
                    position: absolute;
                    top: 100%;
                    transition: background-color 0.3s;
                }

                &:before{
                    background-color: @gray-light;
                    left: 4px;
                    right: 4px;
                }
                &:after{
                    left: @grid-point;
                    right: @grid-point;
                    background-color: @gray-lighter;
                    margin-top: 4px;
                }
            }

            .item-inner{
                position: relative;

                &.has-permission{
                    .pr-3;
                }

                .item-title{
                    .text-overflow();
                    display: inline-block;
                    max-width: 100%;

                    a{
                        .fz-lh(16px);
                        color: @text-color;
                    }
                }
                .item-author{
                    .fz-lh(12px);
                    color: @gray-dark;
                    margin-top: 4px;
                    .text-overflow();
                    display: block;

                    .user_profile_link_span{
                        display: inline-block;

                        &,a{
                            font-weight: normal !important;
                        }
                    }
                }
            }

            &:hover{
                .item-title a{
                    color: @brand-primary;
                }

                .item-media{
                    box-shadow: 0px 10px 20px 0px rgba(38, 129, 213, 0.2);

                    &:before{
                        background-color: @brand-primary-light;
                    }
                    &:after{
                        background-color: @brand-primary-lighter;
                    }
                }
            }
        }

        @media screen and (max-width: @screen-xs-max){
            width: 50%;
        }

        @media screen and (max-width: @screen-xs-min){
            width: 100%;
        }

        .moderation_row{
            position: absolute;
            top: 0;
            left: 0;

            html[dir='rtl'] &{
                right: 0;
                left: auto;
            }
        }
        .item-option{
            position: absolute;
            right: -@grid-point;
            top: -@grid-point;
            
            span[data-toggle="dropdown"]{
                .items-center();
                .s-4;
            }

            .row_edit_bar_action .ico{
                color: @gray-dark;
            }

            html[dir='rtl'] &{
                left: -@grid-point;
                right: auto;
            }
        }
    }
}

//----------  feature photo  ----------
.photo-featured{
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1px;

    li{
        width: 50%;
        padding: 0 1px;
        margin-bottom: 2px;
        position: relative;
        a{
            .bg-img-ratio(80%);
        }

        .photo_like{
            font-size: 12px;
            color: #fff;
            height: 24px;
            bottom: 4px;
            left: 4px;
            .items-center();
            background-color: rgba(0,0,0,0.5);
            position: absolute;
            border-radius: 12px;
            .transition(all 300ms ease);
            opacity: 0;
            @media (max-width:991px){
                opacity: 1;
            }
            @media (max-width:480px){
                display: none;
            }
            html[dir='rtl'] &{
                right: 4px;
                left: auto;
            }
        }
        &:hover{
            .photo_like{
                opacity: 1;
            }
        }

        &:only-child{
            width: 100%;
        }
    }

    &.photo-featured-count-1{
        li{
            width: 100%;    
        }
    }

    &.photo-featured-count-2{
        li{
            width: 50%;            
        }
    }

    &.photo-featured-count-3{
        li{    
            width: 50%;
            &:first-of-type{
                width: 100%;
                & > a{
                    .bg-img-ratio(68%);
                }
            }
        }
    }

    @media (max-width:767px) and (min-width:641px){
        li{
            width: 25% !important;
            & > a{
                .bg-img-ratio(80%) !important;
            }
        }
        
    }
    @media (max-width:640px) and (min-width:481px){
        li{
            width: 33.33% !important;
            & > a{
                .bg-img-ratio(80%) !important;
            }
        }
    }
}

//----------  casual view  ----------
.photo-listing{
    margin: 0 -2px;
    position: relative;

    [data-mode-view="casual"] & {
        .js_pager_view_more_link {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            margin-bottom: -50px;
        }
        margin-bottom: 60px;
    }

    .photo-listing-item{
        padding: 0 2px;
        margin-bottom: 4px;

        [data-mode-view="grid"] &{
            float: left;
            
            .item-outer .photo-mature.item-media:after,
            .moderation_row,
            .item-option{
                opacity: 1 !important;
            }

            .item-outer{
                .item-media{
                    img{
                        display: none !important;
                    }
                }
            }
        }

        [data-mode-view="casual"] &{
            &.casual-view{
                .item-outer .photo-mature.item-media:after,
                .moderation_row,
                .item-option{
                    opacity: 1 !important;
                }
            }

            .photo-mature{
                img{
                    filter: blur(2.5px);
                }
            }
        }

        #main:not(.empty-right) [data-mode-view="grid"] &,
        #main:not(.empty-left) [data-mode-view="grid"] &{
            &:nth-of-type(5n+1),
            &:nth-of-type(5n+2){
                width: 50%;

                .item-media{
                    .bg-img-ratio(75%);
                }

                @media screen and (max-width: @screen-xs-min){
                    width: 50%;
                }
            }

            &:nth-of-type(5n+4){
                width: 38%;

                .item-media{
                    .bg-img-ratio(100%);
                }

                @media screen and (max-width: @screen-md-max){
                    width: 50%;

                    .item-media{
                        .bg-img-ratio(75%);
                    }
                }

                @media screen and (max-width: @screen-xs-min){
                    width: 50%;
                }
            }

            &:nth-of-type(5n+3),
            &:nth-of-type(5n+5){
                width: 31%;

                .item-media{
                    .bg-img-ratio(123.09%);
                }

                @media screen and (max-width: @screen-md-max){
                    width: 50%;

                    .item-media{
                        .bg-img-ratio(75%);
                    }
                }
                @media screen and (max-width: @screen-xs-min){
                    width: 50%;
                }
            }
        }

        #main.empty-right [data-mode-view="grid"] &,
        #main.empty-left [data-mode-view="grid"] &{
            &:nth-of-type(7n+1),
            &:nth-of-type(7n+2),
            &:nth-of-type(7n+3){
                width: 33.33%;

                .item-media{
                    .bg-img-ratio(75%);
                }

                @media screen and (max-width: @screen-md-max){
                    width: 50%;
                }
            }

            &:nth-of-type(7n+4),
            &:nth-of-type(7n+7){
                width: 22%;

                .item-media{
                    .bg-img-ratio(128.15%);
                }

                @media screen and (max-width: @screen-md-max){
                    width: 50%;

                    .item-media{
                        .bg-img-ratio(75%);
                    }
                }
            }

            &:nth-of-type(7n+5),
            &:nth-of-type(7n+6){
                width: 28%;

                .item-media{
                    .bg-img-ratio(100%);
                }

                @media screen and (max-width: @screen-md-max){
                    width: 50%;

                    .item-media{
                        .bg-img-ratio(75%);
                    }
                }
            }
        }

        #main.empty-right.empty-left [data-mode-view="grid"] &{
            &:nth-of-type(9n+1),
            &:nth-of-type(9n+2),
            &:nth-of-type(9n+3),
            &:nth-of-type(9n+4){
                width: 25%;

                .item-media{
                    .bg-img-ratio(75%);
                }

                @media screen and (max-width: @screen-md-max){
                    width: 50%;
                }
            }

            &:nth-of-type(9n+6),
            &:nth-of-type(9n+7),
            &:nth-of-type(9n+8){
                width: 22%;

                .item-media{
                    .bg-img-ratio(100%);
                }

                @media screen and (max-width: @screen-md-max){
                    width: 50%;

                    .item-media{
                        .bg-img-ratio(75%);
                    }
                }
            }

            &:nth-of-type(9n+5),
            &:nth-of-type(9n+9){
                width: 17%;

                .item-media{
                    .bg-img-ratio(130%);
                }

                @media screen and (max-width: @screen-md-max){
                    width: 50%;

                    .item-media{
                        .bg-img-ratio(75%);
                    }
                }
            }
        }

        #main.empty-right [data-mode-view="casual"] &,
        #main.empty-left [data-mode-view="casual"] &{
            width: 33.33%;

            .item-outer{
                .item-media{
                    background-image: none !important;
                    img{
                        max-width: 100%;
                        max-height: 100%;
                    }
                }
            }

            @media screen and (max-width: @screen-md-max){
                width: 50%;
            }
        }

        #main.empty-right.empty-left [data-mode-view="casual"] &{
            width: 33.33%;

            .item-outer{
                .item-media{
                    background-image: none !important;
                    img{
                        max-width: 100%;
                        max-height: 100%;
                    }
                }
            }

            @media screen and (max-width: @screen-md-max){
                width: 50%;
            }
        }

        #main:not(.empty-right) [data-mode-view="casual"] &,
        #main:not(.empty-left) [data-mode-view="casual"] &{
            width: 33.33%;

            .item-outer{
                .item-media{
                    background-image: none !important;
                    img{
                        max-width: 100%;
                        max-height: 100%;
                    }
                }
            }

            .casual-view{
                .item-option{
                    display: block;
                }
            }

            @media screen and (max-width: @screen-md-max){
                width: 50%;
            }
        }

        @media (max-width: @screen-xs-min){
            width: 50% !important;        }

        .item-outer{
            position: relative;

            .item-media{
                &:after{
                    content: "";
                    display: flex;
                    position: absolute;
                    top: -1px;
                    right: -1px;
                    bottom: -1px;
                    left: -1px;
                    background-image: -moz-linear-gradient( 90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.10196) 100%);
                    background-image: -webkit-linear-gradient( 90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.10196) 100%);
                    background-image: -ms-linear-gradient( 90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.10196) 100%);
                    opacity: 0;
                    transition: opacity 0.3s;

                    @media screen and (max-width: @screen-lg-xs-max){
                        opacity: 1;
                    }
                }
            }

            .item-inner{
                position: absolute;
                bottom: 0;
                width: 100%;
                .px-1;
                .pb-1;
                opacity: 0;
                transition: opacity 0.3s;

                &.has-permission{
                    .pr-5;
                }

                .item-title{
                    color: #fff;
                    display: block;
                    @media (min-width: 1200px){
                        .truncateLines(14px,18px,2,false);
                    }
                    @media (min-width: 992px) and (max-width: @screen-md-max){
                        
                        #main:not(.empty-right) &{
                            .fz-lh(14px);
                            .truncate-1();
                        }
                        #main.empty-right &{
                            .truncateLines(14px,18px,2,false);
                        }
                    }
                    @media (min-width: 768px) and (max-width: 991px){
                        .fz-lh(14px);
                        .truncate-1();
                    }
                    //Hidden title on screen max-width 767px
                    @media (max-width: @screen-xs-max){
                        display: none !important;
                    }
                }
                
                .item-stats{
                    @media (max-width: @screen-xs-max){
                        .mb-0;
                    }
                    span{
                        color: #fff;
                        .fz-lh(12px);
                        display: inline-block;
                        white-space: nowrap;
                    }
                }

                .item-author{
                    .fz-lh(12px);
                    color: @gray;
                    .text-overflow();
                    margin-top: 4px;
                    display: block;

                    .user_profile_link_span{
                        display: inline-block;
                        
                        &,a{
                            font-weight: normal !important;
                            color: @gray !important;
                        }
                    }
                }

                @media screen and (max-width: @screen-lg-xs-max){
                    opacity: 1;
                }
            }

            &:hover{
                .item-media:after,
                .item-inner{
                    opacity: 1;
                }
            }
        }

        html[dir='rtl'] &{
            float: right;

            .item-outer .item-inner{
                padding-right: 8px;
                padding-left: 40px;

                .item-stats span{
                    margin-right: 0;
                    margin-left: 16px;
                }
            }
        }
    }

    .item-media-flag{
        .r-1;
        top: 0;
        position: absolute;
        display: flex;
    }

    .photo-button-option{
        position: absolute;
        right: 4px;
        bottom: 4px;
        opacity: 0;

        .dropdown{
            .row_edit_bar_action{
                .square(32px);
                .items-center();
                border-radius: 100%;
                color: #fff;
                background-color: rgba(0,0,0,0.7);
                transition: background-color 0.3s;

                i.ico{
                    .transition(all 300ms ease);
                }

                &:hover{
                    i.ico{
                        color: #FFF;
                    }
                }
            }

            .dropdown-menu{
                margin-top: 0;
                top: auto;
                bottom: 100%;
                margin-bottom: 8px;
                transform: translate3d(0, 20px, 0);

                &:after{
                    transform: rotate(180deg);
                    top: 100%;
                    right: 12px;
                    border-width: 5px;

                    html[dir='rtl'] &{
                        left: 12px;
                        right: auto;
                    }
                }

                a .ico{
                    margin-right: @grid-point+4;

                    html[dir='rtl'] &{
                        margin-right: 0;
                        margin-left: @grid-point+4;
                    }
                }
            }

            &.open{
                .row_edit_bar_action{
                    background-color: @brand-primary;

                    .ico-gear-o{
                        color: #FFF;
                    }
                }
                .dropdown-menu{
                    transform: translate3d(0, 1px, 0);
                }
            }
        }

        html[dir='rtl'] &{
            left: 4px;
            right: auto;
        }
    }

    .moderation_row{
        position: absolute;
        left: 0;
        top: 0;
        opacity: 0;

        html[dir='rtl'] &{
            left: auto;
            right: 0;
        }
    }
}


@media (min-width:@screen-md-min){
    #main{
        &.empty-right,
        &.empty-left{
            #album-collection .photo-album-item{
                width: 25%;
            }
        }
        &.empty-right.empty-left{
            #album-collection .photo-album-item{
                width: 20%;
            }
        }
    }
}
a.photo-mature{
    &:after{
        content: "\ea05" !important;
        background: rgba(23, 23, 23, 0.9) !important;
        opacity: 1 !important;
        font-family: 'lineficon' !important;
        speak: none;
        font-style: normal;
        font-weight: normal;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        color: rgba(255,255,255,0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 40px;
        position: absolute;
        left: -1px;
        right: -1px;
        bottom: -1px;
        top: -1px;
    }
}

//----------  Albums detail  ----------
#page_photo_album{
    .item_bar_action{
        .square(32px);
        background-color: transparent;
    }

    .item_description{
        .mb-2();

        &:empty{
            display: none;
        }
    }

    .item-comment{
        .comment-mini-content-commands{
            margin-top: 0;
            border-top: 0;
        }
    }
    .photo-icon{
        position: absolute;
        right: 16px;
        top: 0;
        display: flex;
    }
    .layout-middle
    {
        position: relative;
    }
}

//set min-height when image loading
#page_photo_view{
   .photos_view{
    display: block;
    @media (max-width: @screen-xs-min){
        margin: 0 -@block-spacing;
    }
    .photos_view_loader{
        position: absolute;
    }
        .image_load_holder{
            min-height: 400px;
            @media (max-width:768px){
                min-height: 300px;
            }
        }
   }
    &.photo_is_active{
        .photos_view{
            .image_load_holder{
                min-height: auto;
            }
        }
   } 
}
//----------  Photos detail  ----------
#page_photo_view,
#page_photo_album{
    .header-page-title{
        font-size: 24px;
        font-weight: bold;
        border-bottom: none;
        margin-bottom: 0;
        a{
            font-size: 24px;
            word-break: break-word;
            word-wrap: break-word;
        }
    }

    .item_info{
        display: flex;
        align-items: center;
        height: auto;
        max-height: none;
        padding-bottom: 12px;
        margin: 0;
        .pr-3();
        line-height: unset;
        .img-wrapper,.no_image_user{
            border-radius: @radius-circle;
            overflow: hidden;
            .s-4;
            .mr-1;
            min-width: @grid-point*4;
        }
        .img-wrapper{
            img{
                .img-fullscale();
            }
        }
        .no_image_user{
            span{
                font-size: 11px;
            }
        }
        .item_info_author{
            overflow: hidden;

            div{
                .fz-lh(12px);
                color: @gray-dark;
                .text-overflow();
                max-width: 100%;
                display: block;

                &:last-of-type{
                    margin-top: @grid-point/2;

                    a{
                        text-decoration: none;
                    }
                }

                .user_profile_link_span{
                    &,a{
                        font-weight: normal !important;
                    }
                }
            }
        }
    }

    .item_bar{
        right: -10px;

        .item_bar_action{
            .square(32px);
            display: block;
            .items-center();
            color: @gray-dark;

            &:hover{
                .ico:before{
                    content: "\ea88";
                }
            }
        }

        .dropdown-menu{
            margin-top: 0;
        }

        .open{
            .item_bar_action{
                .ico:before{
                    content: "\ea88";
                }
            }
        }

        html[dir='rtl'] &{
            left: -10px;
            right: auto;
        }
    }

    .item-comment{
        position: relative;
        min-height: @grid-point*6;
        border-bottom: 1px solid @border-color-light;
        .comment_mini_content_border{
            border-radius: 0;
            margin: 0;

            .comment-mini-content-commands{
                padding-left: 0;
                padding: @grid-point 0;
                border-bottom: 0;
            }
        }
        .item-total-view{
            color: @gray-dark;
            position: absolute;
            right: 0;
            .ver-center();

            span{
                color: @text-color;
                font-weight: bold;
            }

            html[dir='rtl'] &{
                left: 0;
                right: auto;
            }
        }
    }

    .js_moderation_on{
        border-top: 1px solid @gray-lighter;
    }

    .item-category,.item-album-info{
        .fz-lh(12px);
        color: @gray-dark;
        a{
            color: @text-color;
            &:hover{
                color: @brand-primary-dark;
            }
        }
    }
    .item_tag_holder{
        .mt-1;
        padding-top: 0;
        border-top: 0;
        .fz-lh(12px);
        .item_tag{
            color: @gray-dark;
        }
        a{
            color: @gray-darker !important;
            .transition(all 300ms ease);
            &:hover{
                color: @brand-primary-dark !important;
            }
        }
    }
}

#page_photo_view{
    .item_info .item_info_author .photo-author{
        @media (max-width: @screen-xs-min){
            display: flex;
            flex-flow:wrap;
            .user_profile_link_span{
                .truncate-1();
                max-width:100px;
                html[dir='ltr'] &{
                    margin-right:4px;
                }
                html[dir='rtl'] &{
                    margin-left:4px;
                }
            }
        }
    }
    #show_photos_tab{
        a{
            display: inline-flex;
            flex-direction:column;
            align-items: center;
            .s-7;
            font-size:16px;
            font-weight:bold;
            position: fixed;
            .l-0;
            bottom: 0;
            border-radius:0;
            z-index:99;
            @media (min-width: (@screen-sm-min) ){
                height: @grid-point*11;
            }
            .ico{
                margin-bottom:4px;
            }
        }
    }
    ._block_top .header-page-title{
        display: none !important;
    }
    //hide bootstrap
    ._block_breadcrumb{
        .breadcrumbs-bottom{
            display: none !important;
        }
    }
    .item_view{
        .item_info{
            border-bottom: 0;
        }
    }
    //position icon 
    .layout-middle{
        position: relative;
    }
    .photo-icon{
        position: absolute;
        top: 0;
        .r-0;
        display: flex;
    }
    //end
    #noteform{
        width: 224px !important;
    }
    .photos_view{
        margin-bottom: 0;
        background: @gray-light;

        .image_load_holder{
            img{
                max-width: 100%;
            }
            span{
                .bg-img-ratio(56.25%);
                background-size: contain;
            }
        }
        &:hover{
            ._a_back{
                opacity: 1;
            }
        }
        ._a_back{
            display: flex;
            align-items:center;
            width: auto;
            padding: 0 (@grid-point + @grid-point/2);
            .h-4;
            color: #fff;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 4px;
            position: absolute;
            .t-2;
            .l-2;
            opacity: 0;
            .transition(all 300ms ease);
            @media (max-width:1024px){
                display: none !important;
            }
            html[dir='rtl'] &{
                left: auto;
                .ico{
                    transform: rotate(180deg);
                }
            }
            .ico{
                margin: 0;
                font-size: 14px;
                .mr-1;
            }
        }
    }

    .photo_tag_in_photo{
        margin-top: 0;
        color: @gray-dark;
        display: flex;
        .py-1;
        @media (max-width: @screen-xs-min){
            padding-top: @grid-point/2;
            padding-bottom: @grid-point/2;
        }
        p{
            margin-bottom: 0;
            white-space: nowrap;
        }

        #js_photo_in_this_photo{
            display: flex;
            flex-flow:wrap;
            .tag_sperator{
                margin-right: 4px;
                html[dir='rtl'] &{
                    margin-right: 0;
                    margin-left: 4px;
                }
            }
            span{
                color: @link-color;
                .user_link{
                    font-size: 14px;
                    .transition(all 300ms ease);
                    &:hover{
                        color: @brand-primary-dark;
                    }
                }
                a:not(.user_link){
                    display: none;
                }
            }
        }

        &.edit{
            display: flex !important;
            & + .photos-action-wrapper{
                display: none;
            }
            padding: 0;
            
            padding-bottom: 4px;
            border-bottom: 0;
            @media (max-width: @screen-xs-min){
                .pt-5;
            }
            @media (max-width: @screen-xs-min){
                padding-top: @grid-point*4 ;
            }
            @media (min-width: (@screen-xs-min + 1) ){
                html[dir='ltr'] &{
                    padding-right: 120px;
                }
                html[dir='rtl'] &{
                    padding-left: 120px;
                }
            }
            p{
                line-height: 24px;
            }
            .tag_sperator{
                display: none !important;
            }
            #js_photo_in_this_photo{
                display: flex;

                span{
                    border-radius: 3px;
                    border: 1px solid @gray;
                    height: 24px;
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    .pl-1;
                    margin-right: 4px;
                    background-color: @gray-lighter;
                    color: @gray-darker;
                    transition: all 0.3s;
                    margin-bottom: 3px;
                    .user_link{
                        color: @gray-darker;
                    }
                    a:not(.user_link){
                        display: inline-flex;
                        align-items: center;
                        font-size: 12px;
                        .square(24px);
                        justify-content: center;
                        color: @gray-darker;
                        transition: color 0.3s;

                        i.ico{
                            position: relative;
                            left: 1px;
                        }
                    }

                    &:hover{
                        border-color: @brand-primary;
                        color: #fff;
                        background-color: @brand-primary;

                        a{
                            color: #fff;
                        }
                    }

                    html[dir='rtl'] &{
                        padding-left: 0;
                        .pr-1();
                        margin-right: 0;
                        margin-left: 4px;
                    }
                }
            }
        }
    }

    .photos_actions{
        .mb-2();
        border-bottom: 1px solid @gray-lighter;
        
        & > ul{
            display: flex;
            flex-wrap: wrap;

            & > li{
                display: inline-flex;
                align-items: center;
                .mr-1;
                .mb-1();

                a{
                    display: flex;
                    align-items: center;
                    border-radius: @btn-radius-sm;
                    .transition(all 300ms ease);
                    .px-1;

                    span{
                        transition: all 0.3s;
                        .h-4;
                        .mr-1;
                        .items-center();
                        .ico{
                            color: @text-color;
                        }
                    }
                }

                b{
                    color: @text-color;
                    transition: color 0.3s;
                    white-space: nowrap;
                }


                &.rotate-left{
                    a:first-of-type{
                        .mr-1();
                    }
                }
                &.active{
                    a{
                        background: @brand-primary-dark;
                        .shadow-thick(@brand-primary-dark);
                        .ico{
                            color: #fff !important;
                        }
                        b{
                            color: #fff;
                        }
                    }
                }
                &:hover{
                    a{
                        span{                       
                            .ico{
                                color: @brand-primary-dark;
                            }
                        }
                    }
                    
                    b{
                        color: @brand-primary-dark;
                    }
                }

                &.photos_tag{
                    &.active{
                        & > b{
                            color: @link-color;
                        }
                        .js_hover_title{
                            background-image: -moz-linear-gradient( -20deg, rgb(56,188,233) 0%, rgb(47,159,223) 30%, rgb(38,129,213) 100%);
                            background-image: -webkit-linear-gradient( -20deg, rgb(56,188,233) 0%, rgb(47,159,223) 30%, rgb(38,129,213) 100%);
                            background-image: -ms-linear-gradient( -20deg, rgb(56,188,233) 0%, rgb(47,159,223) 30%, rgb(38,129,213) 100%);
                            box-shadow: 0px 4px 12px 0px rgba(38, 129, 213, 0.5);
                            border-color: transparent;

                            .ico{
                                color: #fff;
                            }
                        }
                    }
                }
            }
        }
    }
    .item-album-info,.item-category,.item_tag_holder{
        .mt-0;
        margin-bottom:@grid-point/2;
    }
    .item-size{
        display: flex;
        .item-size-stat{
            display: flex;
            .mr-2;
            .item-title{
                color: @gray-dark;
                html[dir='ltr'] &{
                    margin-right:4px;
                }
                html[dir='rtl'] &{
                    margin-left:4px;
                }
            }
        }
    }

    .item_description{
        p{
            color: @gray-dark;
        }
    }

    .photos_stream{
        padding-top: 8px;
        padding-bottom: 8px;
        height: 88px;
        background-color: rgba(255,255,255,0.9);
        box-shadow: 0px -16px 30px 0px rgba(0, 0, 0, 0.08);
        @media (max-width: @screen-xs-max){
            height: 56px;
        }
        .stream_photo{
            .size(80px,56px);
            padding: 4px;
            transition: background-color 0.3s;
            position: relative;
            @media (max-width: @screen-xs-max){
                .size(40px,32px);
                padding: 2px;
            }
            &.active{
                background-color: @brand-primary;
            }

            &:hover{
                @media (min-width: @screen-md-min){
                    background-color: @gray-light;
                }
            }

            span{
                .size(80px,56px);
                .bg-img-ratio(auto);
                @media (max-width: @screen-xs-max){
                    .size(40px,32px);
                }
            }
        }
    }

    .photos_view,
    .photos_stream{
        #prev_photos,
        #next_photos,
        #next_photo,
        #previous_photo{
            z-index: 1;
            opacity: 1;
            border-radius: 0;
            font-size: 24px;
            .items-center();
            top: 50%;
            transform: translateY(-50%);
            box-shadow: none;
            @media (min-width: @screen-md-min){
                &:hover{
                    background-color: @brand-primary !important;
                    color: #fff !important;
                    border-color:@brand-primary !important;
                }      
            }
        }

        #prev_photos,
        #previous_photo{
            left: 0;
        }

        #next_photos,
        #next_photo{
            right: 0;
        }
    }
    .photos_view{
         #prev_photos,
        #next_photos,
        #next_photo,
        #previous_photo{
            .square(56px);
            background-color: rgba(0,0,0,0.5) !important;
            border-color:transparent !important;
            @media (max-width: @screen-xs-min){
                background: transparent !important;
                .ico{
                    text-shadow: 0px -2px 0px rgba(0, 0, 0, 0.16);
                }
                box-shadow:none !important;
            }
        }
    }
    .photos_stream{
        .pl-4;
        .transition(all 300ms ease);
        width: 100%;
        &.hide{
            display: block !important;
            opacity: 0;
            pointer-events: none;
            width: 0;
        }
        #hide_photos{
            position: absolute;
            .l-0;
            top: 0;
            bottom: 0;
            .w-4;
            .items-center();
            background-color: @gray-lighter !important;
            border: none !important;
            color: @gray-dark !important;
            height: 100%;
            border-radius:0;
            box-shadow:none !important;
            &:hover{
                @media (min-width: @screen-md-min){
                    color: @gray-darker !important;
                }
            }
        }
        #prev_photos{
            border: none !important;
            border-right: 1px solid @gray-lighter !important;
            html[dir='ltr'] &{
                left: 32px;
            }
        }

        #next_photos{
            border: none !important;
            border-left: 1px solid @gray-lighter !important;
            html[dir='rtl'] &{
                right: 32px;
            }
        }
        #prev_photos,
        #next_photos{
            .w-5;
            top: 0;
            bottom: 0;
            transform:none;
            font-size: 14px;
            background-color: rgb(255, 255, 255) !important;
            box-shadow: 1px 0px 0px 0px rgba(0, 0, 0, 0.1) ;
            color: @gray-dark !important;
            &.not-active{
                display: none !important;
            }
        }
    }
    .done-tagging-btn{
        .items-center();
        .r-0;
        bottom: -@grid-point*5 - @grid-point/2;
        position: absolute;
        font-size: 12px;
        font-weight:bold;
        .h-4;
        &:before{
            .ico-content("\eb17");
            .mr-1;
        }
        @media (max-width: @screen-xs-min){
            border:0 !important;
            padding: 0 !important;
            box-shadow:none !important;
            color: @brand-primary;
            bottom: -@grid-point*5;
            html[dir='ltr'] &{  
                left: @block-spacing;
                right: auto;
            }
            html[dir='rtl'] &{  
                right: @block-spacing;
                left: auto;
            }           
        }
    }
}

//----------  edit photo  ----------
.photo_edit_wrapper{
    .photo_edit_holder{
        .form-group:empty{
            margin: 0;
        }
    }
    .item-description{
        textarea{
            min-height: 80px !important;
        }
    }
    .item-category{
        .form-control{
            @media (min-width:1025px){
                height: 120px;
            }
            max-width: none !important;
            width: 100%;

            option{
                .pl-2();
                .pr-2();
                height: 32px;
                .items-center();
                justify-content: flex-start;
                align-items: center;
            }
        }
    }
    select[multiple]:focus{
        option:checked{
            background: @brand-primary-light linear-gradient(0deg, @brand-primary-light 0%, @brand-primary-light 100%);
        }
    }
    .item-mature{
        div{
            label{
                margin-bottom: 0;
                font-weight: normal;
                display: inline-flex;
                align-items: center;

                .ico{
                    color: @gray-dark;
                    transition: color 0.3s;

                    html[dir='rtl'] &{
                        margin-right: 0;
                        .ml-1();
                    }
                }

                input{
                    display: none;

                    &:checked + .ico{
                        color: @brand-primary;

                        &:before{
                            content: "\e990";
                        }
                    }
                }
            }
        }
    }
    .photo_edit_input{
        .btn-round{
            border-radius: 2px;
            border-color: @text-color !important;
        }
        .privacy_setting_div .dropdown-menu.dropdown-menu-checkmark:after{
            left: 16px;
            right: auto;
        }
    }
}

//----------  manage photo  ----------
.item-photo-edit{
    margin: 0 -@grid-point;

    .form-group{
        margin-bottom: 0;
    }

    .photo-edit-item{
        width: 50%;
        .pl-1();
        .pr-1();
        float: left;
        margin-bottom: 32px;
        @media (max-width: 320px){
            width: 100%;
        }
        &-inner{
            position: relative;
            box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.06);
            transition: box-shadow 0.3s;

            &:hover{
                box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.1);
            }

            &.delete{
                .item-delete{
                    opacity: 0;
                }

                .item-delete-bg{
                    opacity: 1;
                    top: 0;
                    visibility: visible;
                }
            }
        }

        .item-delete-bg{
            display: block !important;
            position: absolute;
            left: 0;
            top: 10px;
            opacity: 0;
            .square(100%);
            background-color: fade(#fff,80%);
            border: 1px solid rgba(0,0,0,0.1);
            padding-top: 100px;
            transition: all 0.3s;
            visibility: hidden;

            .delete-reverse{
                .square(32px);
                border: 2px solid @text-color;
                border-radius: 100%;
                .items-center();
                margin: 0 auto 12px auto;
                cursor: pointer;
                transition: background-color 0.3s;
                font-size: 14px;

                .ico{
                    font-size: 16px;
                    color: @text-color;
                    transition: color 0.3s;
                }

                &:hover{
                    background-color: @text-color;

                    .ico{
                        color: #fff;
                    } 
                }
            }
        }

        .item-media{
            position: relative;
            display: block !important;

            .item-media-bg{
                .bg-img-ratio(94%);
            }

            .item-delete{
                display: flex !important;
                align-items: center;
                justify-content: center;
                .square(32px);
                position: absolute;
                left: 0;
                top: 0;
                cursor: pointer;

                .ico{
                    color: #fff;
                    transition: color 0.3s;
                    text-shadow: 1px 0px 0px rgba(0, 0, 0, 0.16);
                }

                input{
                    position: absolute;
                    .square(100%);
                    z-index: 1;
                    opacity: 0;
                    cursor: pointer;
                    top: 0;
                    left: 0;
                    margin-top: 0;
                }

                &:hover{
                    .ico{
                        color: @brand-danger;
                    }
                }
            }

            .item-allow-download{
                opacity: 0;
                visibility: hidden;
                border-radius: 100%;
                background-color: rgba(0,0,0,0.5);
                right: 8px;
                top: 8px;
                position: absolute;
                transition: all 0.3s;
                .items-center();
                display: flex !important;
                .square(32px);

                .ico{
                    font-size: 16px;
                    color: #fff;
                }

                &.active{
                    opacity: 1;
                    visibility: visible;
                }
            }
        }

        .photo_edit_wrapper{
            display: flex !important;
            position: relative;
            align-items: center;
            justify-content: center;

            & > div{
                height: 40px;
                flex: 1;
                display: none;
                background-color: @gray-lightest;
            }

            .dropdown{
                position: static;

                .dropdown-toggle{
                    position: relative;

                    &:before,
                    &:after{
                        content: "";
                        width: 0;
                        height: 0;
                        left: 50%;
                        transform: translateX(-50%);
                        position: absolute;
                    }

                    &:before{
                        border-left: 8px solid transparent;
                        border-right: 8px solid transparent;
                        border-bottom: 8px solid @gray-light;
                        bottom: 0;
                        opacity: 0;
                        transition: opacity 0.3s;
                    }
                    &:after{
                        border-left: 7px solid transparent;
                        border-right: 7px solid transparent;
                        border-bottom: 8px solid #fff;
                        bottom: -1px;
                        opacity: 0;
                        transition: opacity 0.3s;
                    }
                }

                &.open{
                    .dropdown-toggle{
                        z-index: 1011;

                        &:before,
                        &:after{
                            opacity: 1;
                        }
                    }
                }
            }

            .dropdown-menu{
                box-shadow: none;
                left: -1px;
                right: -1px;
                border: 1px solid @gray-light;
                border-radius: 0;
                margin-top: -1px;

                &:after{
                    display: none;
                }
            }

            & > div{
                &:first-of-type{
                    border-right: 1px solid #fff;
                }

                &:last-of-type{
                    border-left: 1px solid #fff;
                }
            }
        }

        .photo_edit_input{
            order: 1;
            display: flex !important;

            .help-block,
            label,
            div:empty{
                display: none;
            }
            .form-group{
                position: static;
                width: 100%;
            }
            .privacy_setting{
                height: 40px;
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                position: static;
            
                .privacy_setting_active{
                    border: 0 !important;
                    .items-center();
                    padding: 0 !important;
                    width: 100%;
                    height: 40px;
                    background-color: transparent;
                    position: relative;

                    .ico,
                    .fa{
                        color: @gray-dark;
                        transition: color 0.3s;
                    }

                    .fa{
                        font-size: 16px;
                        margin-right: 4px;
                        margin-left: 0;

                        html[dir='rtl'] &{
                            margin-right: 0;
                            margin-left: 4px;
                        }
                    }
                    .ico-caret-down{
                        font-size: 14px;
                    }
                    .txt-label{
                        display: none;
                    }

                    &:hover,
                    &.open{
                        box-shadow: none;

                        .ico,
                        .fa{
                            color: #000;
                        }
                    }

                    &:before,
                    &:after{
                        content: "";
                        width: 0;
                        height: 0;
                        left: 50%;
                        transform: translateX(-50%);
                        position: absolute;
                    }

                    &:before{
                        border-left: 8px solid transparent;
                        border-right: 8px solid transparent;
                        border-bottom: 8px solid @gray-light;
                        bottom: 0;
                        opacity: 0;
                        transition: opacity 0.3s;
                    }
                    &:after{
                        border-left: 7px solid transparent;
                        border-right: 7px solid transparent;
                        border-bottom: 8px solid #fff;
                        bottom: -1px;
                        opacity: 0;
                        transition: opacity 0.3s;
                    }
                }

                &.open{
                    .privacy_setting_active{
                        z-index: 1011;
                        box-shadow: none;

                        &:before,
                        &:after{
                            opacity: 1;
                        }

                        .ico,
                        .fa{
                            color: #000;
                        }
                    }
                }
            }
        }

        .photo_edit_holder{
            order: 2;
            display: flex !important;
            align-items: center;
            justify-content: center;

            .dropdown-toggle{
                display: flex !important;
                align-items: center;
                justify-content: center;
                height: 40px;
                cursor: pointer;
                width: 100%;

                .ico{
                    color: @gray-dark;
                    transition: color 0.3s;
                }

                &:hover{
                    .ico{
                        color: @text-color;
                    }
                }
            }

            &.open{
                .dropdown-toggle{
                    .ico{
                        color: @text-color;
                    }
                }
            }

            &.success{
                .dropdown-toggle{
                    .ico{
                        color: @text-color;
                        &:before{
                            content: "\ea3e";
                        }
                    }
                }
            }

            .form-group{
                padding: 16px;
            }
        }

        .item-categories{
            order: 3;
            display: flex !important;
            align-items: center;
            justify-content: center;

            .dropdown-toggle{
                display: flex;
                align-items: center;
                justify-content: center;
                height: 40px;
                cursor: pointer;
                width: 100%;

                .ico{
                    color: @gray-dark;
                    transition: color 0.3s;
                }

                &:hover{
                    .ico{
                        color: @text-color;
                    }
                }
            }

            .dropdown-menu{
                padding-bottom: 0;

                .item-categories-title{
                    height: 40px;
                    display: flex;
                    align-items: center;
                    padding: 0 16px;

                    span{
                        position: absolute;
                        font-size: 12px;
                        color: @gray-dark;
                        .square(28px);
                        cursor: pointer;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        top: 0;
                        right: 0;
                    }
                }
                .item-category{
                    .form-control{
                        border-left: 0;
                        border-right: 0;
                        border-radius: 0;
                        border-bottom: 0;
                    }
                }
            }

            &.success{
                .dropdown-toggle{
                    .ico{
                        color: @text-color;
                        &:before{
                            content: "\e99d";
                        }
                    }
                }
            }

            &.open{
                .dropdown-toggle{
                    .ico{
                        color: @text-color;
                    }
                }
            }
        }

        .item-mature.hide{
            order: 4;
            display: flex !important;

            .dropdown-toggle{
                display: flex;
                align-items: center;
                justify-content: center;
                height: 40px;
                cursor: pointer;
                width: 100%;

                .ico{
                    color: @gray-dark;
                    transition: color 0.3s;
                }

                &:hover{
                    .ico{
                        color: @text-color;
                    }
                }
            }

            .dropdown-menu{
                .p-2;

                label{
                    display: flex;
                    cursor: pointer;
                }

                div{
                    .pl-2;

                    label{
                        &:first-of-type{
                           margin-top: 14px;
                        }

                        & + label{
                            margin-top: 12px;
                        }
                    }

                    &.album-set-as-cover-action{
                       .pl-0;

                        label{
                            .mt-0;
                        }
                    }

                    &.disable-download{
                        .pl-0;
                        padding-top: 12px;

                        label{
                            .mt-0;

                            input:checked + .ico{
                                color: @text-color;
                                &:before{
                                    content: "\eb28";
                                }
                            }
                        }
                    }
                }
            }

            &.open{
                .dropdown-toggle{
                    .ico{
                        color: @text-color;
                    }
                }
            }
        }

        .item-inner{
            border: 1px solid rgba(0,0,0,0.1);
            border-top: 0;
        }

        .item-title.page,
        .item-topic.page,
        .item-description.page{
            display: block !important;

            input,textarea{
                border: 0;
                box-shadow: none;
                border-radius: 0;
            }

            textarea{
                height: 62px;
                min-height: 62px;
                min-width: 100%;
                max-width: 100%;
            }

            input{
                border-bottom: 1px solid rgba(0,0,0,0.1);
                &.topic{
                    border-top: 1px solid rgba(0,0,0,0.1);
                    border-bottom: none;
                }
            }
        }

        html[dir='rtl'] &{
            float: right;

            .item-media{
                .item-delete{
                    right: 0;
                    left: auto;
                }
                .item-allow-download{
                    left: 8px;
                    right: auto;
                }
            }

            .item-categories .dropdown-menu .item-categories-title span{
                left: 0;
                right: auto;
            }
        
            .item-mature.hide{
                border-left: 0;

                .dropdown-menu div{
                    padding-left: 0;
                    padding-right: 16px;
                }
            }
            .photo_edit_input{
                border-right: 0;
            }
            .photo_edit_wrapper{
                & > div{
                    &:last-of-type{
                        border-left: 0;
                        border-right: 1px solid #fff;
                    }
                    &:first-of-type{
                        border-right: 0;
                        border-left: 1px solid #fff;
                    }
                }
            }
        }
    }
}

#main{
    @media (min-width:@screen-md-min){
        &.empty-right,
        &.empty-left{
            .item-photo-edit{
                .photo-edit-item{
                    width: 33.33%;
                }
            }
        }

        &.empty-right.empty-left{
            .item-photo-edit{
                .photo-edit-item{
                    width: 25%;
                }
            }
        }
    }
}

.photo-app-manage{
    .photo_table_clear{
        #js_photo_multi_edit_submit{
            float: none !important;
            text-align: center;
            position: relative;

            button{
                font-size: 18px;
                font-weight: bold;
                border-radius: 24px;
                height: 48px;
                position: relative;
                z-index: 1;

                .ico{
                    display: inline-block !important;

                    html[dir='rtl'] &{
                        margin-right: 0;
                        margin-left: 8px;
                    }
                }
            }

            &:before{
                left: 0;
                content: "";
                width: 100%;
                height: 1px;
                background-color: @gray-lighter;
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
            }
        }
    }
}

//----------  feed  ----------
//remove overflow fix case status have drop-down friend
._app_photo.js_parent_feed_entry{
    .feed_info{
        overflow: visible;
        white-space: unset;
        display: inline;
    }
}
//end
._app_photo,
.feed_share_photo,
._app_photo_album{
    .photo_holder_image{
        padding-bottom: 0;
    }
    .activity_feed_content_text{
        margin-bottom: 0;
    }
    .js_feed_comment_border{
        .mt-1();
    }
    .photo-single-image.photo-mature{
        display: inline-block !important;
        width:auto !important;
        max-width: 100%;
    }
    .activity_feed_multiple_image{
        .clearfix();
        margin: 0 -2px;
        & > div{
            width: 50%;
            padding: 0 2px;
            margin-bottom: 4px;

            .photo_holder_image:not(.photo-single-image){
                .bg-img-ratio(56%);
            }

            .photo_holder_image.photo-single-image img {
                width: auto;
                max-width: 100%;
                max-height: 100vh;
            }

            html[dir='rtl'] &{
                float: right;
            }
        }

        &.feed-img-stage-1{
            & > div{
                float: none !important;
                clear: both !important;
                width: 100%;
            }
        }

        &.feed-img-stage-3{
            & > div{
                &:first-of-type{
                    float: none !important;
                    clear: both !important;
                    width: 100%;
                }
            }
        }
    }
}

div.activity_feed_multiple_image > div > a.photo-single-image {
    padding-bottom: 0;
}

//----------  tag  ----------
#noteform{
    padding: 0;
    border: 0;

    &:before{
        content: "";
        display: block;
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 6px solid #fff;
        position: absolute;
        bottom: 100%;
        left: 28px;
    }

    #NoteAddForm{
        position: relative;

        .cancel_tagging{
            position: absolute;
            top: 16px;
            right: 10px;
            bottom: auto;
            z-index: 9;
            
            .fa:before{
                content: "\eab2";
                color: @gray-light;
                font-family: 'lineficon' !important;
            }

            &.focus{
                display: block;
            }
        }
    }

    .table_right{
        position: relative;
        padding-bottom: 0;

        &:after{
            content: "\ea8b";
            position: absolute;
            display: block;
            font-family: 'lineficon' !important;
            color: @gray;
            left: @grid-point+4;
            .ver-center();

            html[dir='rtl'] &{
                right: @grid-point+4;
                left: auto;
            }
        }

        .v_middle{
            border: 0;
            box-shadow: none;
            border-radius: 0;
            height: 46px;
            padding-left: 34px;
            font-weight: normal;
            padding-right: 34px;
            background-color: @gray-lightest;

            &::placeholder{
                color: @gray;
            }
        }

        &.focus{
            &:after{
                color: @text-color;
            }
            .v_middle{
                background-color: #fff;
                font-weight: bold;
                color: @text-color;
            }
        }
    }

    .table{
        margin-bottom: 0;
    }

    .extra_info{
        a{
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            border-top: 1px solid @gray-lighter;
            color: @link-color !important;
            text-decoration: none !important;
        }
    }

    .input_drop_layer{
        box-shadow: none;
        border-top: 1px solid @gray;

        a{
            height: 48px;
            display: flex;
            align-items: center;
            padding: 0 16px;
            transition: all 0.3s;

            .img-wrapper{
                .square(32px);
                .mr-1();

                img{
                    max-width: 100%;
                    max-height: 100%;
                }
            }

            .no_image_user{
                border: 1px solid rgba(0,0,0,0.1);
                transition: border 0.3s;
                .square(32px);
                .mr-1();

                span{
                    font-size: 12px;
                }

                .js_hover_info{

                    &:before{
                        display: none;
                    }
                }
            }

            &:hover{
                background-color: #ddecf9;
                color: @link-hover-color;

                .no_image_user{
                    border-color: @link-hover-color;
                }

                .img-wrapper{
                    &:before{
                        border-color: @link-hover-color;
                    }
                }
            }
        }
    }
}
#noteform.is_right:before{
    left: auto;
    right: 28px;
}
//----------  tag albums  ----------
.album_tag{
    ul{
        margin: 0 -7px;

        li{
            padding: 0 7px;
            width: 25%;
            .mb-1();

            a{
                display: block;
                border-radius: 100%;
                transition: all 0.3s;

                .img-wrapper{
                    .square(40px);

                    img{
                        max-width: 100%;
                        max-height: 100%;
                    }
                }

                &.no_image_user{
                    width: 40px !important;
                    height: 40px !important;
                    margin: 0 !important;
                }

                &:hover{
                    box-shadow: 0px 6px 12px 0px rgba(38, 129, 213, 0.4);

                    .img-wrapper:before,
                    .js_hover_info:before{
                        border-color: @link-hover-color;
                    }
                }
            }
        }
    }
}

//----------  create photo  ----------
@media screen and (min-width: @screen-lg-xs-min){
    select[multiple]:focus{
        option:checked{
            background: @brand-primary-light linear-gradient(0deg, @brand-primary-light 0%, @brand-primary-light 100%);
        }
    }
    .form-control.category{
        height: 120px;
        padding: 0;
        max-width: none !important;
        width: 100%;

        option{
            .px-2;
            height: 32px;
            display: flex;
            justify-content: flex-start;
            align-items: center;
        }
    }
}

.privacy_setting_div{
    .btn-round{
        border-radius: 2px;
    }
}

.dropdown-menu-checkmark{
    &:after{
        left: @grid-point*2;
        right: auto;

        html[dir='rtl'] &{
            right: @grid-point*2;
            left: auto;
        }
    }
}

#album_table{
    display: flex;
    align-items: flex-end;

    #js_photo_albums{
        display: block;
    }

    .item-album{
        width: 100%;
        flex:1;
    }

    @media screen and (max-width: @screen-xs-min){
        flex-direction: column;
        align-items: baseline;

        button{
            margin-left: 0;
            .mt-1;

            html[dir='rtl'] &{
                margin-right: 0;
            }
        }
    }
}

//----------  recent photo  ----------
.photo-widget-block.recent-photo{
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1px;

    article{
        padding: 0 1px;
        width: 50%;
        margin-bottom: 2px;

        .item-outer{
            position: relative;

            .item-media{
                .bg-img-ratio(80%);
            }
        }
        &:hover{
            .item-statistic{
                opacity: 1;
            }
        }
        .item-statistic{
            position: absolute;
            bottom: 4px;
            left: 4px;
            .transition(all 300ms ease);
            opacity: 0;
            display: flex;
            flex-direction:column;
            @media (max-width:991px){
                opacity: 1;
            }
            @media (max-width:480px){
                display: none;
            }
            .like-count,.comment-count{
                font-size: 12px;
                color: #fff;
                height: 24px;
                .items-center();
                background-color: rgba(0,0,0,0.5);
                border-radius: 12px;
                .px-1;
                html[dir='rtl'] &{
                    right: 4px;
                    left: auto;
                }
            }
            .comment-count{
                //none follow design
                display: none;
            }
        }

        &.photos-1{
            width: 100%;
        }

        &.photos-2{
            width: 50%;
        }

        &.photos-3{
            width: 50%;

            &:first-of-type{
                width: 100%;
                .item-media{
                    .bg-img-ratio(68%);
                }
            }
        }
        @media (max-width:767px) and (min-width:641px){
            width: 25% !important;
            .item-media{
                .bg-img-ratio(80%) !important;
            }
        }
        @media (max-width:640px) and (min-width:481px){
            width: 33.33% !important;
            .item-media{
                .bg-img-ratio(80%) !important;
            }
        }
    }
}


//----------  rtl  ----------
html[dir='rtl']{
    #page_photo_view{
        .item_bar{
            right: auto;
            left: -10px;
        }
        .item_info{
            .item-media{
                margin-right: 0;
                margin-left: @grid-point;
            }
        }
        
        .photos_actions{
            ul li{
                &.rotate-left a:first-of-type{
                    margin-right: 0;
                    margin-left: @grid-point;
                }
            }
        }
        .photo_tag_in_photo.edit #js_photo_in_this_photo span{
            margin-left: 4px;
            margin-right: 0;
            
            a:not(.user_link) i.ico{
                left: auto;
                right: 1px;
            }
        }
    }
}
#page_photo_albums{
    section.photo-albums{
        margin: 0;
    }
}


//-------------block featured-----------------------
.block[id*="_featured"] > .content
{
    position: static;
}
.block[id*="_featured"] > .content > .featured-photo-list > .sticky-featured-icon
{
    position: absolute;
    top: 0;
    right: 16px;
}
//-----------------block sponsored----------------
.block[id*="_sponsored"] > .content > .sponsored-photo-list > .sticky-sponsored-icon
{
    position: absolute;
    top: 0;
    right: 16px;
}

[id^=page_photo_]{
    .photo-mode-view-container{
        display: inline-flex;
        position: absolute;
        top: -42px;
        .r-0();

        @media (max-width: @screen-sm-min){
            position: static;
            margin-bottom: @grid-point;

            html[dir='ltr'] &{
                margin-left: -@grid-point;
            }

            html[dir='rtl'] &{
                margin-right: -@grid-point;
            }
        }
        .photo-mode-view-btn{
            .s-4();
            .items-center();
            font-size: 14px;
            color: @gray-dark;
            .transition(all 300ms ease);
            cursor: pointer;
            .ico{
                .square(14px);
            }
            &.casual{
                .ico{
                    &:before{
                        display: block;
                    }
                }
            }
            
            &:hover,
            &.active{
                color: #555;
            }
        }
    }
    div#content ._block_content .photo-mode-view-content {
        margin-top: 0;
    }
}

[id^=page_photo_album]
{
    .detail-photos
    {
        position: relative;
    }
}

//custom place button when has photo list
body.has-photo-tab{
    .btn-scrolltop{
        bottom: 104px;
    }
    #content{
        z-index:auto;
    }
}

.featured-album-block
{
    .item-outer .item-media a:before
    {
        content: "";
        display: block;
        padding-bottom: 100%;
    }
    .item-outer .item-media a
    {
        display: block;
        position: relative;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-origin: border-box;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .flag_style_parent
    {
        position: absolute;
        display: flex;
        right: 8px;
        top: 0;
    }
    .item-outer .item-media .item-total-photo
    {
        height: 40px;
        border-radius: 6px;
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        font-size: 20px;
        line-height: 26px;
        position: absolute;
        bottom: 8px;
        right: 8px;
        padding: 0 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


.sponsored-album-block
{
    .item-outer .item-media a:before
    {
        content: "";
        display: block;
        padding-bottom: 100%;
    }
    .item-outer .item-media a
    {
        display: block;
        position: relative;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-origin: border-box;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .flag_style_parent
    {
        position: absolute;
        display: flex;
        right: 8px;
        top: 0;
    }
    .item-outer .item-media .item-total-photo
    {
        height: 40px;
        border-radius: 6px;
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        font-size: 20px;
        line-height: 26px;
        position: absolute;
        bottom: 8px;
        right: 8px;
        padding: 0 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.core-photos-view-action-container{
    display: flex;
    justify-content: space-between;
    padding-top: @grid-point + @grid-point/2;
    padding-bottom: @grid-point + @grid-point/2;
    border-bottom:1px solid @gray-lighter;
    @media (max-width: @screen-xs-min){
        .py-1;
    }
    .photos-action-wrapper{
        display: flex;
        align-items: center;
        position: relative;
        html[dir='ltr'] &{
            margin-left:auto;
        }
        html[dir='rtl'] &{
            margin-right:auto;
        }
        .photos-action-more{
            .ml-1;
            z-index:99;
            html[dir='ltr'] &{
                margin-right:-@grid-point;
            }
            html[dir='rtl'] &{
                margin-left:-@grid-point;
            }
            .item_bar_action{
                .s-4;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                color: @gray-dark;
                .transition(all 300ms ease);
                
                &:hover{
                    color: @gray-darker;
                    .ico{
                        &:before{
                            content: "\ea97";
                        }
                    }
                }
            }
            &.open{
                .item_bar_action{
                    color: @gray-darker;
                    .ico{
                        &:before{
                            content: "\ea97";
                        }
                    }
                }
            }
        }
    }
    @media (max-width: @screen-xs-min){
        flex-direction:column;
        .photo_tag_in_photo{
            order: 2;
        }
        .photos-action-wrapper{
            margin:0;
            width: 100%;
            justify-content: space-between;
            .photos_tag{
                a.btn{
                    border: none !important;
                    color: @brand-primary;
                    padding: 0 !important;
                    box-shadow:none !important;
                    background-color:transparent !important; 
                }
            }
            .photos-action-more{
                position: static;
                .dropdown-menu{
                    left: -@grid-point*2 !important;
                    right: -@grid-point*2 !important;
                    margin-top:4px;
                    &:after{
                        html[dir='ltr'] &{
                            right: 20px;
                        }
                        html[dir='rtl'] &{
                            left: 20px;
                        }
                    }
                }
                
            }
        }
    }
}

.core-photos-view-title{
    font-size: 24px;
    font-weight: bold;
    word-break: break-word ;
    word-wrap: break-word ;
    .pt-2;
    padding-bottom:@grid-point + @grid-point/2;
    position: relative;
    margin-left: 0;
    margin-right: 0;
    padding-right: 0;
    padding-left: 0;
    a{
        color: @gray-darker !important;
    }
    @media (max-width: @screen-sm-max){
        font-size: 22px;
    }
    @media (max-width: @screen-xs-min){
        font-size: 20px;
    }
}

#page_photo_view {
    .core-photos-view-content-collapse-container{
        .mb-3;
        .core-photos-view-content-collapse{
            .mb-2;
            
            &.collapsed{
                & > div{
                    display: none ;
                    &:nth-child(1),&:nth-child(2){
                        display: block;
                        &.item-size{
                            display: flex;
                        }
                    }
                }
                .item_description.truncate-text{
                    .truncateLines(14px,18px,2,false);
                    & + div{
                        display: none;
                    }
                }
                .item-category.truncate-text{
                    .truncateLines(12px,16px,2,false);
                }
            }
            .item_description{
                font-size:14px;
                line-height: 18px;
            }
            .item-size{
                margin-top: @grid-point + @grid-point/2;
                font-size: 12px;
                line-height: 16px;
                flex-direction: column;
                .item-size-stat{
                    margin-bottom: 4px;
                }
                
            }
        }
        .core-photos-view-action-collapse{
            .js-item-btn-toggle-collapse{
                cursor: pointer;
            }
            .item-viewmore-btn,.item-viewless-btn{
                display: none;
                align-items: center;
                .ico{
                    html[dir='ltr'] &{  
                        margin-left:4px;
                    }
                    html[dir='rtl'] &{  
                        margin-right: 4px;
                    }                      
                }
            }
            &.has-viewmore{
                .item-viewmore-btn{
                    display: inline-flex;
                }
            }
            &.has-viewless{
                .item-viewless-btn{
                    display: inline-flex;
                }
            }
        }
    }
}