a{
    word-break: break-all;
}

/* Правая колонка (чаты) */
.icon{
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-bottom: 1px solid #2c2c2c;
}

.icon:hover{
    background: #2a2a2a;
}

.chatList{
    flex: 1;
    overflow-y: auto;
    padding: 1.6rem .6rem 10rem 0;
    margin-left: 2rem;
}

.chatItem{
    min-height: 146px;
    flex: 0 0 33%;
    border: 1px solid #E8E8E8;
    cursor: pointer;
    border-radius: 12px;
    box-sizing: border-box;
    align-items: stretch;
}
.chatItem h5{
    margin: .6rem 0 0;
    line-height: 1;
    padding: .4rem .6rem 0 1.3rem;
}
.chatItem p{
    color:#444449;
    margin: 0 0 .6rem;
    font-size: 14px;
    line-height: 1.2;
}

.chatItemImg{flex: 0 0 140px}
.chatItemImg img{
    border-radius: 12px 0 0 12px;
}
.chatItemTxt p{
    padding: .4rem .6rem .4rem 1.3rem;
}
.chatItemAdd{
    background-color: #F1F1F1;
    border-radius: 12px 0 0 12px;
}
.chatItemAdd:before,
.chatItemAdd:after{
    content: "";
    position: absolute;
    width: 1px;
    height: 70px;
    background-color: #C6C6C6;
}
.chatItemAdd:after{
    transform: rotate(90deg);
}
.chatItemFoot{
    height: 2.4rem;
    border-top: 1px solid #E7E7E8;
    padding-left:1.2rem;
}
.chatItemFoot svg-icon[hash="megaphone"]{
    padding: .3rem .3rem .3rem .3rem;
    border-left: 1px solid #E7E7E8;
}
.chatItemMuted svg-icon[hash="megaphone"]{
    position: relative;
    background-color: #EFEFF1;
    border-radius: 0 0 12px 0;
}
.chatItemMuted svg-icon[hash="megaphone"]::after{
    content:"";
    position: absolute;
    inset:48.5% 0 0 7px;
    width:26px;
    height:1px;
    background-color: #9B9CA7;
    transform: rotate(-61deg);
}
.chatItemBtnLink{
    color: inherit;
    font-weight: bold;
    padding: .6rem 1rem;
    border: 1px solid #D5D5D8;
    border-radius: 12px;
}
.chatCategoryToggleWrap {
    display: none !important;
}

.chatAlert{
    padding: 1rem;
    color: #000;
    background-color: #C0C2C8;
    border-radius: 10px;
    margin-bottom: 5rem;
    h6{
        font-size: 18px;
        margin: .3rem 0;
    }
    a{
        color: #1B612A;
    }
    p{
        margin: .6rem 0 0 0;
        line-height: 1.2;
    }
    .chatAlertBtn{
        position: relative;
        width: 40px;
        height: 40px;
        &::after{
            content: "";
            position: absolute;
            inset: 50% auto 0 -.6rem;
            width: 1px;
            height: 4rem;
            background-color: #AEB1B8;
            transform: translateY(-50%);
        }
    }
}
/* \ CHAT-MAIN */

/* CHAT-DISCUSSION */
div.chatMsgsDiscus{
    min-height: 90vh;
    margin-left: 1rem;
}
.chatMsgsDiscus .chatMsgStat{margin-bottom: 0}

.chatUserMsg{
    display: flex;
    gap:.5rem;
    margin: 1rem 0;
}
.chatUserMsgTxt{
    position: relative;
    padding: 1rem;
    border-radius: 10px;
    background-color: #fff;
    border: 1px solid #E4E4E4;
    box-sizing: border-box;
}

.chatUserMsgTxt p:first-of-type{margin-top: 0}
.chatUserMsg .chatUserMsgImg{
    position: sticky;
    z-index: 2;
    inset: 8rem auto 6rem auto;
    margin: auto 0 .6rem 0;
}
.chatUserMsg .chatUserMsgImg img{
    border-radius: 50%;
    width: 50px;
    height: 50px;
    object-fit: cover;
}
.chatUserMsg .chatUserMsgImg::after{
    content: "";
    position: absolute;
    inset: auto -14px 15px auto;
    width: 8px;
    height: 8px;
    background-color: #fff;
    transform: rotate(45deg);
    border: 1px solid;
    border-color: transparent transparent #E4E4E4 #E4E4E4;
    border-radius: 0 0 0 4px;
}
.\'::after,
.\'::before{
    display: none;
}
.\'{
    display: block;
    margin: .5rem 0;
    padding: .2rem .5rem;
    font-size: 14px;
    background-color: var(--grnlht);
    border-left: 2px solid var(--cgrn);
    color: var(--c19);
}
.chatUserMsgMedia{
    max-height: 30svh;
    overflow: hidden;
    margin: .6rem 0;
    border-radius: 4px;
}
.chatUserMsgMedia,
.chatUserMsgMedia img{
    display: block;
    width: 100%;
}
span.chatUserMsgMedia img{
    border-radius: 0;
}
/* \ CHAT-DISCUSSION */

/*USER WRITE*/
.chatUserWrite{
    inset: auto 0 0 0;
    height: 86px;
    padding: 1.6rem 1rem;
    transform: translateY(96px);
    background-color: #f3f3f3cc;
    backdrop-filter: blur(10px);
    border-top: 1px solid #DBDBDF;
    box-sizing: border-box;
}
.chatUserWriteImg img{
    width:30px;
    height:30px;
    border-radius: 50%;
}
#userWrite{
    font-size: 16px !important;
    padding: .8rem 3rem .8rem 1rem;
    box-sizing: border-box;
}
#userAddFileBtn{
    right: .3rem;
    top: .6rem;
}
/* \ USER WRITE*/

/* CHAT-CHANNEL-MSG */
.chatDiv{
    overflow-y: auto;
    padding-bottom: 6rem;
    background-color: #F1F1F1;
}
.chatMsgs{
    width: 400px;
    margin-left: 10%;
}
.chatMsgImg{
    display: flex;
    width: 100%;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border: 1px solid #E4E4E4;
}
.chatMsgImg img{
    width: 100%;
}
.chatMsgTxt{
    position: relative;
    padding: 1rem;
    border-radius: 0 0 12px;
    background-color: #fff;
}
.chatMsgTxt::after{
    content: "";
    position: absolute;
    left: -12px;
    bottom: 0;
    width: 0;
    height: 0;
    border:8px solid;
    border-color: transparent #fff #fff transparent;
}
.chatMsgTxt p{
    margin: .8rem 0;
    text-align: justify;
    color: var(--c19);
}
.chatMsgStat{
    justify-content: end;
    margin: 1.2rem 0;
    color:#666878;
}
.chatMsgRcts .chatMsgRctsActive{
    background-color: #3255C9;
    color: #AABBE8;
}
.chatMsgRcts button{
    display: flex;
    justify-content: center;
    align-items: center;
    gap:2px;
    background-color: #EDEDED;
    border-radius: 14px;
    padding: 2px 6px;
    font-size: 12px;
    color: #5F5F5F;
}
.chatMsgRcts span{
    font-size: 18px;
}

/* Базовый контейнер реакций */
.chatMsgRcts{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Скрываем пустое текстовое поле счетчика, чтобы не ломать паддинги */
.react-btn b:empty{
  display: none;
}

.chatMsgAction{
    position: relative;
    padding: 1rem 0;
}
.chatMsgAction::before{
    content: "";
    position: absolute;
    inset: 0 -1rem 0 -1rem;
    height: 1px;
    background-color: #E8E8E8;
}
.chatMsgActionImgs img{
    width: 30px;
    height: 30px;
    object-fit: cover;
    margin-left: -4px;
    border-radius: 50%;
    border:1px solid #fff;
}
.chatMsgActionImgs img:first-child{
    margin-left: 0;
}
.chatMsgActionArrw{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.chatMsgActionArrw::before{
    content: "";
    position: absolute;
    right: 1rem;
    width: 6px;
    height: 6px;
    border: 1px solid;
    border-color: transparent transparent var(--cgrn) var(--cgrn);
    transform: rotate(-135deg);
}
/* \ CHAT-CHANNEL-MSG */

/*search*/
.search{
    top: 1rem;
    right: 2rem;
    background-color: #fff;
    border-radius: 33px;
    padding: .5rem 1rem;
}
.searchStr::after{
    content: "";
    position: absolute;
    inset: -8px -10px -8px auto;
    border-right: 1px solid #E7E7E7;
}
/* .searchBar{
    width: 400px;
    left: -165px;
    border-radius: 33px;
    transform: rotateY(0);
}
.searchBar button{
    flex:0 0 10%;
}
.searchBar label{
    flex:0 0 76%;
} */
/* \ search*/

.quote-link{
    display: block;
    border-left: 3px solid #4caf50;
    padding-left: 10px;
    margin: 5px 0 10px 0;
    background-color: #f9f9f9;
    color: #555;
    font-style: italic;
    cursor: pointer;
    text-decoration: none;
    border-radius: 0 4px 4px 0;
    padding-top: 4px;
    padding-bottom: 4px;
}
.quote-link:hover{background-color: #e8f5e9}

.reply-btn{
    border: none;
    background: none;
    color: #888;
    cursor: pointer;
}
#replyBanner{
    inset: -80px auto auto 61px;
    height: 80px;
    min-width:30%;
    display:none; background-color:#f0f0f0; padding:8px 12px; border-radius:8px; margin-bottom:10px;
}
#replyBannerText{
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 300px;
}
[hash="smile"]{
    display: inline-block;
    vertical-align: middle;
}

/* Общий контейнер-обертка для выравнивания */
.rw{
    display: inline-flex;
    align-items: center;
}


#chatPreviewContainer{
    position: absolute;
    top: -120px;
    right: 0;
    display: block;
    min-width: 275px;
    height: 90px;
    background: #fff;
    padding: .6rem;
    border-radius: 10px;
}
#imagePreview{
    max-height: 80px; border-radius: 8px; border: 1px solid #ccc; padding: 2px;
}
#previewLoader{
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.7); display: none; align-items: center; justify-content: center; font-size: 11px; color: #333; font-weight: bold;
}
#removePreviewBtn{
    background-color: #ff4444; color: #fff; padding: 6px 12px; border-radius: 4px; display: none;
}
#uploadFileBtn{
    display: none; padding: 6px 12px; background: #28a745; color: #fff; border-radius: 4px;
}
.pcdn{display: none}
@media (min-width: 1780px){
    .chatItem {
        flex: 0 0 24.6%;
    }
}
@media (min-width: 1980px){
    .chatItem {
        flex: 0 0 19.6%;
    }
}
@media (min-width: 1250px){
    .chatMsgs{
        width: 33vw;
        transform: translateX(20%);
    }
}
@media (min-width: 1025px){
    .chatMsgs{
        width: 38vw;
        transform: translateX(20%);
    }
}

@media (max-width: 1280px){
    .chatItem {
        flex: 0 0 32.8%;
    }
}
@media (max-width: 1270px){
    .chatItem {
        flex: 0 0 400px;
    }
}
@media screen and (max-width: 720px){
    .chatUserWrite{
        height: 74px;
        padding: 1.2rem 0.5rem;
    }
    .chatMsgs,
    .chatUserMsg{
        width: 94%;
    }
    div.chatMsgsDiscus{
        margin-left: 2px;
    }
    .chatDiv{
        padding-top: 5.2rem;
    }
}
.chatItemImg .chatReply,
.chatItemImg .chatCounter{
    display: none;
}
.chatAlertBtnMob{display:none;}
@media (max-width: 520px){
    .pcdn{display: initial}
    .pcdn.fx{display: flex}
    .chatMsgTxt::after{display: none}
    .chatUserMsg,
    .chatMsgRcts,
    .fx.gap\.5.ac.rw{
        gap:.3rem;
    }
    [hash="reply"]{
        display: block;
        width: 14px;
        height: 27px;
    }
    .chatMsgs{
        width: 99%;
        margin-left: 2px;
    }
    .chatUserMsg{
        width: 97%;
    }
    .chatList{
        margin-left: 12px;
        padding: .6rem .6rem 1rem 0;
    }
    .chatItemAdd:before,
    .chatItemAdd:after{
        height: 68px;
    }
    .fx.gap\.5.fw{
        gap:.6rem
    }
    .chatMsgTxt{
         border-radius: 0 0 12px 12px;
    }
    .chatUserMsg .chatUserMsgImg::after{
        inset: auto -10px 23px auto;
    }
    .chatAlertBtn{display: none;}
    .chatAlertBtnMob{
        display: flex;
        margin-top: .7rem;
        padding: .5rem;
        border: 1px solid #9DADA7;
        border-radius: 10px;
    }
    .chatAlertBtnMob::after{
        content: "";
        position: absolute;
        inset: 0 30px 0 auto;
        width: 1px;
        background-color: #9DADA7;
    }
    .chatItem {
        min-height: 100%;
        flex: 0 0 99.8%;
        padding-top: .7rem;
        border:0;
        border-top: 1px solid #E7E7E8;
        border-radius: 0;
    }
    .chatItem:first-of-type{
        border:0;
    }
    .chatItemImg img {
        width: 80px;
        max-height: 80px;
        border-radius: 0;
    }
    .chatItemImg {
        flex: 0 0 80px;
    }
    .chatItem p{
        padding: .4rem 0 0 1.2rem;
    }
    .chatItem h5 {
        margin-top: 0;
        padding-top: 0;
    }
    .chatItemFoot {
        height: auto;
        border: 1px solid #E7E7E8;
        padding-left: 0.5rem;
        margin: 0 0 0 1.2rem;
        border-radius: 6px;
    }
    .chatItemAdd {
        border-radius: 0;
        min-height: 80px;
    }
    .chatItemBtnLink {
        display: flex;
        line-height: 1;
        border-radius: 6px;
    }
    .chatItem.chatItemHiddenMob {
        display: none !important;
    }
    .chatCategoryToggleWrap {
        display: flex !important;
        width: 100%;
        margin: .3rem 0 1rem 0;
    }
    .chatCategoryToggleBtn:hover {
        background-color: #f0f0f2;
    }
    .chatCategoryToggleBtn::after{
        content: "";
        position: absolute;
        inset: 37% 30% auto auto;
        width: 6px;
        height: 6px;
        border-bottom: 1px solid #9E9FA1;
        border-left: 1px solid #9E9FA1;
        border-radius: 0 0 0 2px;
        transform: rotate(-45deg);
        transition: transform .3s;
    }
    .awyb::after{
        transform: rotate(-45deg)rotateX(180deg)rotateY(180deg);
    }
    .chatItemImg{position: relative;}
    .chatItemImg .chatReply,
    .chatItemImg .chatCounter{
        display: initial;
        top: -10px;
        right: 8px;
        color:#fff;
    }
    .chatItemImg .chatCounter{right: -6px;}
    .chatItemTxt{
        justify-content: start;
    }
    .chatItemMuted svg-icon[hash="megaphone"] {
        border-radius: 0 0 6px 0;
    }
    .chatItemX{
        padding-bottom: .7rem;
        border-bottom: 1px solid #E7E7E8;
    }
    #head{
        margin-bottom: .8rem;
    }
    #head h1{
        letter-spacing: 10%;
        text-transform: uppercase;
    }
    #head a{
        width: 40px;
        height: 40px;
        border: 1px solid #E7E7E8;
        color:#12121A;
    }
    .chatAlert {
        margin-bottom: 1.6rem;
    }
    .chatList h2.ls10:first-of-type{
        margin-bottom: .9rem;
    }
    .chatList h2.ls10{
        margin-top: 1rem;
    }
}