.message-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: contain;
}

.profile-wrapper {
    position: relative;
    display: inline-block;
}
.chat-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.chat-icon {
    width: 64px;
    height: 64px;
    color: #aaa;
    margin-bottom: 1rem;
}

.chat-text {
    font-size: 1.1rem;
    color: #555;
    font-family: 'Segoe UI', sans-serif;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white; /* рамка для лучшего отображения */
}

.status-indicator-left {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white; /* рамка для лучшего отображения */
}

.status-online {
    background-color: #28a745; /* зеленый */
}

.status-offline {
    background-color: #6c757d; /* серый */
}
.reply-to {
    font-size: 0.8rem;
    color: #6c757d;
    border-left: 3px solid #0d6efd;
    padding-left: 0.5rem;
    margin-bottom: 0.3rem;
}

.typing-indicator {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing-indicator .dots span {
    animation: blink 1.5s infinite;
    opacity: 0.2;
    font-weight: bold;
    font-size: 18px;
}

.typing-indicator .dots span:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-indicator .dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 80%, 100% {
        opacity: 0.2;
    }
    40% {
        opacity: 1;
    }
}

.message-container {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    animation: messageFadeIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes messageFadeIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Современный стиль самого сообщения */
.message {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: background 0.3s ease, transform 0.3s ease;
}

.message:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.02);
}

/* размер эмоджи внутри панели */
.emoji-picker__emoji {
    font-size: 1.6em;
}
/* фон панели */
.emoji-picker {
    --emoji-picker-background: #f8f9fa;
}

.chat-message-file {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 100%;
    margin: 8px 0;
}

.file-container {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    border-color: var(--border-color);
    transition: all 0.2s ease;
}

.file-container:hover {
    border-color: var(--border-color);
}

.file-icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.download-button {
    margin-left: 12px;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    transition: all 0.2s ease;
}

.download-button:hover {
    background-color: #eef2ff;
}