@import "/UI/Core/Styles/Theme.scss";

$scoreboard-row-height: 36px;

ScoreboardRow {
    width: 100%;
    height: $scoreboard-row-height;
    //align-items: center;
    border: 1px solid transparent;

    &.with-py {
        padding-top: 0;
        padding-bottom: 0;
    }

    &:nth-child(even) {
        background-color: $scoreboard-row-stripe;
        border: 1px solid $scoreboard-row-stripe;
    }

    &.team-row-traitor {
        background-color: $team-ui-row-traitor;
        border: 1px solid $team-ui-row-traitor;
    }

    &.team-row-detective {
        background-color: $team-ui-row-detective;
        border: 1px solid $team-ui-row-detective;
    }

    &.local {
        //background-color: rgba( white, 0.12 );
        //border: 1px solid white;
    }

    &.dead {
        opacity: 0.5;
        filter: saturate( 0.2 );
    }

    &.dead.team-row-traitor,
    &.dead.team-row-detective {
        opacity: 0.65;
        filter: saturate( 1 );
    }

    .avatar {
        width: $scoreboard-row-height;
        height: $scoreboard-row-height;
        //box-sizing: border-box;
        object-fit: cover;
        flex-shrink: 0;
        border: 1px solid rgba( white, 0.24 );
        border-radius: 2px;
    }

    .col {
        align-items: center;
    }

    .playername {
        flex-basis: 500px;
        height: 100%;
        align-items: center;

        > * {
            margin-right: 20px;
            margin-top: 0;
        }
    }

    .playername label {
        letter-spacing: 0.4px;
    }

    .dev-badge {
        font-size: 30px;
        color: rgba( 255, 199, 109, 0.95 );
        opacity: 0.95;
    }

    .host-badge {
        font-size: 30px;
        color: rgba( 255, 255, 255, 0.95 );
        opacity: 0.95;
    }

    .role-badge {
        font-size: 30px;
        opacity: 0.95;
    }

    .role-badge-moderator {
        color: rgba( 102, 255, 102, 0.95 );
    }

    .role-badge-admin {
        color: rgba( 255, 102, 102, 0.95 );
    }

    .role-badge-owner {
        color: rgba( 248, 168, 68, 0.95 );
    }

    .badge-wrapper {
        position: relative;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        &:hover {
            z-index: 1000;
        }

        .badge-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translatex( -50% );
            margin-bottom: 4px;
            padding: 3px 8px;
            background-color: rgba( 0, 0, 0, 0.92 );
            color: rgba( 255, 255, 255, 0.95 );
            border: 1px solid rgba( 255, 255, 255, 0.18 );
            border-radius: 4px;
            font-size: 12px;
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            z-index: 1000;
            transition: opacity 0.12s;
        }

        &:hover .badge-tooltip {
            opacity: 1;
        }
    }

    &.context-available:hover {
        cursor: pointer;
        background-color: rgba( 250, 210, 55, 0.12 );
        border-left: 3px solid rgba( 250, 210, 55, 0.85 );
    }

    .player-tag {
        margin-left: auto;
        padding: 0 6px;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        align-self: center;
        border-radius: 3px;
        background-color: rgba( 0, 0, 0, 0.35 );
    }

    .scoreboard-icon-hint {
        align-items: center;
        justify-content: center;
    }

    .stat {
        flex-basis: 75px;
        flex-grow: 1;
        text-align: right;
    }

    .stat-large {
        flex-basis: 100px;
        align-items: center;
        text-align: right;
    }

    .stat-small {
        flex-basis: 50px;
        align-items: center;
    }
}
