﻿
@import "_vars.scss";

Chat {
    position: absolute;
    font-family: $font-family-title;
    color: $white;
    width: 600px;
    height: 550px;
    bottom: 100px;
    left: 240px;
    z-index: 1000;
    flex-direction: column-reverse;
    flex-grow: 1;

    .entries {
        overflow: scroll;
        flex-direction: column;
        flex-grow: 0;

        ChatEntry {
            min-height: 20px;
            text-shadow: $text-shadow-black;
            transition: all .15s ease;
            margin-bottom: 10px;
            flex-grow: 1;
            flex-shrink: 0;

            &:not(:last-child) {
                margin-bottom: 10px;
            }

            &.faded {
                opacity: 0;
            }

            .name {
                flex-shrink: 0;
                color: $orange;
            }

            &:intro {
                transform: scale(1);
            }

            &:outro {
                transform: scale(0);
                opacity: 0;
            }
        }
    }

    textentry {
        padding: 8px;
        margin-top: 8px;
        color: $white;
        min-height: 32px;
        border-bottom: 0px solid $red;
        padding-bottom: 4px;
        transition: all .15s ease;

        .placeholder {
            opacity: 0.2;
            pointer-events: none;
            display: none;
            text-shadow: $text-shadow-red;
            right:10px;
        }

        .placeholder {
            overflow: hidden;
        }

        &.has-placeholder {
            .placeholder {
                display: flex;
            }
        }

        &:hover {
            .placeholder {
                display: none;
            }
        }
    }

    &.open textentry {
        border-bottom: 4px solid $black;
        padding-bottom: 0;
    }

    &.open {
        pointer-events: all;

        .entries {
            ChatEntry {
                opacity: 1;
                cursor: text;
                flex-grow: 1;
            }

            .faded {
                opacity: 1;
            }
        }
    }
}
