﻿@import "/UI/Core/Styles/Theme.scss";

Chat {
    pointer-events: none;
    z-index: 90;

    &.open {
        pointer-events: all;


        .textentry {
            background-color: $widget-color-dark;
            opacity: 1;
        }

        .ChatBox {
            background-color: $widget-color;
            backdrop-filter: $widget-backdrop-filter;
            box-shadow: $widget-shadow;
        }
    }

    &.team-chat {
        // Border and textentry background applied via inline styles for dynamic team color.
    }

    &.hidden {
        .MessageList {
            opacity: 0;
            pointer-events: none;
        }
    }

    .textentry {
        border: none;
        border-radius: 0px;
        overflow: hidden;
        opacity: 0.001;
    }

    .ChatBox {
        position: absolute;
        left: $safe-zone-y;
        border-radius: 6px;
        border: 1px solid transparent;
        box-shadow: none;
        overflow: visible;

        .Content {
            position: relative;
            flex-direction: column;
            justify-content: space-between;
            width: 500px;
            font-size: 14px;
            max-height: 330px;
            height: 290px;

            .MessageList {
                flex-direction: column;
                justify-content: flex-end;
                flex-grow: 1;
                overflow-y: scroll;
                overflow-x: hidden;
                width: 100%;
                padding-right: 6px;
                //border-right: 1px solid rgba( 255, 255, 255, 0.08 );
                opacity: 1;
                transition: opacity 0.25s ease;

                .ChatEntry {
                    padding: 8px;
                    align-items: center;
                    flex-shrink: 0;
                    text-stroke-width: 4px;
			        text-stroke-color: rgba( 0, 0, 0, 0.2 );
			        text-shadow: 2 2px 3px rgba( 0, 0, 0, 0.6 );

                    .ServerName {
                        color: rgba( 110, 190, 255, 0.95 );
                        
                    }

                    .ServerAvatar {
                        height: 44px;
                        width: 44px;
                        align-items: center;
                        justify-content: center;
                        background-color: rgba( 255, 255, 255, 0.04 );
                        border: 1px solid rgba( 255, 255, 255, 0.12 );
                        border-radius: 4px;

                        .server-avatar-icon {
                            .icon {
                                font-size: 24px;
                                color: rgba( 110, 190, 255, 0.95 );
                            }
                        }
                    }

                    .ChatEntryContent {
                        flex-direction: column;

                        .EntryTop {
                            align-items: center;

                            label {
                                font-size: 16px;
                                margin-left: 8px;
                            }

                            .chat-timestamp {
                                font-size: 10px;
                                opacity: 0.4;
                                margin-left: 6px;
                            }
                        }

                        .EntryBottom {
                            label {
                                margin-left: 8px;
                                font-size: 16px;
                                
                            }
                        }
                    }

                    img {
                        //border-radius: 50%;
                        height: 44px;
                        width: 44px;
                        border: 1px solid rgba( 255, 255, 255, 0.12 );
                    }
                }
            }

            .InputField {
                flex-shrink: 0;
                min-height: 48px;
                flex-direction: row;
                align-items: center;
                gap: 8px;
                position: relative;
                z-index: 3;

                .ChatChannelIndicator {
                    flex-shrink: 0;
                    flex-grow: 0;
                    margin-left: 3px;
                    padding: 6px 0;
                    width: 88px;
                    min-width: 88px;
                    max-width: 88px;
                    text-align: center;
                    justify-content: center;
                    border-radius: 4px;
                    border: 1.5px solid rgba(255, 255, 255, 0.3);
                    background-color: rgba(255, 255, 255, 0.04);
                    font-size: 12px;
                    font-weight: 800;
                    letter-spacing: 1.2px;
                    text-stroke-width: 3px;
                    text-stroke-color: rgba(0, 0, 0, 0.6);
                    pointer-events: all;
                    cursor: pointer;
                    transition: background-color 0.15s ease;

                    &:hover {
                        background-color: rgba(255, 255, 255, 0.1);
                    }
                }

                .textentry {
                    min-height: 40px;
                    height: 40px;
                    width: 380px;

                    .label {
                        font-size: 16px;
                    }
                }
            }

            .ChatModeHint {
                font-size: 12px;
                color: rgba(255, 255, 255, 0.45);
                padding: 2px 6px;
                flex-shrink: 0;
            }

            .CommandSuggestions {
                position: absolute;
                left: 0;
                right: 0;
                bottom: 40px;
                flex-direction: column;
                max-height: 140px;
                overflow-y: scroll;
                overflow-x: hidden;
                border: 1px solid rgba( 255, 255, 255, 0.14 );
                border-bottom: none;
                background-color: rgba( 12, 18, 30, 0.95 );
                box-shadow: 0 -8px 24px rgba( 0, 0, 0, 0.35 );
                pointer-events: all;
                z-index: 2;

                .Suggestion {
                    min-height: 30px;
                    padding: 6px 10px;
                    align-items: center;
                    gap: 3px;
                    transition: background-color 0.1s ease;

                    .Prefix {
                        font-size: 13px;
                        color: rgba( 255, 255, 255, 0.55 );
                        text-shadow: none;
                    }

                    .Command {
                        font-size: 13px;
                        color: rgba( 255, 255, 255, 0.9 );
                        text-shadow: none;
                    }
                }
            }
        }
    }
}
