﻿@import "/UI/Core/Styles/Theme.scss";

$scoreboard-vertical-offset: -0px;

Scoreboard {
    z-index: 100;
    padding: 24px;
    justify-content: center;
    align-items: flex-start;

    &.visible {
        pointer-events: all;
    }

    //rgb(201, 194, 90)

    table {
        //overflow: hidden;
        width: 100%;
        max-width: 980px;
        min-width: 760px;
        margin-top: $scoreboard-vertical-offset;
        flex-direction: column;
        color: rgba( white, 0.94 );
        //padding-bottom: 10%;
        border: 1px solid $scoreboard-surface-border;
        border-radius: $scoreboard-surface-radius;
        background-color: $scoreboard-surface-background;
        backdrop-filter: $scoreboard-surface-backdrop;
        box-shadow: $scoreboard-surface-shadow;

        label,
        span,
        text,
        .important,
        .emphasis,
        .small,
        .tiny,
        .body,
        .caption,
        .title,
        .display {
            font-family: "Akshar-ContrastLight", "Akshar-Light", "Akshar", "Segoe UI", sans-serif;
            letter-spacing: 0.2px;
            text-shadow: 0 2px 8px rgba( black, 0.35 );
        }

        // Explicit font utility overrides should always win inside scoreboard.
        .font-resmont,
        .font-use-resmont,
        .font-use-resmont label,
        .font-use-resmont span,
        .font-use-resmont text {
            font-family: $font-family-palette-resmont !important;
        }

        .icon,
        i,
        icon {
            font-family: $font-family-icon;
            text-shadow: none;
            letter-spacing: 0;
        }

        .title {
            position: relative;
            background-color: $scoreboard-surface-header-background;
            padding: 12px 18px;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid $scoreboard-divider;
            text-shadow: none;

            .scoreboard-status,
            .scoreboard-time {
                font-family: "Resmont-SemiBold", "Resmont-Medium", "Resmont", "Akshar", "Segoe UI", sans-serif;
                letter-spacing: 0.8px;
                text-transform: uppercase;
            }

            .scoreboard-status {
                font-size: 18px;
                white-space: nowrap;

                &.state-preparing {
                    color: $team-ui-text-unassigned;
                }

                &.state-ongoing {
                    color: $team-ui-tint-innocent;
                }

                &.state-ending {
                    color: $team-ui-tint-traitor;
                }
            }

            .title-left {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                align-self: stretch;
                justify-content: flex-end;
                gap: 4px;
                position: relative;
            }

            .scoreboard-status {
                position: absolute;
                top: 0;
                left: 0;
            }

            .scoreboard-map-row {
                flex-direction: row;
                align-items: baseline;
                gap: 4px;
            }

            .scoreboard-map,
            .scoreboard-map-name {
                font-family: "Resmont-Regular", "Resmont", "Akshar", "Segoe UI", sans-serif;
                font-size: 12px;
                letter-spacing: 1px;
                text-transform: uppercase;
            }

            .scoreboard-map {
                opacity: 0.78;
            }

            .scoreboard-map-name {
                color: rgba( 255, 198, 107, 0.92 );
            }

            .scoreboard-outdated,
            .scoreboard-uptodate,
            .scoreboard-editor {
                font-family: "Resmont-SemiBold", "Resmont-Medium", "Resmont", "Akshar", "Segoe UI", sans-serif;
                font-size: 11px;
                letter-spacing: 0.8px;
                text-transform: uppercase;
                margin-top: 2px;
            }

            .scoreboard-outdated {
                color: rgba( $warning-orange, 0.95 );
            }

            .scoreboard-uptodate {
                color: rgba( $green, 0.85 );
            }

            .scoreboard-editor {
                color: rgba( white, 0.55 );
            }

            .scoreboard-server-name {
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
                font-family: "Resmont-SemiBold", "Resmont-Medium", "Resmont", "Akshar", "Segoe UI", sans-serif;
                font-size: 22px;
                letter-spacing: 1.4px;
                text-transform: uppercase;
                color: rgba( white, 0.94 );
                white-space: nowrap;
                max-width: 50%;
                text-overflow: ellipsis;
                overflow: hidden;
            }

            .title-right {
                display: flex;
                flex-direction: column;
                align-items: flex-end;
                justify-content: center;
                gap: 4px;

                .scoreboard-lobby-privacy {
                    align-items: center;
                    gap: 6px;
                    padding: 2px 10px;
                    border-radius: 999px;
                    border: 1px solid rgba( white, 0.12 );
                    background-color: rgba( white, 0.04 );
                }

                .scoreboard-lobby-privacy-icon {
                    font-size: 16px;
                    color: rgba( white, 0.7 );
                }

                .scoreboard-lobby-privacy-label {
                    font-family: "Resmont-Regular", "Resmont", "Akshar", "Segoe UI", sans-serif;
                    font-size: 12px;
                    letter-spacing: 0.9px;
                    text-transform: uppercase;
                    color: rgba( white, 0.8 );
                }

                .scoreboard-round {
                    font-family: "Resmont-Regular", "Resmont", "Akshar", "Segoe UI", sans-serif;
                    font-size: 12px;
                    letter-spacing: 1px;
                    text-transform: uppercase;
                    opacity: 0.78;
                }
            }
        }

        .scoreboard-context-hint {
            position: absolute;
            bottom: 4px;
            left: 0;
            right: 0;
            font-size: 11px;
            letter-spacing: 0.4px;
            opacity: 0.55;
            text-align: center;
            justify-content: center;
        }

        .scoreboard-header-wrap {
            position: relative;
        }

        .scoreboard-header-row {
            position: absolute;
            width: 100%;
            height: 38px;
            border-bottom: 1px solid $scoreboard-divider;
            background-color: rgba( white, 0.02 );
        }

        .scoreboard-header-col {
            align-items: center;
        }

        .scoreboard-header-col-name {
            flex-basis: 500px;
        }

        .scoreboard-header-col-stat {
            flex-basis: 75px;
            flex-grow: 1;
            text-align: right;
        }

        .scoreboard-column-label {
            font-family: "Resmont-Regular", "Resmont", "Akshar", "Segoe UI", sans-serif;
            letter-spacing: 1.1px;
            text-transform: uppercase;
            opacity: 0.72;
        }

        .scoreboard-group-title {
            font-family: "Resmont-SemiBold", "Resmont-Medium", "Resmont", "Akshar", "Segoe UI", sans-serif;
            letter-spacing: 0.8px;
            text-transform: uppercase;
        }

        .scoreboard-player-count {
            font-size: 13px;
            opacity: 0.5;
            margin-left: 4px;
        }

        .state {
            height: 48px;
        }

    }
}
