$global-font-secondary-color: #4d4d4d !default;
$global-font-secondary-color-dark: #b5b5b5 !default;

$friend-link-background-color: #f8f8f8 !default;
$friend-link-background-color-dark: #252627 !default;

// Color of friend link text
$friend-link-color: #2D809A !default;
$friend-link-color-dark: #a9a9b3 !default;

// Color of hover friend link text
$friend-link-hover-color: #ef3982 !default;
$friend-link-hover-color-dark: #ffffff !default;

@mixin transform($value) {
    -webkit-transform: $value;
    -moz-transform: $value;
    -ms-transform: $value;
    -o-transform: $value;
    transform: $value;
}

.friends.links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.friend-link {
    width: 33%;
    margin-bottom: 10px;
}

.friend-link-div {
    height: 92px;
    margin-top: 5px;
    width: 100%;
    display: inline-block;
    background: $friend-link-background-color;
    vertical-align: top;
    [theme="dark"] & {
        background: $friend-link-background-color-dark;
    }
    -webkit-transition: transform 0.4s ease;
    -moz-transition: transform 0.4s ease;
    -o-transition: transform 0.4s ease;
    transition: transform 0.4s ease;
    &:hover {
        @include transform(scale(1.01));
    }
    .friend-link-avatar {
        width: 92px;
        float: left;
        height: 100%;
        img {
            width: 56px;
            height: 56px;
            margin: 18px;
            border-radius: 50%;
        }
    }
    .friend-link-info {
        margin: 18px 18px 18px 92px;
        .friend-name-div {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
            .friend-name {
                font-style: normal;
            }
        }
        .friend-bio {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
            color: $global-font-secondary-color;
            margin-top: 0;
            margin-bottom: 0;
            [theme="dark"] & {
                color: $global-font-secondary-color-dark;
            }
        }
    }
}

.friend-name-div {
    display: flex;
    align-items: center;
}

.friend-favicon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

.friend-favicon img {
    border-radius: 50%;
    margin-top: 0;
    margin-bottom: 0;
}

.friend-screens img {
    display: none;
    height: 0;
    transition: all 0.3s;
    /* 加入过渡效果 */
    border: 1px solid #dddddd00;
    /* 加边框 */
    border-radius: 4px;
    /* 圆角 */
    margin-top: 0;
    margin-bottom: 0;
}

.friend-link-div:hover .friend-screens img {
    display: block;
    height: auto;
    max-height: calc(100% * 4 / 3);
    opacity: 1;
    /* 从透明到不透明 */
    transform: translateY(0.25rem);
    /* 向上移动10px */
    //   box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    border-color: #bbb;
}

@media (max-width: 480px) {
    .friend-link {
        width: 98%;
    }
}

@media screen and (max-width: 680px) {
    .friend-link-div {
        width: 100%;
    }
}
