
#subscribe {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.box-content {
    .general-message {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
            -ms-flex-direction: row;
                flex-direction: row;
        gap: 20px;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        color: #000;
        webkit-touch-callout: none;  /* iOS Safari */
        -webkit-user-select: none;    /* Safari */     /* Konqueror */
        -moz-user-select: none;       /* Firefox */
        -ms-user-select: none;        /* Internet Explorer/Edge */
        user-select: none;            /* Non-prefixed version, currently supported by Chrome, Opera, Edge, Firefox */
        -ms-touch-action: manipulation;
            touch-action: manipulation;   /* Улучшает отклик на касания */

        .icon {
            .f-circle {
                background-color: #e0f2fe;
                font-size: 28px;
                border-radius: 50%;
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-pack: center;
                -ms-flex-pack: center;
                justify-content: center;
                -webkit-box-align: center;
                -ms-flex-align: center;
                align-items: center;
                min-width: 48px;
                min-height: 48px;
                .letter {
                    color: #0169a3;
                    cursor: default;
                    text-transform: uppercase;
                    font-weight: 700;
                    font-size: 20px;
                }
            }
        }
        .header-top-message {
            -ms-flex-preferred-size: 73px;
                flex-basis: 73px;
            -webkit-box-orient: horizontal;
            -webkit-box-direction: normal;
                -ms-flex-direction: row;
                    flex-direction: row;
            display: inherit;
            gap: 10px;
            -webkit-box-align: center;
                -ms-flex-align: center;
                    align-items: center;
            -webkit-box-pack: end;
                -ms-flex-pack: end;
                    justify-content: end;
            .time {
                font-size: 11px;
                color: darkgray;
            }
        }
    }
}

/* Общий контейнер чата */
.chat-app {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;          /* занимает всё доступное место */
    min-height: 0;           /* разрешаем сжатие */
    overflow: hidden;
    color: #000;
    position: relative;
    /*background: #fff;*/
}

/* Шапка – фиксированная высота */
.chat-header {
    -ms-flex-negative: 0;
        flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 12px 16px;
    color: #000;
}
.chat-messages::-webkit-scrollbar {
    width: 0;          /* Для вертикальной прокрутки */
    height: 0;         /* Для горизонтальной (если есть) */
    background: transparent;
}

/* Можно дополнительно скрыть кнопки (стрелки) */
.chat-messages::-webkit-scrollbar-button {
    display: none;
}
/* Область сообщений – занимает всё свободное место */
.chat-messages {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    min-height: 0;           /* критично – позволяет сжиматься */
    overflow-y: auto;
    padding: 16px 2px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 2px;
}

/* Футер с полем ввода – прижат к низу */
.chat-footer {
    -ms-flex-negative: 0;
        flex-shrink: 0;          /* не сжимается */
    background: #fff;
    border-top: 1px solid #eee;
    padding: 12px 2px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    height: auto;            /* убираем фиксированную 40px – пусть высота определяется содержимым */
    min-height: 40px;
}


.reply-quote {
    background: rgba(0, 0, 0, 0.05);
    border-left: 3px solid #3bc8f5;
    padding: 4px 8px;
    margin-bottom: 5px;
    font-size: 0.85em;
    border-radius: 4px;
}

.reply-preview {
    background: #eef2f4;
    padding: 8px 12px;
    border-radius: 8px 8px 0 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    font-size: 0.9em;
    border-bottom: 1px solid #d5dbde;
    margin-top: -72px
}

.reply-btn {
    font-size: 0.75em;
    color: #3bc8f5;
    cursor: pointer;
    text-decoration: underline;
}
.msg-bubble {
    -webkit-transition: background 0.2s, -webkit-transform 0.2s;
    transition: background 0.2s, -webkit-transform 0.2s;
    -o-transition: transform 0.2s, background 0.2s;
    transition: transform 0.2s, background 0.2s;
    transition: transform 0.2s, background 0.2s, -webkit-transform 0.2s;
    -moz-user-select: none;
     -ms-user-select: none;
         user-select: none; /* Запрещаем выделение текста при долгом нажатии */
    -webkit-user-select: none;
    width: 80%;
    max-width: 80%;
    min-width: 0;
    word-break: break-word;
    overflow: hidden;               /* ← важно: обрезает всё, что вылезает */
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    .msg-attachment {
        width: 100%;
        padding: 0;
        margin: 0;
        line-height: 0;

        .message-file {
            width: 100%;
            max-width: 100%;
            margin: 0;
            padding: 0;                    /* 👈 важно */
            display: block;
            line-height: 0;                /* 👈 убирает «пустые строки» под inline-элементами */
            font-size: 0;
            video, video.message-video {
                display: block;
                width: 100%;
                max-width: 100%;
                height: auto;
                -o-object-fit: contain;
                   object-fit: contain;
                margin: 0;
                padding: 0;
                background: #000;
            }
        }
    }
}
.message {
    webkit-touch-callout: none;  /* iOS Safari */
    -webkit-user-select: none;    /* Safari */     /* Konqueror */
    -moz-user-select: none;       /* Firefox */
    -ms-user-select: none;        /* Internet Explorer/Edge */
    user-select: none;            /* Non-prefixed version, currently supported by Chrome, Opera, Edge, Firefox */
    -ms-touch-action: manipulation;
        touch-action: manipulation;   /* Улучшает отклик на касания */
    background: transparent;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: 100%;
    min-width: 0;

    &.msg {
        .msg-text {
            /* Системный стек шрифтов обеспечит поддержку эмодзи */
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            padding: 10px;
            color: #000;
            word-break: break-word;
            overflow-wrap: anywhere;
        }
        &.more {
            -webkit-box-pack: start;
                -ms-flex-pack: start;
                    justify-content: flex-start;
            .msg-bubble {
                width: 80%;
                max-width: 80%;
                min-width: 0;
                word-break: break-word;
                background: #e9ffe9;
                /*padding: 10px;*/
                overflow: hidden;
                &.is-active, &.long-press-active {
                    scale: 0.8;
                }
            }
        }
        &.own {
            -webkit-box-pack: end;
                -ms-flex-pack: end;
                    justify-content: flex-end;
            .msg-bubble {
                width: 80%;
                max-width: 80%;
                min-width: 0;
                word-break: break-word;
                background: aliceblue;
                /*padding: 10px;*/
                overflow: hidden;
                &.is-active, &.long-press-active {
                    scale: 0.8;
                }
            }
        }
        .time {
            text-align: right;
            font-size: 11px;
            color: darkgray;
            padding-right: 10px;
        }
    }
}

.button-footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    gap: 10px;
    background: #fff;

    div:first-child, svg {
        -ms-flex-preferred-size:5%;
            flex-basis:5%;
        -webkit-box-flex: 1;
            -ms-flex-positive: 1;
                flex-grow: 1;
    }
    svg {
        -ms-flex-preferred-size: 16%;
            flex-basis: 16%;
        height: 30px;
    }
    textarea {
        -ms-flex-preferred-size: 100%;
            flex-basis: 100%;
        padding: 5px 10px;
        width: 100%;
        -webkit-box-flex: 2;
            -ms-flex-positive: 2;
                flex-grow: 2;
        border: none;
        color: #000;
        /*height: 200px;*/
    }
}



/* Эффект при активном меню */
.msg-bubble.is-active {
    -webkit-transform: scale(0.95);
        -ms-transform: scale(0.95);
            transform: scale(0.95);
    background-color: #e2e2e2;
}

.long-tap-menu {
    position: absolute;
    top: 10%;
    left: 50%;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 20px;
    -webkit-box-shadow: 0 10px 25px rgba(0,0,0,0.2);
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 100;
    width: 90%;
    font-size: 15px;
    /*height: 355px;*/
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    &.home {
        top: 20%;
        width: 65%;
        z-index: 9999;
    }
}
.long-tap-menu .reactions-details {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid #eee;
    padding: 10px 4px 4px;
}

/* Шапка, эмодзи и кнопки — не сжимаются */
.long-tap-menu > .close,
.long-tap-menu > span,
.long-tap-menu > .reaction-picker,
.long-tap-menu > .block-button {
    -ms-flex-negative: 0;
        flex-shrink: 0;
}


.emoji-item {
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    -webkit-transition: -webkit-transform 0.1s;
    transition: -webkit-transform 0.1s;
    -o-transition: transform 0.1s;
    transition: transform 0.1s;
    transition: transform 0.1s, -webkit-transform 0.1s;
    /* Системные шрифты для правильного рендеринга смайлов */
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.emoji-item:active {
    -webkit-transform: scale(1.4);
        -ms-transform: scale(1.4);
            transform: scale(1.4); /* Эффект увеличения при нажатии пальцем */
}

.reactions-bar {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.reaction-count {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    -o-transition: all 0.2s;
    transition: all 0.2s;
}

/* Стиль для нажатой реакции */
.reaction-count.is-active {
    background: rgba(59, 200, 245, 0.15);
    border-color: #3bc8f5;
    color: #1a7ab1;
}

.reaction-count .count {
    font-weight: bold;
}
.reaction-count {
    position: relative; /* Для позиционирования тултипа */
}

.reaction-tooltip {
    position: absolute;
    bottom: 120%; /* Над баджем */
    left: 50%;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

/* Маленький треугольник снизу */
.reaction-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}
.reaction-picker {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
}
.close {
    right: 8px;
    position: absolute;
    top: 0;
}
.block-button {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 20px;
}
.block-button div {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}
.upload-preview {
    position: relative;      /* чтобы можно было позиционировать крестик внутри */
    background: #fff;
    width: 100%;
    max-height: 40dvh;       /* не выше 40% экрана */
    margin-bottom: 8px;      /* отступ от поля ввода */
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #ccc;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    overflow: hidden;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    img, video {
        max-width: 100%;
        max-height: 38dvh;
        border-radius: 8px;
        -o-object-fit: contain;
           object-fit: contain;
        display: block;
    }
    > span {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 28px;
        height: 28px;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        border-radius: 50%;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
        cursor: pointer;
        font-size: 16px;
        z-index: 1;
    }
}
.chat-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}
.bottom-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    gap: 20px;
    font-size: 12px;
}
.center-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}
.top-navigator {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    width: inherit;

    span {
        -ms-flex-preferred-size: 80%;
            flex-basis: 80%;
        &:last-child {
            text-align: right;
            -ms-flex-preferred-size: 10%;
                flex-basis: 10%;
        }
        &:first-child {
            -ms-flex-preferred-size: 10%;
                flex-basis: 10%;
        }
    }
}

.typing-indicator {
    padding: 8px 12px;
    font-size: 13px;
    color: #666;
    background: #f0f2f5;
    border-radius: 20px;
    margin: 5px 10px;
    display: inline-block;
    -ms-flex-item-align: start;
        align-self: flex-start;
}

.dots {
    display: inline-block;
    -webkit-animation: typing 1.4s infinite;
            animation: typing 1.4s infinite;
}

@-webkit-keyframes typing {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes typing {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}
.last-comment {
    font-size: 12px;
    background: #F8F8F9;
    .msg-text {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        gap: 15px;
        .icons {
            .f-circle {
                background-color: #e0f2fe;
                font-size: 14px;
                border-radius: 50%;
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-pack: center;
                -ms-flex-pack: center;
                justify-content: center;
                -webkit-box-align: center;
                -ms-flex-align: center;
                align-items: center;
                min-width: 24px;
                min-height: 24px;
                .letter {
                    color: #0169a3;
                    cursor: default;
                    text-transform: uppercase;
                    font-weight: 700;
                    font-size: 0.7em;
                }
            }
        }
    }
    .time {
        text-align: right;
        font-size: 11px;
        color: darkgray;
    }
}
.message-default-new {
    color: #fff;
    font-size: 12px;
    background: #020249;
    border-radius: 11px;
    padding: 0 12px;
}

@-webkit-keyframes pulseStroke {
    0% {
        stroke-width: 0.5;
        stroke-opacity: 1;
    }
    50% {
        stroke-width: 2;
        stroke-opacity: 0.5;
    }
    100% {
        stroke-width: 1;
        stroke-opacity: 1;
    }
}

@keyframes pulseStroke {
    0% {
        stroke-width: 0.5;
        stroke-opacity: 1;
    }
    50% {
        stroke-width: 2;
        stroke-opacity: 0.5;
    }
    100% {
        stroke-width: 1;
        stroke-opacity: 1;
    }
}

.pulse-icon {
    stroke: #2c9104;
    -webkit-animation: pulseStroke 1s infinite;
            animation: pulseStroke 1s infinite;
}
.item-add-chat {
    opacity: 0;
    visibility: hidden;
    height: 0;
    position: absolute;
    -webkit-transform: scale(0.8);
        -ms-transform: scale(0.8);
            transform: scale(0.8);
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: -webkit-transform 0.3s ease;
    -o-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease;
    min-height: 200px;
    max-height: 300px;
    &.active {
        opacity: 1;
        visibility: visible;
        background: #fff;
        top: 30px;
        z-index: 100;
        height: 100%;
    }
    .list-group {
        height: inherit;
        overflow: auto;
    }
}
.chat-input{
    /*padding-bottom: env(safe-area-inset-bottom);*/
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;   /* ← ОБЯЗАТЕЛЬНО */
    gap: 8px;                 /* отступ между блоками */
    padding: 8px;
    background: #fff;
    border-top: 1px solid #eee;
    textarea {
        -webkit-box-sizing: border-box;
                box-sizing: border-box;
        height: 40px;               /* минимум */
        min-height: 40px;
        max-height: 150px;          /* раскрытая высота */
        padding: 8px 12px;
        border: 1px solid #ccc;
        border-radius: 20px;
        font-size: 16px;            /* чтобы iOS не масштабировал */
        line-height: 1.4;
        resize: none;
        overflow-y: auto;
        font-family: inherit;
        -webkit-transition: height 0.2s ease, border-radius 0.2s ease;
        -o-transition: height 0.2s ease, border-radius 0.2s ease;
        transition: height 0.2s ease, border-radius 0.2s ease;
    }
    &.is-expanded textarea {
        height: 150px;
        border-radius: 12px;
    }
}

.msg-pending {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 8px;
    opacity: 0.75;
    font-style: italic;
}

.msg-pending .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #007bff;
    border-radius: 50%;
    -webkit-animation: spin 0.8s linear infinite;
            animation: spin 0.8s linear infinite;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

.input-area {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 8px;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
}
textarea {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 12px;
    font-size: 16px; /* чтобы избежать масштабирования на iOS */
    resize: none;
    font-family: inherit;
    /*height: 150px;*/
}
.send-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
}
/* Мобильный оверлей для списка упоминаний */
/*.mention-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.mention-container {
    background: white;
    width: 100%;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    max-height: 50vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    margin-bottom: 80px;
}*/
.mention-dropdown {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 100%;            /* прямо над полем ввода */
    margin-bottom: 8px;      /* отступ от поля */

    background: #fff;
    border-radius: 14px;
    -webkit-box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
            box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    max-height: 45vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    overflow: hidden;
    z-index: 100;
}
.mention-header {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    background: #fafbfc;
}
.mention-header small {
    color: #888;
    font-weight: normal;
    font-size: 11px;
}

.mention-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mention-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    -webkit-transition: background 0.1s;
    -o-transition: background 0.1s;
    transition: background 0.1s;
}
.mention-item:active {
    background: #eef6ff;
}
.mention-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    -o-object-fit: cover;
       object-fit: cover;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}
.mention-info {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    min-width: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 4px 10px;
    -webkit-box-align: baseline;
        -ms-flex-align: baseline;
            align-items: baseline;
}

.mention-name {
    font-weight: 600;
    font-size: 15px;
    color: #222;
}

.mention-hint {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}
.mention-hint b {
    color: #007bff;
}

.mention-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* Адаптация уведомлений Битрикс для мобильных устройств */
@media (max-width: 768px) {
    .ui-notification-balloon {
        max-width: calc(100% - 20px) !important; /* Увеличиваем максимальную ширину */
        min-width: 200px !important;            /* Задаём минимальную ширину */
        left: 10px !important;                 /* Центрируем по горизонтали */
        right: 10px !important;
        margin: 0 auto !important;
        word-wrap: break-word;                 /* Разрешаем перенос длинных слов */
        white-space: normal !important;        /* Разрешаем перенос строк */
    }

    /* Дополнительно — настройка внутренних контейнеров */
    .ui-notification-balloon .ui-notification-balloon-content {
        display: block;
        padding: 15px;
        font-size: 14px;
        line-height: 1.4;
    }
    .message-file video,
    video.message-video {
        max-height: 50vh;
        width: 100%;
    }
}

/* Активная реакция (уже поставлена текущим пользователем) */
.emoji-item.is-active {
    background: #e0f2fe;
    border-radius: 8px;
    -webkit-box-shadow: inset 0 0 0 2px #3bc8f5;
            box-shadow: inset 0 0 0 2px #3bc8f5;
}

/* === Нижний блок: список реакций === */
.reactions-details {
    border-top: 1px solid #eee;
    padding: 10px 4px 4px;
    max-height: 180px;
    overflow-y: auto;
}

.reactions-details-header {
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.reaction-details-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 8px;
    -webkit-transition: background 0.15s;
    -o-transition: background 0.15s;
    transition: background 0.15s;
}

.reaction-details-row:hover {
    background: #f7f9fb;
}

.reaction-details-emoji {
    font-size: 20px;
    line-height: 1;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

.reaction-details-count {
    background: #f0f0f0;
    color: #555;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

.reaction-details-users {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 4px;
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    min-width: 0;
    -webkit-box-pack: end;
        -ms-flex-pack: end;
            justify-content: flex-end;
}

.reaction-details-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    border: 1.5px solid #fff;
    -webkit-box-shadow: 0 0 0 1px #e0e0e0;
            box-shadow: 0 0 0 1px #e0e0e0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.reaction-details-avatar img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
}

.reaction-details-avatar .placeholder {
    width: 100%;
    height: 100%;
    background: #007bff;
    color: #fff;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.reaction-details-more {
    font-size: 11px;
    color: #666;
    font-weight: 600;
    margin-left: 2px;
}

.reaction-details-names {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
       text-overflow: ellipsis;
    margin-left: auto;
    padding-left: 8px;
}

.reply-quote {
    cursor: pointer;
    -webkit-transition: background 0.15s;
    -o-transition: background 0.15s;
    transition: background 0.15s;
    -webkit-tap-highlight-color: rgba(59, 200, 245, 0.15);
}

.reply-quote:active {
    background: rgba(59, 200, 245, 0.2);
}

.message.highlight-message .msg-bubble {
    -webkit-animation: highlight-pulse 2.5s ease-out;
            animation: highlight-pulse 2.5s ease-out;
}

@-webkit-keyframes highlight-pulse {
    0%   { background: #fff8b0; -webkit-box-shadow: 0 0 0 2px #ffd600; box-shadow: 0 0 0 2px #ffd600; }
    30%  { background: #fff8b0; -webkit-box-shadow: 0 0 0 2px #ffd600; box-shadow: 0 0 0 2px #ffd600; }
    100% { background: inherit; -webkit-box-shadow: none; box-shadow: none; }
}

@keyframes highlight-pulse {
    0%   { background: #fff8b0; -webkit-box-shadow: 0 0 0 2px #ffd600; box-shadow: 0 0 0 2px #ffd600; }
    30%  { background: #fff8b0; -webkit-box-shadow: 0 0 0 2px #ffd600; box-shadow: 0 0 0 2px #ffd600; }
    100% { background: inherit; -webkit-box-shadow: none; box-shadow: none; }
}

.chat-messages-wrapper {
    position: relative;
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    min-height: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    /*padding-bottom: 60px;*/       /* чтобы кнопка не закрывала последнее сообщение */
}

.scroll-to-bottom-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    cursor: pointer;
    z-index: 100;               /* выше сообщений */
    -webkit-transition: -webkit-transform 0.15s;
    transition: -webkit-transform 0.15s;
    -o-transition: transform 0.15s;
    transition: transform 0.15s;
    transition: transform 0.15s, -webkit-transform 0.15s;
}

.scroll-to-bottom-btn .arrow {
    font-size: 20px;
    color: #007bff;
    font-weight: bold;
    line-height: 1;
}

.scroll-to-bottom-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #007bff;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    -webkit-box-shadow: 0 0 0 2px #fff;
            box-shadow: 0 0 0 2px #fff;
}

/* Плавное появление/исчезновение */
.fade-up-enter-active,
.fade-up-leave-active {
    -webkit-transition: opacity 0.2s, -webkit-transform 0.2s;
    transition: opacity 0.2s, -webkit-transform 0.2s;
    -o-transition: opacity 0.2s, transform 0.2s;
    transition: opacity 0.2s, transform 0.2s;
    transition: opacity 0.2s, transform 0.2s, -webkit-transform 0.2s;
}
.fade-up-enter-from,
.fade-up-leave-to {
    opacity: 0;
    -webkit-transform: translateY(10px);
        -ms-transform: translateY(10px);
            transform: translateY(10px);
}

/* Отступ снизу для кнопки, чтобы не перекрывалась полем ввода */
.chat-messages {
    /*padding-bottom: 60px;*/ /* под кнопку */
}

/* Лайтбокс для просмотра фото в полном размере */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    z-index: 100000;
    padding: 20px;
    cursor: -webkit-zoom-out;
    cursor: zoom-out;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    -o-object-fit: contain;
       object-fit: contain;
    border-radius: 8px;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    -webkit-user-drag: none;
    cursor: default;
    -webkit-box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    -webkit-transition: background 0.15s, -webkit-transform 0.15s;
    transition: background 0.15s, -webkit-transform 0.15s;
    -o-transition: transform 0.15s, background 0.15s;
    transition: transform 0.15s, background 0.15s;
    transition: transform 0.15s, background 0.15s, -webkit-transform 0.15s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-close:active {
    -webkit-transform: scale(0.9);
        -ms-transform: scale(0.9);
            transform: scale(0.9);
}

/* Плавное появление */
.fade-enter-active,
.fade-leave-active {
    -webkit-transition: opacity 0.2s ease;
    -o-transition: opacity 0.2s ease;
    transition: opacity 0.2s ease;
}
.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    overflow: hidden;
    -ms-touch-action: none;
        touch-action: none;              /* отключаем встроенный скролл */
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}

.lightbox-stage {
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    cursor: -webkit-zoom-in;
    cursor: zoom-in;
    overflow: hidden;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    -o-object-fit: contain;
       object-fit: contain;
    -webkit-transition: -webkit-transform 0.15s ease-out;
    transition: -webkit-transform 0.15s ease-out;
    -o-transition: transform 0.15s ease-out;
    transition: transform 0.15s ease-out;
    transition: transform 0.15s ease-out, -webkit-transform 0.15s ease-out;
    -webkit-transform-origin: center center;
        -ms-transform-origin: center center;
            transform-origin: center center;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    will-change: transform;
}

.lightbox-image.is-dragging {
    -webkit-transition: none;
    -o-transition: none;
    transition: none;                /* без задержки при перетаскивании */
}

.lightbox-close {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
}

.lightbox-zoom-hint {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 50%;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

/* Плавное появление */
.fade-enter-active,
.fade-leave-active {
    -webkit-transition: opacity 0.2s;
    -o-transition: opacity 0.2s;
    transition: opacity 0.2s;
}
.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* Кнопка председателя */
.pin-fab {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #007bff;
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    -webkit-box-shadow: 0 4px 16px rgba(0, 123, 255, 0.4);
            box-shadow: 0 4px 16px rgba(0, 123, 255, 0.4);
    z-index: 1000;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}
.pin-fab:active { -webkit-transform: scale(0.94); -ms-transform: scale(0.94); transform: scale(0.94); }

/* Панель закрепления */
.pin-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 80px;
    background: #fff;
    border-radius: 16px;
    -webkit-box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    padding: 16px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 12px;
    max-height: 80vh;
}
.pin-panel__header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    font-weight: 600;
    font-size: 16px;
}
.pin-panel__header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #000;
}
.pin-panel textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    resize: none;
    font-family: inherit;
    font-size: 15px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    color: #000;
}
.pin-panel__label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}
.pin-panel__chats {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    overflow-y: auto;
    max-height: 40vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}
.pin-chat-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    background: #f7f9fb;
    -webkit-transition: background 0.15s;
    -o-transition: background 0.15s;
    transition: background 0.15s;
}
.pin-chat-item.is-selected {
    background: #e0f2fe;
}
.pin-chat-item input {
    accent-color: #007bff;
}
.pin-existing-badge {
    margin-left: auto;
    font-size: 14px;
}
.pin-panel__footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
        -ms-flex-pack: end;
            justify-content: flex-end;
}

/* Стикер в списке */
.pin-sticker {
    display: inline-block;
    font-size: 14px;
    margin-right: 4px;
    color: #f5a623;
}

/* ========== КОРЕНЬ БАННЕРА ========== */
.pinned-banner {
    position: relative;                /* 👈 ОБЯЗАТЕЛЬНО для absolute крестика */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    background: #fffbe6;
    border-bottom: 1px solid #f0e0a0;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    font-size: 14px;
}

/* ========== КРЕСТИК — правый верхний угол ========== */
.pinned-banner__unpin {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #999;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
    -webkit-transition: background 0.15s, color 0.15s;
    -o-transition: background 0.15s, color 0.15s;
    transition: background 0.15s, color 0.15s;
}
.pinned-banner__unpin:hover {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.pin-panel__select-all {
    background: none;
    border: none;
    color: #007bff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    -webkit-transition: background 0.15s;
    -o-transition: background 0.15s;
    transition: background 0.15s;
}

.pin-panel__select-all:hover {
    background: rgba(0, 123, 255, 0.08);
}

.pin-panel__chats {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    min-height: 0;
    max-height: 40vh;               /* 👈 скролл при большом списке */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 4px;
    padding-right: 4px;             /* место под скроллбар */
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 6px;
}

/* Скрываем полосу прокрутки (опционально) */
.pin-panel__chats::-webkit-scrollbar {
    width: 4px;
}
.pin-panel__chats::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.pin-chat-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    background: #f7f9fb;
    -webkit-transition: background 0.15s;
    -o-transition: background 0.15s;
    transition: background 0.15s;
    font-size: 14px;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

.pin-chat-item.is-selected {
    background: #e0f2fe;
}

.pin-chat-item input {
    accent-color: #007bff;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

.pin-chat-item__title {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
       text-overflow: ellipsis;
    color: #000;
}

.pin-chat-item .pin-existing-badge {
    -ms-flex-negative: 0;
        flex-shrink: 0;
    color: #f5a623;
    font-size: 13px;
}

.pin-chat-empty {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 20px 0;
}

.pin-chat-item--general {
    background: #eef6ff;
    font-weight: 600;
}
.pin-panel__divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

/* ========== ШАПКА ========== */
.pinned-banner__header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
    gap: 10px;
    padding: 8px 40px 8px 12px;         /* 👈 справа 40px — место под крестик */
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pinned-banner__icon {
    font-size: 16px;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    color: #f5a623;
    line-height: 1.4;
}

.pinned-banner__content {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    min-width: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 2px;
}

.pinned-banner__label {
    font-size: 11px;
    color: #b8860b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.pinned-banner__preview {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
       text-overflow: ellipsis;
    line-height: 1.4;
}

.pinned-banner__body {
    -webkit-animation: pinned-slide-down 0.15s ease-out;
            animation: pinned-slide-down 0.15s ease-out;
}

.pinned-banner__text {
    color: #333;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 40vh;
    overflow-y: auto;
}

.pinned-banner__meta {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
/* ========== СТРЕЛКА — внизу, по центру ========== */
.pinned-banner__arrow {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 4px;
    line-height: 1;
    -webkit-transition: -webkit-transform 0.15s;
    transition: -webkit-transform 0.15s;
    -o-transition: transform 0.15s;
    transition: transform 0.15s;
    transition: transform 0.15s, -webkit-transform 0.15s;
}

@-webkit-keyframes pinned-slide-down {
    from { opacity: 0; -webkit-transform: translateY(-4px); transform: translateY(-4px); }
    to   { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@keyframes pinned-slide-down {
    from { opacity: 0; -webkit-transform: translateY(-4px); transform: translateY(-4px); }
    to   { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}


/* FAB управления закреплениями */
.pin-manage-fab {
    position: fixed;
    right: 20px;
    bottom: 150px;                /* выше кнопки создания */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f5a623;
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
    -webkit-box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
            box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
    z-index: 1000;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.pin-manager-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: end;
        -ms-flex-align: end;
            align-items: flex-end;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.pin-manager {
    background: #fff;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-animation: slide-up 0.2s ease-out;
            animation: slide-up 0.2s ease-out;
    margin-bottom: 75px;
}

@-webkit-keyframes slide-up {
    from { -webkit-transform: translateY(100%); transform: translateY(100%); }
    to { -webkit-transform: translateY(0); transform: translateY(0); }
}

@keyframes slide-up {
    from { -webkit-transform: translateY(100%); transform: translateY(100%); }
    to { -webkit-transform: translateY(0); transform: translateY(0); }
}

.pin-manager__header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 16px;
}
.pin-manager__header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.pin-manager__list {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 10px;
}

.pin-manager__empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.pin-manager__item {
    background: #fffbe6;
    border: 1px solid #f0e0a0;
    border-radius: 12px;
    padding: 12px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 6px;
}

.pin-manager__item-head {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: baseline;
        -ms-flex-align: baseline;
            align-items: baseline;
    gap: 8px;
}
.pin-manager__item-head strong {
    font-size: 15px;
    color: #333;
}
.pin-manager__item-head small {
    color: #999;
    font-size: 11px;
}

.pin-manager__item-text {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.pin-manager__item-meta {
    font-size: 11px;
    color: #999;
}
.pin-manager__item-until {
    color: #d35400;
    font-weight: 600;
}

.pin-manager__item-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
        -ms-flex-pack: end;
            justify-content: flex-end;
    margin-top: 4px;
}

.pin-manager__btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    -webkit-transition: background 0.15s;
    -o-transition: background 0.15s;
    transition: background 0.15s;
}
.pin-manager__btn--danger {
    background: #ffe9e9;
    color: #dc3545;
}
.pin-manager__btn--danger:hover {
    background: #ffd6d6;
}

.pin-panel__date {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 6px;
}
.pin-panel__date-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}
.pin-panel__date-options {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 6px;
}
.pin-panel__date-option {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    background: #f7f9fb;
    -webkit-transition: all 0.15s;
    -o-transition: all 0.15s;
    transition: all 0.15s;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    color: #000;
}
.pin-panel__date-option.is-selected {
    background: #e0f2fe;
    border-color: #007bff;
    color: #0056b3;
    font-weight: 600;
}

.pin-panel__date-option input {
    display: none;
}

.pin-panel__custom-date {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    padding: 10px;
    background: #f7f9fb;
    border-radius: 10px;
}

.pin-panel__custom-date label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.pin-panel__date-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    color: #000;
    background: #fff;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    font-family: inherit;
}

.pin-panel__date-input:focus {
    outline: none;
    border-color: #007bff;
    -webkit-box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.DetailProfile {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    .top-header-profile {
        .top-navigator {}
    }
    .content-profile {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
            -ms-flex-direction: row;
                flex-direction: row;
        background: #fff;
        position: relative;
    }
}
.chat-app-desktop {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: white;
}
/* === Кнопка-иконка === */
.shc-btn {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 6px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    -webkit-transition: background .15s, color .15s;
    -o-transition: background .15s, color .15s;
    transition: background .15s, color .15s;
}
.shc-btn:hover  { background: #e2e8f0; color: #2563eb; }
.shc-btn:active { -webkit-transform: scale(.95); -ms-transform: scale(.95); transform: scale(.95); }

.shc-btn.shc-btn--compact {
    width: 22px;
    height: 22px;
    margin-left: 8px;
    vertical-align: middle;
}

/* === Оверлей === */
.shc-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, .45);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    padding: 16px;
}

/* === Модалка === */
.shc-modal {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    -webkit-box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
            box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
    -webkit-animation: shcIn .18s ease-out;
            animation: shcIn .18s ease-out;
}
@-webkit-keyframes shcIn {
    from { opacity: 0; -webkit-transform: translateY(8px) scale(.98); transform: translateY(8px) scale(.98); }
    to   { opacity: 1; -webkit-transform: none; transform: none; }
}
@keyframes shcIn {
    from { opacity: 0; -webkit-transform: translateY(8px) scale(.98); transform: translateY(8px) scale(.98); }
    to   { opacity: 1; -webkit-transform: none; transform: none; }
}

.shc-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.shc-title     { font-weight: 600; font-size: 16px; color: #0f172a; }
.shc-title-sub { font-weight: 400; color: #64748b; }
.shc-close {
    border: none; background: transparent; font-size: 22px; line-height: 1;
    color: #94a3b8; cursor: pointer; padding: 0 4px;
}
.shc-close:hover { color: #0f172a; }

.shc-body   { padding: 20px; }
.shc-center { text-align: center; padding: 24px; }

.shc-user   { display: -webkit-box; display: -ms-flexbox; display: flex; gap: 14px; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; margin-bottom: 20px; }
.shc-avatar {
    -webkit-box-flex: 0;
        -ms-flex: 0 0 48px;
            flex: 0 0 48px; width: 48px; height: 48px;
    border-radius: 50%;
    background: -o-linear-gradient(315deg, #3b82f6, #6366f1);
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff; font-weight: 600;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
    font-size: 16px; letter-spacing: .5px;
}
.shc-info  { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
.shc-fio   { font-weight: 600; font-size: 15px; color: #0f172a; margin-bottom: 4px; }
.shc-meta  { font-size: 13px; color: #64748b; line-height: 1.5; word-break: break-word; }

.shc-actions { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; gap: 8px; }
.shc-action {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
    padding: 10px 14px; border-radius: 8px;
    font-size: 14px; font-weight: 500;
    text-decoration: none !important;
    border: 1px solid transparent; cursor: pointer;
    -webkit-transition: background .15s, color .15s, border-color .15s;
    -o-transition: background .15s, color .15s, border-color .15s;
    transition: background .15s, color .15s, border-color .15s;
}
.shc-action:disabled { opacity: .6; cursor: not-allowed; }
.shc-call { background: #16a34a; color: #fff; }
.shc-call:hover { background: #15803d; color: #fff; }
.shc-chat { background: #2563eb; color: #fff; }
.shc-chat:hover:not(:disabled) { background: #1d4ed8; color: #fff; }
.shc-mail { background: #fff; color: #334155; border-color: #cbd5e1; }
.shc-mail:hover { background: #f8fafc; color: #0f172a; }

.shc-empty {
    padding: 16px; text-align: center;
    color: #64748b; font-size: 14px;
    background: #f8fafc; border-radius: 8px;
}

/* === Заголовок чата в шапке === */
.chat-title {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 4px;
    max-width: 60vw;
    overflow: hidden;
    -o-text-overflow: ellipsis;
       text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

/* === Строка «название + иконка» в списке чатов === */
.chat-title-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 6px;
    min-width: 0;
}
.chat-title-text {
    overflow: hidden;
    -o-text-overflow: ellipsis;
       text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
}
.chat-title-row .shc-btn { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; }

@media (max-width: 480px) {
    .shc-btn.shc-btn--compact { width: 20px; height: 20px; margin-left: 0; }
    .shc-btn.shc-btn--compact svg { width: 14px; height: 14px; }
    .chat-title-row { gap: 4px; }
}
.loader-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.6);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    z-index: 10000;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #ddd;
    border-top-color: #3498db;
    border-radius: 50%;
    -webkit-animation: spin 1s linear infinite;
            animation: spin 1s linear infinite;
}
@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
#ajax_android_forgot {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    min-height: 70vh;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}
.slide-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
        -ms-flex-pack: end;
            justify-content: flex-end;
}
.slide-panel {
    background: white;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-shadow: -2px 0 10px rgba(0,0,0,0.1);
            box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}
.slide-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 12px;
    font-weight: 600;
}
.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}
.slide-panel-body {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.slide-fade-enter-active, .slide-fade-leave-active {
    -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
    transition: opacity 0.3s, -webkit-transform 0.3s;
    -o-transition: opacity 0.3s, transform 0.3s;
    transition: opacity 0.3s, transform 0.3s;
    transition: opacity 0.3s, transform 0.3s, -webkit-transform 0.3s;
}
.slide-fade-enter-from, .slide-fade-leave-to {
    opacity: 0;
    -webkit-transform: translateX(20px);
        -ms-transform: translateX(20px);
            transform: translateX(20px);
}
.chat-list {
    width: 350px;
    border-right: 1px solid #ddd;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    height: 100%;
    background: #f8f9fa;
    .general-message {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
            -ms-flex-direction: row;
                flex-direction: row;
        gap: 20px;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        color: #000;

        .icon {
            .f-circle {
                background-color: #e0f2fe;
                font-size: 28px;
                border-radius: 50%;
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-pack: center;
                -ms-flex-pack: center;
                justify-content: center;
                -webkit-box-align: center;
                -ms-flex-align: center;
                align-items: center;
                min-width: 48px;
                min-height: 48px;
                .letter {
                    color: #0169a3;
                    cursor: default;
                    text-transform: uppercase;
                    font-weight: 700;
                    font-size: 20px;
                }
            }
        }
        .header-top-message {
            -ms-flex-preferred-size: 73px;
                flex-basis: 73px;
            -webkit-box-orient: horizontal;
            -webkit-box-direction: normal;
                -ms-flex-direction: row;
                    flex-direction: row;
            display: inherit;
            gap: 10px;
            -webkit-box-align: center;
                -ms-flex-align: center;
                    align-items: center;
            -webkit-box-pack: end;
                -ms-flex-pack: end;
                    justify-content: end;
            .time {
                font-size: 11px;
                color: darkgray;
            }
        }
    }
}
.chat-list-header {
    padding: 16px;
    border-bottom: 1px solid #ddd;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    background: white;
}
.chat-list-header h3 { margin: 0; }
.new-chat-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
}
.chat-list-items {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    overflow-y: auto;
}
.chat-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    -webkit-transition: background 0.2s;
    -o-transition: background 0.2s;
    transition: background 0.2s;
    position: relative;
}
.chat-item:hover { background: #e9ecef; }
.chat-item.active { background: #dee2e6; }
.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    -o-object-fit: cover;
       object-fit: cover;
}
.chat-info {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    min-width: 0;
}
.chat-title {
    font-weight: 600;
    font-size: 14px;
}
.chat-last-message {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
       text-overflow: ellipsis;
}
.typing-status {
    color: #28a745;
    font-style: italic;
}
.unread-badge {
    background: #007bff;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
}
.chat-area {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    height: 100%; /* занимает всю высоту родителя (слайдера) */
    width: 100%;
    background: #fff;
    overflow: hidden; /* чтобы ничего не вылезало */
}

.chat-header {
    -ms-flex-negative: 0;
        flex-shrink: 0; /* не сжимается */
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.messages-container {
    -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
            flex: 1 1 auto;
    min-height: 0; /* критично для сжатия */
    overflow-y: auto;
    padding: 16px 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 8px;
    background: #fff;
}

.composer-desktop {
    -ms-flex-negative: 0;
        flex-shrink: 0;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    padding: 8px 16px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    /* если внутри есть textarea и кнопки, они будут в отдельном flex-контейнере */
}
.actions-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
    line-height: 1;
    -webkit-transition: color 0.2s;
    -o-transition: color 0.2s;
    transition: color 0.2s;
}
.actions-btn:hover {
    color: #333;
}
.context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 6px 0;
    min-width: 160px;
    width: 500px;
    z-index: 1000;
}
.context-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    -webkit-transition: background 0.15s;
    -o-transition: background 0.15s;
    transition: background 0.15s;
}
.context-menu button:hover {
    background: #f0f0f0;
}

.context-menu .reaction-picker {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}
.reaction-option {
    font-size: 24px;
    cursor: pointer;
    -webkit-transition: -webkit-transform 0.1s;
    transition: -webkit-transform 0.1s;
    -o-transition: transform 0.1s;
    transition: transform 0.1s;
    transition: transform 0.1s, -webkit-transform 0.1s;
    padding: 4px;
}
.reaction-option:hover {
    -webkit-transform: scale(1.4);
        -ms-transform: scale(1.4);
            transform: scale(1.4);
}
.menu-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

/* Активная реакция (уже поставлена текущим пользователем) */
.emoji-item.is-active {
    background: #e0f2fe;
    border-radius: 8px;
    -webkit-box-shadow: inset 0 0 0 2px #3bc8f5;
            box-shadow: inset 0 0 0 2px #3bc8f5;
}

/* === Нижний блок: список реакций === */
.reactions-details {
    border-top: 1px solid #eee;
    padding: 10px 4px 4px;
    max-height: 180px;
    overflow-y: auto;
}

.reactions-details-header {
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.reaction-details-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 8px;
    -webkit-transition: background 0.15s;
    -o-transition: background 0.15s;
    transition: background 0.15s;
}

.reaction-details-row:hover {
    background: #f7f9fb;
}

.reaction-details-emoji {
    font-size: 20px;
    line-height: 1;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

.reaction-details-count {
    background: #f0f0f0;
    color: #555;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

.reaction-details-users {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 4px;
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    min-width: 0;
    -webkit-box-pack: end;
        -ms-flex-pack: end;
            justify-content: flex-end;
}

.reaction-details-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    border: 1.5px solid #fff;
    -webkit-box-shadow: 0 0 0 1px #e0e0e0;
            box-shadow: 0 0 0 1px #e0e0e0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.reaction-details-avatar img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
}

.reaction-details-avatar .placeholder {
    width: 100%;
    height: 100%;
    background: #007bff;
    color: #fff;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.reaction-details-more {
    font-size: 11px;
    color: #666;
    font-weight: 600;
    margin-left: 2px;
}

.reaction-details-names {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    -o-text-overflow: ellipsis;
       text-overflow: ellipsis;
    margin-left: auto;
    padding-left: 8px;
}
.voice-recorder-container {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    margin-left: 8px;
}
.voice-record-btn,
.send-btn,
.cancel-btn,
.stop-btn {
    background: #f0f2f5;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-transition: background 0.2s;
    -o-transition: background 0.2s;
    transition: background 0.2s;
}
.voice-record-btn:hover,
.send-btn:hover,
.cancel-btn:hover,
.stop-btn:hover {
    background: #e4e6eb;
}
.recorder-panel {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 12px;
    background: #ffffff;
    border-radius: 24px;
    padding: 4px 12px;
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.recorder-timer {
    font-size: 14px;
    font-family: monospace;
    min-width: 48px;
}
.recorder-wave {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 2px;
    height: 30px;
}
.wave-bar {
    width: 3px;
    background-color: #007bff;
    border-radius: 2px;
    -webkit-transition: height 0.05s linear;
    -o-transition: height 0.05s linear;
    transition: height 0.05s linear;
}
.recorder-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 4px;
}
.send-btn { background: #28a745; color: white; }
.send-btn:hover { background: #218838; }
.cancel-btn { background: #dc3545; color: white; }
.cancel-btn:hover { background: #c82333; }
.stop-btn { background: #ffc107; color: #000; }
.stop-btn:hover { background: #e0a800; }

.custom-audio-player {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 12px;
    background: #f1f3f4;
    border-radius: 32px;
    padding: 8px 16px;
    max-width: 280px;
    -webkit-transition: all 0.2s;
    -o-transition: all 0.2s;
    transition: all 0.2s;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.05);
            box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.custom-audio-player.playing {
    background: #e9ecef;
}

.play-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    border-radius: 50%;
    -webkit-transition: background 0.2s;
    -o-transition: background 0.2s;
    transition: background 0.2s;
}

.play-btn:hover {
    background: rgba(0,0,0,0.05);
}

.progress-container {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    height: 4px;
    background: #ddd;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: #007bff;
    border-radius: 4px;
    width: 0%;
    -webkit-transition: width 0.1s linear;
    -o-transition: width 0.1s linear;
    transition: width 0.1s linear;
}

.time-info {
    font-size: 11px;
    font-family: monospace;
    color: #555;
    min-width: 70px;
    text-align: right;
}
.wave-animation {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 2px;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}
.wave-animation span {
    width: 3px;
    height: 12px;
    background: #007bff;
    -webkit-animation: wave 0.6s infinite ease alternate;
            animation: wave 0.6s infinite ease alternate;
}
.wave-animation span:nth-child(2) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; }
.wave-animation span:nth-child(3) { -webkit-animation-delay: 0.4s; animation-delay: 0.4s; }
@-webkit-keyframes wave {
    from { height: 4px; }
    to { height: 16px; }
}
@keyframes wave {
    from { height: 4px; }
    to { height: 16px; }
}
.composer-desktop {
    border-top: 1px solid #ddd;
    background: #f8f9fa;
    padding: 8px 16px;
}
.reply-indicator {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}
.composer-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 8px;
    -webkit-box-align: end;
        -ms-flex-align: end;
            align-items: flex-end;
}
.composer-row textarea {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 12px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    height: 100px;
}
.composer-row button {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 8px;
}
.send-btn {
    background: #007bff !important;
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 6px;
    width: 200px;
    z-index: 100;
}
.emoji-item {
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    -webkit-transition: -webkit-transform 0.1s;
    transition: -webkit-transform 0.1s;
    -o-transition: transform 0.1s;
    transition: transform 0.1s;
    transition: transform 0.1s, -webkit-transform 0.1s;
}
.emoji-item:hover {
    -webkit-transform: scale(1.3);
        -ms-transform: scale(1.3);
            transform: scale(1.3);
}