/* ========== CHAT MODULE ========== */
.chat-module {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--tg-theme-bg-color, #ffffff);
    overflow: hidden; /* Убираем скролл */
}

/* ========== ПОИСК ========== */
.chat-search-container {
    padding: 12px 16px;
    background: var(--tg-theme-bg-color, #ffffff);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.chat-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.chat-search-icon {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 20px;
    fill: rgba(0, 0, 0, 0.54);
    pointer-events: none;
    z-index: 1;
}

.chat-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 8px;
    font-size: 14px;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-search-input:focus {
    border-color: #1976d2;
    border-width: 2px;
    padding: 9px 11px 9px 39px;
}

.chat-search-input::placeholder {
    color: rgba(0, 0, 0, 0.38);
}

/* ========== СПИСОК КОНТАКТОВ ========== */
.chat-contacts-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Единый динамический отступ под TabBar (см. tabbar.js -> --tabbar-safe-space) */
    padding-bottom: var(--tabbar-safe-space, 100px);
}

/* Запрещаем выделение текста в списке контактов (Android/Telegram WebView) */
#chatContactsList,
#chatContactsList * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.chat-contact-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--tg-theme-bg-color, #ffffff);
}

.chat-contact-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.chat-contact-item.active {
    background-color: rgba(25, 118, 210, 0.1);
}

.chat-contact-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 118, 210, 0.12);
    color: #1976d2;
    font-weight: 500;
    font-size: 18px;
    /* ВАЖНО: badge позиционируется с отрицательным top/right, поэтому overflow должен быть видимым */
    overflow: visible;
}

.chat-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Скругляем аватарку через img, чтобы overflow: visible не ломал форму */
    border-radius: 50%;
    display: block;
}

.chat-contact-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f44336;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    border: 2px solid var(--tg-theme-bg-color, #ffffff);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chat-contact-badge:empty,
.chat-contact-badge[data-count="0"] {
    display: none;
}

.chat-contact-info {
    flex: 1;
    min-width: 0;
}

.chat-contact-name {
    font-size: 16px;
    font-weight: 500;
    color: #2481cc !important;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-contact-company {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== ПЕРЕПИСКА ========== */
.chat-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--tg-theme-bg-color, #ffffff);
    overflow: hidden; /* Убираем скролл */
    min-height: 0; /* Важно для flex */
}

.chat-conversation-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--tg-theme-bg-color, #ffffff);
    /* Закрепляем заголовок вверху */
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0; /* Не сжимается */
}

.chat-back-button {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.chat-back-button:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.chat-back-icon {
    width: 24px;
    height: 24px;
    fill: #2481cc !important;
}

.chat-conversation-user {
    display: flex;
    align-items: center;
    flex: 1;
}

.chat-conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 118, 210, 0.12);
    color: #1976d2;
    font-weight: 500;
    font-size: 16px;
    overflow: hidden;
}

.chat-conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-conversation-info {
    flex: 1;
    min-width: 0;
}

.chat-conversation-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 2px 0;
    color: #2481cc !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conversation-info p {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== СООБЩЕНИЯ ========== */
.chat-messages-container {
    flex: 1;
    overflow-y: auto; /* ТОЛЬКО здесь скролл */
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: 80px; /* Отступ снизу для chat-input-container: высота контейнера (~64px) + запас (16px) */
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0; /* Важно для flex */
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    word-wrap: break-word;
}

.chat-message.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-message.received {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-message-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.sent .chat-message-bubble {
    background: #1976d2;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.received .chat-message-bubble {
    background: rgba(0, 0, 0, 0.08);
    color: #666 !important;
    border-bottom-left-radius: 4px;
}

.chat-message-time {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.54);
    margin-top: 4px;
    padding: 0 4px;
}

/* Карточка системного опроса */
.chat-survey-card {
    padding: 12px;
    border-radius: 8px;
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    color: #1e293b;
    margin-bottom: 8px;
    max-width: 100%;
}

.chat-survey-question {
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.5;
}

.chat-survey-buttons {
    display: flex;
    gap: 8px;
}

.chat-survey-button {
    padding: 6px 16px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    -webkit-tap-highlight-color: transparent;
}

.chat-survey-button-yes {
    background-color: #4caf50;
    color: white;
}

.chat-survey-button-yes:hover {
    background-color: #45a049;
}

.chat-survey-button-yes:active {
    background-color: #3d8b40;
    transform: scale(0.98);
}

.chat-survey-button-no {
    background-color: transparent;
    color: #f44336;
    border: 1px solid #f44336;
}

.chat-survey-button-no:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

.chat-survey-button-no:active {
    background-color: rgba(244, 67, 54, 0.2);
    transform: scale(0.98);
}

/* Карточка системного сообщения о долгом отсутствии ответа */
.chat-no-reply-card {
    padding: 12px;
    border-radius: 8px;
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    color: #1e293b;
    margin-bottom: 8px;
    max-width: 100%;
}

.chat-no-reply-text {
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.5;
}

.chat-no-reply-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-no-reply-contact {
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
}

.chat-no-reply-contact strong {
    font-weight: 600;
    color: #1e293b;
}

/* Модальное окно для оценки пользователя (ответ "Да") */
.chat-survey-rating-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow-y: auto; /* Добавить прокрутку */
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
    padding-bottom: 100px; /* Отступ снизу для клавиатуры и кнопки */
}

.chat-survey-rating-section,
.chat-survey-review-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-survey-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #000000);
    margin: 0;
}

.chat-survey-stars {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-survey-star {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-survey-star:hover {
    transform: scale(1.1);
}

.chat-survey-star:active {
    transform: scale(0.95);
}

.chat-survey-star-icon {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: #ccc;
    stroke-width: 1;
    transition: all 0.2s ease;
}

.chat-survey-star-icon.chat-survey-star-filled {
    fill: #1976d2;
    stroke: none;
}

.chat-survey-star-icon.chat-survey-star-empty {
    fill: none;
    stroke: #ccc;
    stroke-width: 1;
}

.chat-survey-review-wrapper {
    position: relative;
}

.chat-survey-review {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 16px; /* Предотвращает зум на iOS (минимум 16px) */
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    box-sizing: border-box;
}

.chat-survey-review:focus {
    outline: none;
    border-color: #1976d2;
}

.chat-survey-review::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.chat-survey-review-counter {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
}

.chat-survey-review-counter span:last-child {
    font-weight: 500;
}

.chat-survey-review-counter.warning span:last-child {
    color: #f44336;
}

.railway-modal-subtitle {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* Модальное окно для ответа "Нет" */
.chat-survey-no-deal-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-height: 0;
    overflow-y: auto; /* Добавить прокрутку */
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
    padding-bottom: 20px; /* Отступ снизу для клавиатуры */
}

.chat-survey-reasons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-survey-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: var(--tg-theme-bg-color, #ffffff);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.chat-survey-checkbox-label:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
}

.chat-survey-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #1976d2;
    flex-shrink: 0;
}

.chat-survey-checkbox-text {
    font-size: 14px;
    color: var(--tg-theme-text-color, #000000);
    flex: 1;
}

.chat-survey-comment-wrapper {
    margin-top: 8px;
    position: relative; /* Для правильного позиционирования */
}

.chat-survey-comment {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 16px; /* Предотвращает зум на iOS (минимум 16px) */
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    box-sizing: border-box;
}

.chat-survey-comment:focus {
    outline: none;
    border-color: #1976d2;
}

.chat-survey-comment::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Общие стили для кнопок действий в модальных окнах опросов */
.chat-survey-modal-actions {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 16px;
}

.chat-survey-modal-actions .btn {
    min-width: 200px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.chat-survey-modal-actions .btn-primary {
    background: #1976d2;
    color: white;
}

.chat-survey-modal-actions .btn-primary:hover {
    background: #1565c0;
}

.chat-survey-modal-actions .btn-primary:active {
    transform: scale(0.98);
}

.chat-survey-modal-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-survey-modal-actions .btn:disabled:hover {
    background: #1976d2;
}

/* ========== ФОРМА ОТПРАВКИ ========== */
.chat-input-container {
    /* Плавающий контейнер - привязан к низу экрана (TabBar скрыт в переписке) */
    position: fixed;
    bottom: 20px; /* Небольшой отступ от низа экрана (TabBar скрыт) */
    left: 50%;
    transform: translateX(-50%);
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    
    /* Без фона - только элементы */
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    
    /* Безопасная зона для системной навигации */
    padding-bottom: env(safe-area-inset-bottom, 0);
    
    max-width: 90%;
    width: auto;
}

.chat-expand-button {
    /* Плавающая кнопка расширения как TabBar кнопка */
    width: 56px;
    height: 56px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #1976d2;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.chat-expand-button:hover {
    background: #1976d2;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.3);
}

.chat-expand-button:active {
    background: #1565c0;
    transform: scale(0.95);
}

.chat-expand-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: fill 0.2s ease;
}

.chat-message-input {
    /* Плавающее поле ввода как кнопка TabBar */
    min-width: 250px;
    max-width: 450px;
    width: auto;
    height: 56px; /* Высота как у кнопок */
    padding: 0 18px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 28px;
    font-size: 14px;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: white;
    color: var(--tg-theme-text-color, #000000);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 56px; /* Вертикальное выравнивание текста */
    box-sizing: border-box;
}

.chat-message-input:focus {
    border-color: #1976d2;
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.3);
}

.chat-send-button {
    /* Плавающая кнопка как TabBar кнопка */
    width: 56px;
    height: 56px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #1976d2;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.chat-send-button:hover {
    background: #1976d2;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.3);
}

.chat-send-button:active {
    background: #1565c0;
    transform: scale(0.95);
}

.chat-send-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: fill 0.2s ease;
}

/* ========== СОСТОЯНИЯ ЗАГРУЗКИ ========== */
.chat-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: rgba(0, 0, 0, 0.54);
}

.chat-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(25, 118, 210, 0.2);
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.chat-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(0, 0, 0, 0.54);
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 480px) {
    .chat-contact-item {
        padding: 10px 12px;
    }
    
    .chat-contact-avatar {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .chat-message {
        max-width: 85%;
    }
    
    /* На маленьких экранах: TabBar скрыт, input-container привязан к низу */
    .chat-input-container {
        bottom: 16px; /* Небольшой отступ от низа на маленьких экранах */
        gap: 8px;
    }
    
    .chat-message-input {
        min-width: 180px;
        max-width: 280px;
        height: 48px; /* Высота как у кнопок на маленьких экранах */
        padding: 0 16px;
        font-size: 13px;
        line-height: 48px; /* Вертикальное выравнивание текста */
    }
    
    .chat-send-button {
        width: 48px;
        height: 48px;
    }
    
    .chat-send-icon {
        width: 20px;
        height: 20px;
    }
    
    .chat-expand-button {
        width: 48px;
        height: 48px;
    }
    
    .chat-expand-icon {
        width: 20px;
        height: 20px;
    }
    
    .chat-messages-container {
        padding-bottom: 72px; /* Отступ для маленьких экранов: высота input-container (~56px) + запас (16px) */
    }
    
    .chat-contacts-list {
        padding-bottom: var(--tabbar-safe-space, 90px);
    }
}

@media (min-width: 768px) {
    /* На планшетах: TabBar скрыт, input-container привязан к низу */
    .chat-input-container {
        bottom: 24px; /* Небольшой отступ от низа на планшетах */
        gap: 16px;
    }
    
    .chat-message-input {
        min-width: 300px;
        max-width: 550px;
        height: 64px; /* Высота как у кнопок на планшетах */
        line-height: 64px; /* Вертикальное выравнивание текста */
    }
    
    .chat-send-button {
        width: 64px;
        height: 64px;
    }
    
    .chat-send-icon {
        width: 28px;
        height: 28px;
    }
    
    .chat-messages-container {
        padding-bottom: 88px; /* Отступ для планшетов: высота input-container (~72px) + запас (16px) */
    }
    
    .chat-contacts-list {
        padding-bottom: var(--tabbar-safe-space, 120px);
    }
    
    .chat-expand-button {
        width: 64px;
        height: 64px;
    }
    
    .chat-expand-icon {
        width: 28px;
        height: 28px;
    }
}

/* ========== МОДАЛЬНОЕ ОКНО ДЛЯ СООБЩЕНИЙ ========== */
.chat-message-modal-content {
    max-width: 600px !important;
    width: 92% !important;
    text-align: left !important;
    padding: 16px !important;
    max-height: calc(100vh - 48px) !important;
    display: flex !important;
    flex-direction: column !important;
}

.chat-message-modal-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-message-modal-textarea {
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    padding: 12px 16px;
    padding-right: 70px; /* Отступ справа для кнопки */
    padding-bottom: 70px; /* Отступ снизу для кнопки */
    border: 2px solid rgba(0, 0, 0, 0.23);
    border-radius: 12px;
    font-size: 14px;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--tg-theme-bg-color, #ffffff);
    color: var(--tg-theme-text-color, #000000);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease;
    flex: 1;
    overflow-y: auto;
    box-sizing: border-box;
}

.chat-message-modal-textarea:focus {
    border-color: #1976d2;
    border-width: 2px;
}

.chat-message-modal-textarea::placeholder {
    color: rgba(0, 0, 0, 0.38);
}

.chat-message-modal-send-button {
    /* Круглая кнопка отправки внизу справа от textarea */
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9); /* Полупрозрачный белый фон */
    color: #1976d2;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    margin: 0;
    z-index: 10;
    backdrop-filter: blur(10px); /* Эффект размытия для полупрозрачности */
}

.chat-message-modal-send-button:hover {
    background: rgba(25, 118, 210, 0.9); /* Полупрозрачный синий при hover */
    color: white;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.3);
}

.chat-message-modal-send-button:active {
    background: #1565c0;
    transform: scale(0.95);
}

.chat-message-modal-send-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: fill 0.2s ease;
}

@media (max-width: 480px) {
    .chat-message-modal-content {
        width: 96% !important;
        padding: 12px !important;
    }
    
    .chat-message-modal-textarea {
        min-height: 150px;
        max-height: 300px;
        font-size: 13px;
        padding-right: 60px;
        padding-bottom: 60px;
    }
    
    .chat-message-modal-send-button {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }
    
    .chat-message-modal-send-icon {
        width: 18px;
        height: 18px;
    }
}

