﻿Chatbox {
    position: absolute;
    bottom: 500px;
    left: 48px;
    width: 620px;
    height: 430px;
    border-radius: 4px;
    flex-direction: column;
    justify-content: flex-end;
    font-size: 20px;

    &.open {
        pointer-events: all;

        .input {
            opacity: 1;
            cursor: text;
        }

        .faded {
            opacity: 1;
        }
    }

    .entries {
        flex-direction: column;
        overflow: scroll;
    }

    .input {
        opacity: 0;
        min-height: 50px;
        margin-top: 10px;
        text-shadow: 0px 0px 2px black;
        font-family: FredokaOne;
        font-size: 24px;
        color: white;
        flex-wrap: wrap;

        TextEntry {
            flex-grow: 1;
            padding: 8px;
            background-color: rgba( black, 0.5 );
            border-radius: 8px;
            border: 2px solid rgba( white 0.5 );
            align-items: center;
        }
    }
}

ChatboxEntry {
    flex-shrink: 0;
    flex-grow: 0;
    transition: opacity 0.15s ease-in;
    flex-direction: row;
    margin-bottom: 16px;
    width: 100%;

    &.faded {
        opacity: 0;
    }

    .name {
        font-family: FredokaOne;
        text-shadow: 0px 0px 2px black;
        font-size: 24px;
        flex-shrink: 0;
        color: lightgoldenrodyellow;
    }

    .message {
        text-shadow: 0px 0px 2px black;
        font-family: FredokaOne;
        font-size: 24px;
        margin-left: 8px;
        color: white;
    }

    &.no-name {
        .name {
            display: none;
        }
    }

    &.death {
        .message {
            color: palevioletred;
        }
    }

    &.infected {
        .message {
            color: palegreen;
        }
    }

    &.system {
        .name, .message {
            color: lightyellow;
        }
    }
}
