/**
 * Стили чата под Ekstaler — без синего оверлея LR WEB, нормальные шрифты.
 */
:root {
    --span-color: var(--p, #9c27b0);
    --bg-color: #0b0b0b;
    --card-color: #141414;
    --button-color: #ffffff;
    --custom-text-color: #e8e8e8;
    --default-text-color: #c4c4c4;
    --link-second-navbar-color: #f3f3f3;
    --news: transparent;
    --bg-modal: rgba(0, 0, 0, 0.55);
    --span: var(--p, #9c27b0);
    --bg: #0b0b0b;
    --card: #141414;
    --button: #ffffff;
    --text-custom: #e8e8e8;
}

/* Затемнение, а не заливка цветом темы */
.chat_background {
    pointer-events: none;
    z-index: 9998 !important;
    background: transparent !important;
}
.chat_background.show {
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1 !important;
}

.modal_okno_chat {
    z-index: 10000 !important;
    max-width: 420px;
    width: min(420px, calc(100vw - 16px));
    padding: 0 10px;
    font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}

.block-chat-back {
    background: #121212 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    padding: 0 14px 14px !important;
}

.block-chat-back > h2 {
    height: 52px !important;
    margin: 0;
    font-size: 1.05rem !important;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.block-chat-info {
    height: auto !important;
    min-height: 48px;
    font-size: 12px !important;
    line-height: 1.35;
    border-color: rgba(156, 39, 176, 0.45) !important;
    background: #0d0d0d !important;
    margin-right: 0 !important;
    padding: 10px 12px !important;
}
.block-chat-info > a {
    color: #d1d5db !important;
}
.block-chat-info > svg {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0;
    fill: var(--p, #9c27b0) !important;
}

#chat_main_content {
    height: min(420px, 52vh) !important;
    padding: 52px 12px 12px !important;
    margin: 12px 0 !important;
    background: #0a0a0a !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    gap: 10px !important;
}

.chat_message .padding,
.chat_message_my .padding {
    background: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px !important;
    max-width: 100%;
}

.chat_message div > .chat_message_content,
.chat_message_my div > .chat_message_content {
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: #e5e7eb !important;
    min-width: 0 !important;
}

.chat_nickname {
    font-size: 13px !important;
    color: #fff !important;
}

.chat_role {
    font-size: 10px !important;
    padding: 2px 8px !important;
}

.chat_message .chat_message_date,
.chat_message_my .chat_message_date {
    font-size: 11px !important;
    color: #9ca3af;
}
.chat_message_date > stats {
    opacity: 0.55 !important;
}

.chat_message div > a > img,
.chat_message_my div > a > img {
    width: 28px !important;
    height: 28px !important;
    opacity: 1 !important;
    border-radius: 8px !important;
}

.chat_footer_send {
    background: #0d0d0d !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

#chat_send_message > textarea {
    background: #1a1a1a !important;
    color: #f3f4f6 !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}
#chat_send_message > textarea::placeholder {
    color: #6b7280;
}

.chat_footer_send > button {
    background: var(--p, #9c27b0) !important;
    border: 0;
}
.chat_footer_send > button > svg {
    fill: #fff !important;
}
.chat_footer_send > button:hover {
    filter: brightness(1.08);
}

.chat_smile_btn svg {
    fill: #9ca3af !important;
}
.chat_smile_btn:hover svg {
    fill: var(--p, #9c27b0) !important;
}

.chat_menu_smile {
    background: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 2;
}

label[for="chat_checkbox_call"] {
    font-size: 12px !important;
    color: #9ca3af;
}

.chat_open {
    background: var(--p, #9c27b0) !important;
    border: 0;
    border-radius: 12px !important;
    width: 52px !important;
    height: 52px !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat_open svg {
    fill: #fff !important;
}
.chat_open span {
    background: #111 !important;
    color: #fff !important;
    border-color: var(--p, #9c27b0) !important;
}

/* Модуль чата вешает глобальный div:empty — глушим */
div:empty:before {
    content: none !important;
}
#chat_send_message [contentEditable=true]:empty:not(:focus):before {
    content: attr(data-text);
}

.chat_no_msg,
.reload-mess {
    font-size: 14px !important;
    color: #9ca3af !important;
}

.block-chat-online {
    color: #9ca3af;
    font-size: 12px;
}

@media (max-width: 560px) {
    .modal_okno_chat {
        max-width: 100%;
        width: 100%;
        padding: 0 8px;
        top: auto;
        bottom: 0;
        transform: translateY(110%);
    }
    .modal_okno_chat.show {
        transform: translateY(0);
    }
    #chat_main_content {
        height: min(48vh, 380px) !important;
    }
}
