:root {
    --cg:#656878;
    --cgrn:#21612E;
    --grnlht:#D1DCD4;
    --c19:#191920;
    --cf:#fff;
    --vvh: 100dvh;
}
@font-face {
    font-family: "bague_r";
    font-weight: 100;
    src: url(/static/fonts/PFBagueSansPro-Regular.woff) format("woff")
}
@font-face {
    font-family: "bague_m";
    font-weight: 500;
    src: url(/static/fonts/PFBagueSansPro-Medium.woff) format("woff")
}
@font-face {
    font-family: "bague_b";
    font-weight: 600;
    src: url(/static/fonts/PFBagueSansPro-Bold.woff) format("woff")
}
input,
textarea {
    border:0;
    font-size: 16px;
    font-family: inherit;
}
input:focus,
textarea:focus {
    outline:0
}
input::placeholder,
textarea::placeholder {
    font-family: bague_r, Arial, sans-serif;
    font-size:16px;
    color:#CFCFCF;
}
[width="95"]{width: 77px}
html {
    height: 100%;
    height: 100dvh;
    height: var(--vvh, 100dvh);
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}
body{
    height: 100%;
    height: 100dvh;
    height: var(--vvh, 100dvh);
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
}
body,
button{
    font-family: "bague_r", Arial, sans-serif;
}
a{
    color: #1B612A;
    text-decoration: none;
}

main{
    height: 100%;
    height: 100dvh;
    height: var(--vvh, 100dvh);
    min-width: 1400px;
    width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}
button{
    cursor: pointer;
    background-color: transparent;
    border: none;
}

/* общий стиль скролла для всего приложения */
* {
    scrollbar-width: thin;/* Firefox */
    scrollbar-color: #cbcbcb transparent;
}

/* WebKit (Chrome, Edge, Safari) */
.sidebar::-webkit-scrollbar,
.chatList::-webkit-scrollbar {
    width: 8px;
}

/* трек (фон скролла) */
.sidebar::-webkit-scrollbar-track,
.chatList::-webkit-scrollbar-track {
    background: transparent;
}

/* ползунок */
.sidebar::-webkit-scrollbar-thumb,
.chatList::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #666, #444);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.2s ease;
}

/* hover по ползунку */
.sidebar::-webkit-scrollbar-thumb:hover,
.chatList::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #888, #555);
}

/* активное нажатие */
.sidebar::-webkit-scrollbar-thumb:active,
.chatList::-webkit-scrollbar-thumb:active {
    background: #777;
}

/* скрыть стрелки (старые браузеры) */
.sidebar::-webkit-scrollbar-button,
.chatList::-webkit-scrollbar-button {
    display: none;
}

/* UTILITIES */
.fbb{
    font-family: "bague_b",sans-serif;
    font-weight: bold;
}
.fbm{
    font-family: "bague_m",sans-serif;
}
.fbr,
input,
textarea{
    font-family: "bague_r",sans-serif;
}
.ovh{overflow: hidden}
.pr{position: relative}
.ps{position: sticky}
.pa{position: absolute}
.ps{position: sticky}
.pf{position: fixed}
.p0{inset:0}
.z2{z-index: 2}
.z3{z-index: 3}
.z4{z-index: 4}
.fx{display: flex}
.fx1{flex:1}
.fsb{justify-content: space-between}
.fsa{justify-content: space-around;}
.fw{flex-wrap: wrap}
.gap\.5{gap: .5rem}
.gap{gap: 1rem}
.ac{align-items: center}
.jc{justify-content: center}
.jce{justify-content: end}
.fdc{flex-direction: column}
.w1{width: 100%}
.he1{height: 100%}
.m0{margin: 0}
.mt{margin-top: 1rem}
.mt2{margin-top: 1.6rem}
.mt4{margin-top: 4rem}
.mb2{margin-bottom: 1.6rem}
.pt{padding-top: 1rem}
.pt2{padding-top: 1.6rem}
.pb{padding-bottom: 1rem}
.fs0{font-size: 0}
.fs12{font-size: 12px}
.fs14{font-size: 14px}
.fs16{font-size: 16px}
.fs18{font-size: 18px}
.h2{font-size: 14px}
.tu{text-transform: uppercase}
.tc{text-align: center}
.cg{color: var(--cg)}/*grey*/
.clg{color: #A1A1AE}/*light grey*/
.cf{color: var(--cf)}/*white*/
.cgn{color: #A2BFA8}/*light green*/
.cb{color: #12121A}/*black*/
.fwb{font-weight: bold}
.ls10{letter-spacing: 10%}
.obfc{object-fit: cover}
.cgrn{color:var(--cgrn)}
.bggrn{background-color: var(--grnlht)}
.bgf{background-color: #fff}
.bgg{background-color: var(--cgrn)}
.br{border-radius: 10px}
.br33{border-radius: 33px}
.pd{padding: 2px 8px}
.bx{box-sizing: border-box}
.dn{display: none!important}
.tl{text-align: left}

/* APP SHELL + SIDEBAR (навигация по каналам) */
nav.nav ul{
    margin: 0;
    padding: 0;
}
nav.nav ul li{
    position: relative;
    display: flex;
    justify-content: center;
    width: 100px;
    padding: 1rem;
    list-style: none;
    /*transition: background-color linear .2s;*/
}
nav.nav ul li:first-child{
    padding-top: 1.6rem;
}
nav.nav ul li.chatChannel img{
    border-radius: 50%;
    width: 60px;
    height: 60px;
    object-fit: cover;
}
.chatChannelCl{
}
.chatChannelCl::before{
    content: "";
    position: absolute;
    inset:-1.6rem 0 auto 0;
    border-top:1px solid #EFEFF2;
    width: 100%;
    height: 1px;
}
.chatItemImg .chatCounter,
nav.nav ul li .chatCounter{
    position: absolute;
    top: .8rem;
    right: 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1rem;
    height: 1rem;
    background-color: var(--c19);
    color: #fff;
    border:2px solid #fff;
    font-size: 12px;
    text-align: center;
    border-radius: 50%;
}
nav.nav ul li .chatReply svg-icon{filter: drop-shadow(1px 0px 0 #fff);}
.chatItemImg .chatReply,
nav.nav ul li .chatReply{
    position: absolute;
    top: .8rem;
    right: 44px;
    width: 1rem;
    height: 1rem;
    background-color: #1B612A;
    border-radius: 50%;
    border:2px solid #fff;
}
/*nav.nav ul li:first-child:hover{
    background-color: #fff;
}*/
nav.nav ul li.mnuActive{
    background-color: #EFEFF2;
}
nav.nav ul li a{
    color:#fff;
}

.app {
    display: flex;
    height: 100%;
    height: 100dvh;
    height: var(--vvh, 100dvh);
    width: 100%;
    overflow: hidden;
}

/* Левая колонка (иконки чатов) */
.chatSidebar {
    width: 100px;
    color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #E7E7E8;
    /*margin-right: 2rem;*/
}

#user{
    border-radius: 50%;
    background-color: #656877;
    width: 40px;
    height: 40px;
}
#menu{
    width: 60px;
    height: 60px;
    color: #A1A2AD;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #EFEFF2;
}

/* Верхняя полоса — общая для ленты канала и панели обсуждения */
.chatTopStripe{
    inset:0 0 auto 0;
    padding: 1.6rem;
}

/* SEARCH */
.search{
    width: 60px;
    height: 60px;
    box-shadow: 0 0 8px #f5f5f5;
}
.searchBtnAct{
    min-width: 60px;
    min-height: 60px;
}
.searchBar{
    inset: 26px auto auto -48%;
    width: 98%;
    height: 60px;
    padding: 0 .8rem;
    box-shadow: 0 0 8px #f5f5f5;
    transform: rotateY(0)translateX(50%);
    transform-origin: 100% 0;
    opacity: 1;
    transition: transform .8s,opacity .3s .2s;
}

.searchBar svg-icon{
    width: 30px;
    height: 30px;
    max-width: 30px;
    max-height: 30px;
}
.searchBarCl,
.searchBarMobCl{
    opacity: 0;
    transform: rotateY(90deg);
}
.searchBar button{
    width: 30px;
    min-width: 30px;
    height: 30px;
    transform: rotate(45deg);
}
.searchBar button::after,
.searchBar button::before{
    content: "";
    position: absolute;
    width: 1px;
    height: 28px;
    border-radius: 3px;
    background-color: #9E9EA1;
}
.searchBar button::after{
    transform: rotate(90deg);
}
.searchBar svg-icon{
    flex:0 0 10%;
}
/*.searchBar label{
    flex:0 0 92%;
}*/
.searchBar input{
    padding: .6rem;
    font-size: 16px;
}
/* \ search*/

/* Кнопки реакций — общие для чата и канала */
.active-reaction,
.postMsgRctsActive {
    background-color: #2E55C9 !important;
    color: #fff !important;
}
.react-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 2px 6px;
    background: transparent;
    font-size: 13px;
    color: #3e424b;
    cursor: pointer;
    transition: all 0.2s ease;
}
.react-btn:hover { background-color: #f0f0f0; }

/* Кнопка трех точек и контекстное меню комментария */
.msg-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.msg-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 2px 4px;
    margin: 0;
    border-radius: 6px;
    color: #9a9a9a;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.msg-menu-trigger:hover,
.msg-menu-wrap.active .msg-menu-trigger {
    color: #2b2b2b;
    background-color: #f0f1f3;
}

.msg-menu-trigger svg {
    display: block;
}

/* Выпадающее меню действий */
.msg-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 230px;
    max-width: calc(100vw - 32px);
    z-index: 1000;
    overflow: hidden;
    animation: msgMenuFadeIn 0.15s ease-out;
}

.msg-menu-wrap.active .msg-menu-dropdown {
    display: flex;
    flex-direction: column;
}

@keyframes msgMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 18px;
    background: transparent;
    border: none;
    color: #404040;
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}

.msg-menu-item:hover {
    background-color: #f6f7f9;
    color: #1a1a1a;
}

.msg-menu-item:active {
    background-color: #edf0f4;
}

.msg-menu-item + .msg-menu-item {
    border-top: 1px solid #f0f1f4;
}

.msg-menu-icon {
    flex-shrink: 0;
    color: #737373;
    transition: color 0.15s ease;
}

.msg-menu-item:hover .msg-menu-icon {
    color: #222222;
}

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

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

.chatMsgRcts button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    background-color: #EDEDED;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 2px 6px;
    font-size: 12px;
    color: #5F5F5F;
    cursor: pointer;
    line-height: 1;
}

.chatMsgRcts span {
    font-size: 16px;
}

.chatMsgRcts .active-reaction,
.chatMsgRcts .chatMsgRctsActive,
.chatMsgRcts .postMsgRctsActive {
    background-color: #3255C9;
    color: #AABBE8;
    border-color: #3255C9;
}

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

/*ЭТИ СТИЛИ НУЖНО БУДЕТ ВЫРЕЗАТЬ, ТАК КАК АДАПТИВ, СКОРЕЕ-ВСЕГО, У ТЕБЯ ОТДЕЛЬНЫЙ*/
main{
    min-width: 100%;
    width: 100%;
}
/* \ ЭТИ СТИЛИ НУЖНО БУДЕТ ВЫРЕЗАТЬ, ТАК КАК АДАПТИВ, СКОРЕЕ-ВСЕГО, У ТЕБЯ ОТДЕЛЬНЫЙ*/
.pc-dn{display: none!important}


/* Общая keyframe-анимация бейджа (используется в чате и канале) */
@keyframes badgePop {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

/* Адаптив каркаса (общая часть) */
@media (min-width: 721px){
    .pc-dn7{display: none}
}
@media screen and (max-width: 720px){
    main {
        min-width: 100%;
        width: 100%;
        height: 100%;
        height: 100dvh;
        height: var(--vvh, 100dvh);
        overflow: hidden;
    }
    .app {
        width: 100%;
        height: 100%;
        height: 100dvh;
        height: var(--vvh, 100dvh);
    }
    .mob-ac{
        align-items: center;
    }
    .mob-fdc{
        flex-direction: column;
    }
    .search{display: none}
    .pc-dn{display: initial!important}
    .chatSidebar{
        position: fixed;
        inset: 72px auto 0 0;
        z-index: 4;
        background-color: #fff;
        transition: transform .3s,opacity .3s;
    }
    .chatSidebarCl{
        transform: translateX(-110%);
        opacity: 0;
    }
    .mobMenuBtn button{
        border:1px solid #ccc;
        border-radius: 10px;
        width: 44px;
        height: 44px;
    }
    .chatTopStripe {
        align-items: center;
        padding: .9rem .6rem;
    }
    .chatTopStripe a.pa.p0{
        left:70px;
    }
    .searchBarMob{
        z-index: 5;
        inset: 0 0 auto 0;
        display: flex;
        height: 80px;
        width: auto;
    }
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Применяется на устройствах с сенсорным экраном */
@media (hover: none) and (pointer: coarse) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ==========================================================================
   Полноэкранный просмотр изображений (Lightbox)
   ========================================================================== */
.chatAttachedImg,
.chatUserMsg .pt img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, filter 0.22s ease;
    display: block;
}

.chatAttachedImg:hover,
.chatUserMsg .pt img:hover {
    filter: brightness(0.96);
    transform: scale(1.015);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.channelLightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: zoom-out;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.channelLightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.channelLightboxBackdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
}

.channelLightboxContent {
    position: relative;
    max-width: 95vw;
    max-height: 92vh;
    max-height: 92dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    user-select: none;
    cursor: zoom-out;
}

.channelLightboxImg {
    max-width: 94vw;
    max-height: 88vh;
    max-height: 88dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.channelLightbox.active .channelLightboxImg {
    transform: scale(1);
}

.channelLightboxClose {
    position: fixed;
    top: max(16px, env(safe-area-inset-top, 16px));
    right: max(16px, env(safe-area-inset-right, 16px));
    z-index: 10;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, transform 0.15s ease;
}

.channelLightboxClose:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.08);
}

.channelLightboxClose:active {
    transform: scale(0.95);
}

@media (max-width: 600px) {
    .channelLightboxImg {
        max-width: 96vw;
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: 6px;
    }
    .channelLightboxClose {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }
}