@import 'includes/vars';
@import 'includes/mixins';

.badges {
    li {
        border-radius: 8px;
        border: 1px solid #ddd;
        padding: 0;
        display: inline-block;
        position: relative;

        .badge_title, .relation, .user {
            display: block;
            padding: 2px;
        }

        .image {
            display: block;
        }

        .label {
            background: #222;
            border-radius: 0 0 8px 8px;
            bottom: 0;
            color: #fff;
            display: block;
            opacity: 0.85;
            padding: 4px 0;
            position: absolute;
            text-align: center;
            white-space: normal;
            text-decoration: none;
            width: 128px;
            set-smaller-font-size();

            &:before {
                content: '✸ ';
            }

            .title {
                display: inline;
                color: #fff;
                font-weight: normal;
            }
        }

        img {
            border-radius: 8px;
            display: block;
        }
    }
}


.awards {
    li {
        border-radius: 8px;
        border: 1px solid #ddd;
        height: 128px;
        position: relative;
        width: 256px;
        display: inline-block;

        img {
            border-radius: 8px;
        }

        .avatar_image {
            position: absolute;
            right: 0;
        }

        .award_image {
            position: absolute;
            left: 0;
        }

        .badge_title, .relation, .user {
            background: #000;
            border-radius: 8px;
            color: #fff;
            display: block;
            opacity: 0.75;
            padding: 4px;
            position: absolute;
            text-align: center;
            text-decoration: none;
            z-index: 10;
        }

        .badge_title {
            border-radius: 0 0 8px 8px;
            bottom: 0;
            left: 0;
            width: 128px;
            white-space: normal;

            &:before {
                content: '✸ ';
            }
        }

        .relation {
            border-radius: 8px;
            left: 80px;
            opacity: 0.75;
            width: 96px;

            &:after {
                content: ' ⇨';
            }
        }

        .user {
            border-radius: 0 0 8px 8px;
            bottom: 0;
            right: 0;
            width: 128px;
            white-space: normal;

            &:before {
                content: '☺ ';
            }
        }
    }
}

.awardees {
    margin: 0;
    padding: 0;

    .awardee {
        display: inline-block;
        height: 128px;
        list-style: none outside none;
        position: relative;
        width: 128px;
        border: 1px solid #ddd;
        border-radius: 8px;

        .avatar_image img {
            border-radius: 8px;
        }

        .user {
            white-space: normal;
        }

        .label {
            background: none repeat scroll 0 0 #000000;
            border-radius: 0 0 8px 8px;
            bottom: 0;
            color: #FFFFFF;
            left: 0;
            opacity: 0.8;
            position: absolute;
            text-align: center;
            text-decoration: none;
            width: 128px;
            z-index: 10;

            &:before {
                content: '☺ ';
            }
        }
    }
}

dl.badge a.image img, dl.profile img.avatar {
    border-radius: 8px;
}

dl.badge img.avatar, dl.award img.avatar, dl.nomination img.avatar {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    padding: 0;
    vertical-align: text-top;
    display: block;
}

dl.award dd.awarded_to img.avatar {
    width: 160px;
    height: 160px;
}

#recent_badge_awards {
    display: none;
}

input[type='submit'].delete-badge {
    margin: 0 auto;
    display: inherit;
}


/* notifications display */
#badges-tray {
    vendorize(transition-property, opacity);
    vendorize(transition-duration, 1s);
    width: 300px;
    position: fixed;
    top: ($grid-spacing / 2);
    right: ($grid-spacing / 2);
    z-index: 9999;
    opacity: 0;

    &.show {
        opacity: 1;
    }

    li {
        margin-bottom: ($grid-spacing / 2);
        width: 100%;
    }

    .badge-notify {
        color: $text-color;
        text-transform: uppercase;
    }

    .badge-text {
        font-weight: bold;
        set-font-size(18px);
        line-height: 20px;
    }
}

/* general badge list display */
.badge-list {

    li {
        margin: 0 ($grid-spacing / 2) ($grid-spacing / 2) 0;
        width: 300px;
        display: inline-block;
        vertical-align: text-top;
    }

    img {
        width: 60px;
        float: left;
        margin: 0 ($grid-spacing / 2) 0 0;
    }

    a {
        overflow: auto;
        display: block;
        padding: ($grid-spacing / 2);
        background: #f4f7f8;
        border: 1px solid #ddd;
        border-radius: 4px;

        &:hover {
            border: 1px solid #ccc;
            text-decoration: none;
        }
    }

    span {
        display: block;
    }

    .badge-notify {
        font-weight: bold;
        set-smaller-font-size();
        text-transform: uppercase;
    }

    .badge-text {
        line-height: 18px;
    }

    .badge-headline {
        font-weight: bold;
        color: $text-color;
        set-font-size(18px);
        font-weight: bold;
        line-height: 22px;
    }
}
