$V_FEED_PROFILE_IMAGE_WIDTH: 60px;
$V_FEED_PROFILE_IMAGE_MARGIN_RIGHT: 20px;
$V_FEED_PROFILE_WIDTH: $V_FEED_PROFILE_IMAGE_WIDTH + $V_FEED_PROFILE_IMAGE_MARGIN_RIGHT;
$V_FEED_BORDER_RADIUS: 10px;

// ********************* Activity Feed *********************
.v-feed {
    @include column(8, last);
    @include box-sizing(border-box);

    > .no-items-found-message {
      @include no-items;
    }

    > h2 {
        margin: 0px;
        padding: 10px;
        border: 1px solid $PRIMARY_BORDER_COLOR;
        background-color: $SECONDARY_BACKGROUND_COLOR;
    }

    > ul {
        margin: 0px;
        padding: 0px;

        > li {
            padding: 7px;
            margin-top: 7px;
            border: 1px solid $PRIMARY_BORDER_COLOR;
            list-style: none;
        }
    }

    .load-more {
        padding-top: 10px;
        text-align: center;

        .spinner-icon {
          color: $LINK_HOVER_COLOR;
        }

        .loading-action {
            width: 100%;
        }
    }
}

.v-feed-item {
    display: block;
    border: none !important;
    margin-bottom: 20px;
    padding: 0 !important;
    font-size: $MEDIUM_FONT_SIZE;

    @include pie-clearfix;

    * {
        box-sizing: border-box;
    }

    &.v-feed-item-condensed {

        .v-feed-item-container {
            width: 100%;
            &:after,
            &:before {
                display: none;
            }
        }
        .v-feed-item-profile {
            display: none;
        }
    }

    .v-feed-item-profile {
        float: left;
        width: $V_FEED_PROFILE_IMAGE_WIDTH;
        margin-right: $V_FEED_PROFILE_IMAGE_MARGIN_RIGHT;
        text-align: center;

        .source-icon {
            position: relative;
            top: -20px;
            right: 5px;
            float: right;
        }
        img {
            width: 50px;
            border-radius: 50%;
            font-size: 50px;
            color: #fd7500;
            line-height: 1;
        }
    }

    .v-feed-item-container {
        width: calc(100% - #{$V_FEED_PROFILE_WIDTH});
        min-height: 50px;
        float: right;
        position: relative;
        background-color: $WHITE_BACKGROUND_COLOR;
        border: 1px solid $PRIMARY_BORDER_COLOR;
        border-radius: $V_FEED_BORDER_RADIUS;
    }

    .v-feed-item-header {
        position: relative;
        padding: 10px 10px 0 10px;
        color: $SECONDARY_FONT_COLOR;

        a {
            text-decoration: none;
            font-weight: bold;
            color: $BLUE;
        }
        .v-feed-item-title {
            font-size: $LARGE_FONT_SIZE;
            font-weight: bold;
            color: $BLUE;
        }
    }

    .v-feed-item-footer {
        padding: 10px;
        font-size: $DEFAULT_FONT_SIZE;
        color: $TERTIARY_FONT_COLOR;

        a {
            color: $BLUE;
            text-decoration: none;
            margin-left: 10px;
        }
    }

    .v-feed-item-actions {
        @include pie-clearfix;
        width: 100%;
        padding: 8px 10px 8px 10px;
        background-color: #d7f6ff;
        border-radius: 0 0 $V_FEED_BORDER_RADIUS $V_FEED_BORDER_RADIUS;
        border-top: 1px solid $PRIMARY_BORDER_COLOR;

        .v-feed-item-primary-action {
            float: right;
            padding: 6px 0;
            font-weight: bold;
        }
        .v-feed-item-action {
            width: 30px;
            min-width: 0;
            padding: 2px 0 0 0;
            margin-right: 8px;
            text-align: center;
            color: $LINK_COLOR;
            background: transparent;
            border: none;
            outline: none;
            font-size: $MEDIUM_ICON_SIZE;

            &:before {
                -webkit-transition: transform 0.2s ease-out;
                transition: transform 0.2s ease-out;
            }
            &:hover:before,
            &:active:before {
                -webkit-transform: scale(1.3);
                -ms-transform: scale(1.3);
                transform: scale(1.3);
            }
        }
    }

    .v-feed-item-secondary-actions {
        float: left;
        position:relative;

        a {
            margin-right: 15px;
            font-weight: normal;
        }

        .floating-dropdown {
            top: 30px;
            left: -40px;
            width: 200px;
            font-size: 12px;

            .section-title {
                font-weight:bold;
                margin-top: 7px;
                height: 21px;
                color: $PRIMARY_FONT_COLOR;

                &:first-child {
                    margin-top: 0;
                }

                .spinner-icon {
                    float:right;
                    color: $LINK_COLOR;
                }
            }

            label {
                width: 100%;
                display: block;
                height: 20px;
            }
            ul {
                margin: 0 -10px;
                padding: 0;

                li {
                    color: $SECONDARY_FONT_COLOR;
                    cursor: pointer;
                    padding: 2px 10px;
                    list-style: none;

                    &:hover {
                        background-color: $LIGHT_GREY;
                    }
                }
            }
        }
    }

    .v-feed-item-excerpt {
        padding: 0 10px;
        margin-top: 8px;
        margin-bottom: 8px;
        overflow: hidden;

        p {
            margin: 0;
        }
        img {
            display: block;
            margin: 0 auto;
            max-width: 100%;
        }
    }

    /* CSS arrow */
    .v-feed-item-container:after, .v-feed-item-container:before {
        right: 100%;
        top: 25px;
        border: solid transparent;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
    }

    .v-feed-item-container:after {
        border-color: rgba(136, 183, 213, 0);
        border-right-color: $WHITE_BACKGROUND_COLOR;
        border-width: 14px;
        margin-top: -14px;
    }

    .v-feed-item-container:before {
        border-color: rgba(218, 218, 218, 0);
        border-right-color: $PRIMARY_BORDER_COLOR;
        border-width: 15px;
        margin-top: -15px;
    }

    /* Comments */
    .v-feed-item-comments {
        background-color: $PRIMARY_BACKGROUND_COLOR;
    }

    .v-feed-item-comments-header {
        padding: 10px;
        border-top: 1px solid $PRIMARY_BORDER_COLOR;

        a {
            text-decoration: none;
            color: $BLUE;
            font-size: $DEFAULT_FONT_SIZE;
            font-weight: bold;
        }
    }

    .v-feed-item-comments-count {
        float: right;
        font-size: $DEFAULT_FONT_SIZE;
        color: $TERTIARY_FONT_COLOR;
        line-height: 1.5;
    }

    .v-feed-item-comments-list {
        padding: 0;
        margin: 0;
        list-style: none;

        li {
            display: block;
            padding-top: 8px;
            padding-bottom: 8px;
            margin: 0 10px;
            overflow: hidden;
            border-top: 1px solid $PRIMARY_BORDER_COLOR;
        }
    }

    .v-feed-item-comment-image img {
        width: 32px;
    }

    .v-feed-item-comment-image,
    .v-feed-item-comment-text,
    .v-feed-item-comment-actions {
        display: table-cell;
        vertical-align: top;
        line-height: 1;
    }

    .v-feed-item-comment-image {
        width: 42px;
    }

    .v-feed-item-comment-text {
        line-height: 1.2em;

        a {
            text-decoration: none;
            color: $BLUE;
            font-weight: bold;
        }
    }

    .v-feed-item-comment-meta {
        margin-top: 5px;
        color: $SECONDARY_FONT_COLOR;
        font-size: $DEFAULT_FONT_SIZE;

        a {
            font-weight: normal;
            padding-left: 10px;
        }
    }

    .v-feed-item-dropdown-toggle {
        width: 24px;
        min-width: 24px;
        height: 24px;
        line-height: 24px;
        padding: 0;

        &:focus {
            outline: 0;
        }

        .icon {
            color: white;
        }

    }
}
