/*Логика отображения окна*/
#wrap.ng_ui_win_chat_view #ng_win_chat_view
{
    display: table;
}

#wrap.ng_inited.ng_ui_win_chat_view #ng_body
{
    background-image: url('../images/ui/ng_content/ng_chat.jpg');
}

#wrap #ng_win_chat_view_block
{
    background-image: none;
    background-color: rgba(0,0,0,0.83);
    padding: 0;
    overflow: visible;
    height: 42em;
    width: 45%;
    max-width: 93.5em;
}

#wrap #ng_win_chat_view_head
{
    width: 100%;
    position: absolute;
    top: -2.6428em;
    left: 0;
    right: 0;
    margin: auto;
    text-align: right;
    padding-right: 3.3571em;
    box-sizing: border-box;
}
#wrap #ng_win_chat_view_block.ng_preloader #ng_win_chat_view_head
{
    display: none;
}
#wrap #ng_win_chat_view_head .ng_btn
{
    margin: 0 0.1428em;
    z-index: 1;
}

/*Скролл*/
#wrap #ng_win_chat_view_scroll_bar
{
    right: 0.9em;
    bottom: 5.4285em;
}
#wrap #ng_win_chat_view_scroll_body
{
    border-right: solid 0.0714em #d1d1d1;
    width: -webkit-calc(100% - 2.4285em);
    width: calc(100% - 2.4285em);
    height: -webkit-calc(100% - 4em);
    height: calc(100% - 4em);

    padding-left: 11em;
    box-sizing: border-box;
}

/*Текстовка пустой список*/
#wrap #ng_win_chat_view_empty_text
{
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: 1em;
}

/*Информация о опоненте*/
#wrap #ng_win_chat_view_user
{
    position: absolute;
    text-align: center;
    top: 3.2142em;
    left: 0;
    width: 10.3571em;
}
#wrap #ng_win_chat_view_user_inet
{
    white-space: nowrap;

    width: 100%;

    margin-bottom: 0.5em;
}
#wrap #ng_win_chat_view_user_offline
{
    color: #999999;
}
#wrap #ng_win_chat_view_user_online
{
    color: #18ff01;
    display: none;
}
#wrap #ng_win_chat_view_block.ng_user_online #ng_win_chat_view_user_offline
{
    display: none;
}
#wrap #ng_win_chat_view_block.ng_user_online #ng_win_chat_view_user_online
{
    display: block;
}
/*Аватар опонента*/
#wrap #ng_win_chat_view_user_avatar
{
    width: 7.7857em;
    height: 7.7857em;
    margin-right: 0;
    margin-bottom: 0.5em;
    border-color: #999999;
    border-width: 0.2142em;
    position: relative;
    overflow: visible;

    -webkit-border-radius: 7.7857em;
    -moz-border-radius: 7.7857em;
    border-radius: 7.7857em;
}
#wrap #ng_win_chat_view_block.ng_user_online #ng_win_chat_view_user_avatar
{
    border-color: #18ff01;
}
/*Имя опонента*/
#wrap #ng_win_chat_view_user_name
{
    font-size: 18px;
    font-size: 1.2857em;
    color: #fee396;
    margin-bottom: 0.2777em;
}
/*Рейтинг опонента*/
#wrap #ng_win_chat_view_user_level
{
    white-space: nowrap;
    color: #FFFFFF;
    font-style: italic;
}
#wrap #ng_win_chat_view_user_level_value
{
    display: inline;
}

/*Список*/
#wrap #ng_win_chat_view_messages
{
    width: 100%;
    box-sizing: border-box;
}
#wrap #ng_win_chat_view_block.ng_preloader #ng_win_chat_view_messages
{
    visibility: hidden;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id]
{
    width: 100%;
    padding-bottom: 1em;
    position: relative;
    box-sizing: border-box;
    text-align: left;
    padding-right: 1em;
    white-space: nowrap;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id] .ng_chat_avatar
{
    width: 2.4285em;
    height: 2.4285em;
    border-color: transparent !important;/*#fe0000;*/
    border-width: 0.2142em;
    overflow: visible;

    position: relative;
    margin-right: 1.7142em;
    vertical-align: top;

    -webkit-border-radius: 2.4285em;
    -moz-border-radius: 2.4285em;
    border-radius: 2.4285em;
}

#wrap #ng_win_chat_view_block.ng_user_flag_blue #ng_win_chat_view_messages [data-chat_message_id] .ng_chat_avatar
{
    border-color: #0000fe;
}

#wrap #ng_win_chat_view_messages [data-chat_message_id].ng_chat_massage_right .ng_chat_avatar
{
    margin-left: 1.7142em;
    margin-right: 0em;
}

#wrap #ng_win_chat_view_block.ng_user_flag_blue #ng_win_chat_view_messages [data-chat_message_id].ng_chat_massage_left .ng_chat_avatar
{
    border-color: #fe0000;
}
#wrap #ng_win_chat_view_block:not(.ng_user_flag_blue) #ng_win_chat_view_messages [data-chat_message_id].ng_chat_massage_left .ng_chat_avatar
{
    border-color: #0000fe;
}

#wrap #ng_win_chat_view_messages [data-chat_message_id] .ng_chat_massage
{
    font-size: 18px;
    font-size: 1.2857em;
    padding: 0.5em 1.4285em;
    display: inline-block;
    min-height: 1em;
    text-align: left;
    white-space: normal;
    line-height: 1em;
    position: relative;
    max-width: -webkit-calc(100% - 9.9444em);
    max-width: calc(100% - 9.9444em);

    width: 100%;

    -webkit-border-radius: 0.3571em;
    -moz-border-radius: 0.3571em;
    border-radius: 0.3571em;

    word-break: break-all;
    word-break: break-word;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id].ng_chat_massage_right
{
    text-align: right;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id] [data-chat_message_time].ng_chat_massage:after
{
    font-size: 8px;
    font-size: 0.4444em;
    content: attr(data-chat_message_time);
    text-align: right;
    width: 100%;
    display: block;
    position: absolute;
    right: 1em;
    bottom: 0;
    line-height: 1em;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id] .ng_chat_massage:before
{
    content: '';
    display: none;
    position: absolute;
    top: 0.5em;
    width: 0;
    height: 0;
    border-width: 0em;
    border-style: solid;
    border-color: transparent;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id].ng_chat_massage_left .ng_chat_massage:before
{
    border-width: 0.5em 1.6em 0.5em 0;
    border-color: transparent #cacaca transparent transparent;
    left: -1.5em;
    display: block;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id].ng_chat_massage_right .ng_chat_massage:before
{
    border-color: transparent transparent transparent #a6c6df;
    border-width: 0.5em 0 0.5em 1.6em;
    right: -1.5em;
    display: block;
}

#wrap #ng_win_chat_view_messages [data-chat_message_id].ng_chat_massage_left .ng_chat_massage
{
    background-color: #cacaca;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id].ng_chat_massage_right .ng_chat_massage
{
    background-color: #a6c6df;
}
#wrap #ng_win_chat_view_messages [data-chat_message_id] .ng_chat_massage [data-smile]
{
    width: 2em;
    height: 2.2em;
}

/*Датировка сообщений, блок*/
#wrap #ng_win_chat_view_messages .ng_chat_massage_time
{
    text-align: center;
    color: #ffc002;
    margin: 0.2352em auto 0.0588em;
    font-weight: bold;
    line-height: 1em;
    border-bottom: solid 0.0714em #d1d1d1;
    padding: 0.2em;
    margin-bottom: 1em;
}

/*Футер*/
#wrap #ng_win_chat_view_footer
{
    width: 100%;
    height: 4em;
    border-top: solid 0.0714em #d1d1d1;
}
#wrap #ng_win_chat_view_footer_td_1
{
    text-align: left;
    vertical-align: top;
}
#wrap #ng_win_chat_view_footer_td_2
{
    text-align: right;
    width: 25.2142em;
    vertical-align: middle;
    white-space: nowrap;
    position: relative;
}

/*Поле для ввода сообщения*/
#wrap #ng_win_chat_view_message_input
{
    font-size: 24px;
    font-size: 1.7142em;
    margin-bottom: 0;
    background-image: none;
    color: rgb(166,198,223);
    height: 2.2083em;
    padding: 0 0.6em;
    margin-top: 0.0833em;
    line-height: 1em;

    resize: none;

    -webkit-border-radius: 0em;
    -moz-border-radius: 0em;
    border-radius: 0em;
}

/* WebKit, Edge */
#wrap #ng_win_chat_view_message_input::-webkit-input-placeholder
{
    color: #fdf800;
}
/* Firefox 4-18 */
#wrap #ng_win_chat_view_message_input:-moz-placeholder
{
    color: #fdf800;
    opacity: 1;
}
/* Firefox 19+ */
#wrap #ng_win_chat_view_message_input::-moz-placeholder
{
    color: #fdf800;
    opacity: 1;
}
/* IE 10-11 */
#wrap #ng_win_chat_view_message_input:-ms-input-placeholder
{
    color: #fdf800;
}
/* Edge */
#wrap #ng_win_chat_view_message_input::-ms-input-placeholder
{
    color: #fdf800;
}
/* MODERN BROWSER */
#wrap #ng_win_chat_view_message_input::placeholder
{
    color: #fdf800;
}

/*Попапы*/
/*Смайлы*/
#wrap #ng_win_chat_view_popup_slimes
{
    position: absolute;
    width: 34.3em;
    right: 2.7142em;
    bottom: 4.5em;
    white-space: normal;
    background-color: rgba(2,30,42, 0.62);
    border: solid 0.0714em #27291c;
    padding: 0.2em;

    -webkit-border-radius: 1.2857em;
    -moz-border-radius: 1.2857em;
    border-radius: 1.2857em;
}
#wrap #ng_win_chat_view_popup_slimes [data-smile]
{
    cursor: pointer;
    pointer-events: all;
}
/*Тексты*/
#wrap #ng_win_chat_view_popup_texts
{
    position: absolute;
    right: 2.7142em;
    left: 0;
    bottom: 4.5em;
    text-align: center;
}
#wrap #ng_win_chat_view_popup_texts .ng_win_chat_view_texts
{
    text-align: center;
    color: #FFFFFF;
    display: inline-block;
    vertical-align: top;
    border: solid 0.1428em #767676;
    min-width: 11.0714em;
    background-color: rgba(2,30,42,0.62);
    cursor: pointer;
    height: 2.6428em;
    line-height: 2.6428em;
    white-space: nowrap;
    margin: 0.2857em;

    -webkit-border-radius: 2em;
    -moz-border-radius: 2em;
    border-radius: 2em;
}