html, body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important; /* убираем скролл у страницы */
}
#page-wrapper {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
        -ms-flex-direction: column !important;
            flex-direction: column !important;
    height: 100dvh !important;
    overflow: hidden !important;
}
main {
    -webkit-box-flex: 1 !important;
        -ms-flex: 1 1 auto !important;
            flex: 1 1 auto !important;
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
        -ms-flex-direction: column !important;
            flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
    .panel-header {
        margin: 70px auto 3px !important;
    }
}

section {
    -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;
}
#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 {
    height: 100dvh;          /* или 100vh, если не нужна динамика */
    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;        /* чтобы скроллился только внутренний блок */
    background: url(/local/img/bg1.jpg) left bottom;
    -webkit-touch-callout: none;
    background-color: #fff !important;
    margin-left: 0;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
    color: #fff;
    padding: 0 !important;
    font-size: 15px !important;
    /*max-width: 830px;
    overflow: scroll;*/
    line-height: 21px;
    .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-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;
}
.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%;

    &.msg {
        .msg-text {
            /* Системный стек шрифтов обеспечит поддержку эмодзи */
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            padding: 10px;
            color: #000;
        }
        &.more {
            -webkit-box-pack: start;
                -ms-flex-pack: start;
                    justify-content: flex-start;
            .msg-bubble {
                width: 80%;
                max-width: 80%;
                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%;
                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 {
    -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;
    .msg-attachment {
        .message-file {
            width: inherit;
            video {
                width: 100%;
            }
        }
    }
}

/* Эффект при активном меню */
.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;
}


.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;
}
.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: absolute;
    bottom: 127px;
    background: #fff;
    width: 96%;
    height: 32dvh;
    padding: 2px;
    border-radius: 20px;
    border: #ccc solid 1px;
    img {
        border-radius: 20px;
        height: 100%;
    }
}
.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;

    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);
}


.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: 250px;
}
.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: -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;
}
.mention-container {
    background: white;
    width: 100%;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    max-height: 50vh;
    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: 10001;
    margin-bottom: 80px;
}
.mention-header {
    padding: 12px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    text-align: center;
    background: white;
}
.mention-list {
    overflow-y: auto;
    max-height: 50vh;
    -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 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}
.mention-item:active {
    background: #f5f5f5;
}
.mention-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    -o-object-fit: cover;
       object-fit: cover;
}
.mention-info {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: baseline;
        -ms-flex-align: baseline;
            align-items: baseline;
}
.mention-name {
    font-weight: 500;
    font-size: 16px;
}
.mention-login {
    font-size: 13px;
    color: #666;
}
.mention-empty {
    padding: 20px;
    text-align: center;
    color: #999;
}

/* Адаптация уведомлений Битрикс для мобильных устройств */
@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;
    }
}
.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;
}
.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: 300px;
    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;
            flex: 1;
    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;
}


.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; }
}