/**
 * 
 * Module Chat
 * @author - HILER
 * 
 * @link HLMod:   https://hlmod.net/members/hiler.77403/
 * @link CsDevs:  https://csdevs.net/members/hiler.52/
 * @link Discord: https://discordapp.com/users/252040667361050625 / hiler / HILER#3959
 * 
 */

.chat_card {
    height: 440px;
}

.chat_header {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bottom-line-table);
}

.chat_head_main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.chat_head_right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat_head_moderations {
    padding: 2px 8px;
    background-color: var(--grey);
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
}

.chat_head_moderations svg {
    width: 14px;
    fill: var(--text-default);
}

.chat_head_rule {
    background-color: rgb(239 155 20 / 20%);
    color: #ef9b14;
    padding: 2px 12px;
    font-weight: 500;
    border-radius: 8px;
    transition: .2s;
    cursor: pointer;
}

.chat_head_rule:hover,
.chat_footer button:hover,
.chat_admin_punish:hover,
.chat_head_moderations:hover,
.chat_moder_add button:hover {
    filter: brightness(1.2);
}

.chat_main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.chat_messages {
    height: 100%;
    padding: 10px;
    overflow: auto;
}

.chat_messages_control {
    display: flex;
    gap: 12px;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

.chat_messages_preloader_icon {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat_messages_preloader_icon svg {
    width: 12rem;
    height: 12rem;
    fill: var(--span);
    opacity: .1;
}

.chat_messages_preloader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 22px;
    font-weight: 500;
    color: var(--text-custom);
    opacity: .8;
}

.chat_footer {
    padding: 10px;
    border-top: 1px solid var(--bottom-line-table);
}

.chat_footer form,
.chat_moder_add form {
    display: flex;
    gap: 6px;
}

.chat_info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.chat_footer input,
.chat_block > .chat_info > .chat_ms,
.chat_moder_add input {
    background-color: var(--bg);
    border: 1px solid var(--bottom-line-table);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    width: 100%;
    color: var(--text-custom);
}

.chat_footer button,
.chat_moder_add button {
    width: 44px;
    background-color: var(--bg);
    border: 1px solid var(--bottom-line-table);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    height: auto;
    transition: .2s;
    cursor: pointer;
    padding-inline: unset;
}

.chat_footer button svg,
.chat_moder_add button svg {
    width: 15px;
}

.chat_footer_plug {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-custom);
    gap: 6px;
}

.chat_footer_plug svg {
    width: 15px;
    fill: var(--text-custom);
}

.chat_footer_block {
    color: var(--red);
    opacity: .8;
}

.chat_block {
    display: flex;
    gap: 6px;
}

.chat_a_avatar {
    height: max-content;
    width: max-content;
}

.chat_avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.chat_user {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat_user_head {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat_nick {
    font-size: 14px;
    color: var(--text-default);
}

.chat_admin_tag {
    padding: 0 4px;
    background-color: rgb(239 155 20 / 20%);
    border-radius: 4px;
    color: #ef9b14;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 16px;
    cursor: context-menu;
    user-select: none;
}

.chat_admin_tag svg {
    width: 10px;
    fill: #ef9b14;
}

.chat_admin_punish {
    width: 16px;
    height: 16px;
    background-color: rgb(255 90 90 / 20%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    transition: .2s;
}

.chat_admin_punish svg {
    width: 10px;
    fill: var(--red);
}

.chat_date {
    color: var(--text-custom);
    font-size: 10px;
}

.modal_chat_rules {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal_chat_rule {
    color: var(--text-custom);
}

.modal_chat_punish {
    background-color: rgb(255 90 90 / 20%);
    color: var(--red);
    width: max-content;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 13px;
}

.modal_chat_punish_btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal_chat_punish_btn {
    background-color: var(--bg-table);
    color: var(--text-custom);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.modal_chat_punish_btn:hover {
    background-color: var(--text-custom);
    color: var(--bg-table);
    transform: translateY(-2px);
}


.chat_moders_list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 214px;
    overflow-y: scroll;
    padding-right: 6px;
}

.chat_moders_list li {
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--grey);
    border-radius: 8px;
    height: 48px;
}

.chat_moder_delete {
    background-color: var(--button);
    height: 28px;
    width: 28px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    transition: .2s;
    align-items: center;
}

.chat_moder_delete svg {
    width: 11px;
    fill: var(--red);
}

.chat_moder_info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat_pinned_message {
    position: absolute;
    width: 100%;
    background-color: #13151c;
    z-index: 1;
}

.chat_pinned_block {
    max-height: 48px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.2s ease;
    cursor: pointer;
    padding: 4px 12px;
    border-bottom: 1px solid var(--bottom-line-table);
    display: flex;
    gap: 12px;
    box-shadow: 0 8px 22px var(--bg);
}

.chat_pinned_info {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.chat_pinned_info_user {
    opacity: .9;
    display: flex;
    gap: 6px;
}

.chat_pinned_block svg {
    fill: var(--text-custom);
    position: sticky;
    top: 0.8rem;
}

.chat_pinned_block.open {
    max-height: 320px;
}

.chat_pinned_block span {
    font-size: 13px;
    color: var(--text-custom);
}

.chat_unpin_btn {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
}

.chat_unpin_btn svg {
    width: 1rem;
    fill: var(--red);
}

#chat-unpin-message button {
    width: 100%;
}

