#homeChatBlock .forum-topics{ margin-top: 4px; }

#homeChatBlock .forum-topic-title{

    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

#homeChatBlock .forum-topic-last .material-symbols-rounded{
    opacity: .6;
}

.public-chat{
    display: flex;
    flex-direction: column;
    gap: 14px;
}


.public-chat .chat-form{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.public-chat .chat-form-row{
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.public-chat .chat-input{
    flex: 1;
    min-height: 48px;
    max-height: 160px;
    padding: 12px 14px;
    background: #fafbfc;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
.public-chat .chat-input:focus{
    background: #fff;
    border-color: var(--muted);
}

.public-chat .chat-send{
    flex-shrink: 0;
    min-width: 48px;
    padding: 0 16px;
}
.public-chat .chat-send .material-symbols-rounded{ font-size: 20px; }

.public-chat .chat-form-hint{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fafbfc;
    border: 1px dashed var(--border-2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-2);
}
.public-chat .chat-form-hint[hidden]{ display: none !important; }
.public-chat .chat-form-hint-text{
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.public-chat .chat-form-hint-close{
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 4px;
    display: inline-flex;
    border-radius: 5px;
}
.public-chat .chat-form-hint-close:hover{ background: #f2f4f7; color: var(--text); }

.public-chat .chat-load-more[hidden]{ display: none !important; }

.public-chat .chat-list{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.public-chat .chat-msg{
    display: flex;
    gap: 12px;
    max-width: none;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.public-chat .chat-msg:hover{ border-color: var(--border-2); }

.public-chat .chat-msg-avatar{
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
}
.public-chat .chat-msg-avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.public-chat .chat-msg-body{ flex: 1; min-width: 0; }

.public-chat .chat-msg-head{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.public-chat .chat-msg-author{
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text);
    text-decoration: none;
}
.public-chat .chat-msg-author:hover{ color: var(--text-2); }
.public-chat .chat-msg-date{ color: var(--muted); }

.public-chat .chat-msg-content{
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-2);
    word-break: break-word;
    white-space: pre-wrap;
}


.public-chat .chat-msg-reply{
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 10px;
    background: #eef1f5;
    border-left: 2px solid var(--muted);
    border-radius: 5px;
    font-size: 12.5px;
    line-height: 1.4;
    word-break: break-word;
}
.public-chat .chat-msg-reply-author{
    font-weight: 700;
    color: var(--text);
    background: #dfe3ea;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: .2px;
}


.public-chat .chat-msg-quote{
    margin: 8px 0;
    padding: 8px 12px;
    background: #fafbfc;
    border-left: 2px solid var(--border-2);
    border-radius: 5px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    word-break: break-word;
}
.public-chat .chat-msg-quote-author{
    display: block;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 2px;
}


.public-chat .chat-msg-actions{
    margin-left: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}
.public-chat .chat-msg-btn{
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 5px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    transition: background var(--transition);
    font-family: inherit;
}
.public-chat .chat-msg-btn:hover{ background: #f2f4f7; color: var(--text-2); }
.public-chat .chat-msg-btn .material-symbols-rounded{ font-size: 17px; }
.public-chat .chat-msg-btn--danger:hover{ color: var(--danger); }


.public-chat .chat-empty{
    text-align: center;
    padding: 40px 20px;
    background: var(--panel);
    border: 1px dashed var(--border-2);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 13.5px;
}
.public-chat .chat-empty[hidden]{ display: none; }


@media (max-width: 480px){
    .public-chat .chat-msg{ padding: 12px; gap: 10px; }
    .public-chat .chat-msg-avatar{ width: 38px; height: 38px; font-size: 16px; }
    .public-chat .chat-form{ padding: 10px; }
}
