/* Investor Messages - Page-Specific Styles Only */

/* Messages Container */
.messages-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 250px);
}

/* Conversation List */
.conversation-list {
    background: rgba(15, 22, 51, 0.4);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversation-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.conversation-list-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.unread-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.conversation-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.conversation-search input {
    width: 100%;
    padding: 0.5rem;
    background: rgba(15, 22, 51, 0.6);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 0.9rem;
}

.conversation-filters {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.filter-btn {
    padding: 0.4rem 0.75rem;
    background: none;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 6px;
    color: #9ca3af;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
}

.filter-btn.active {
    background: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    color: #60a5fa;
}

.conversations {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(96, 165, 250, 0.05);
    transition: background 0.2s ease;
}

.conversation-item:hover {
    background: rgba(96, 165, 250, 0.05);
}

.conversation-item.active {
    background: rgba(96, 165, 250, 0.1);
    border-left: 3px solid #60a5fa;
}

.conversation-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

.conversation-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    position: relative;
}

.conversation-avatar.entrepreneur {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
}

.conversation-avatar.partner {
    background: linear-gradient(135deg, #ebd1a1, #d4af7a);
    color: #0f1633;
}

.conversation-avatar.admin {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
}

.avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.75rem;
}

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

.conversation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.conversation-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.conversation-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.conversation-preview {
    font-size: 0.85rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

.conversation-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meta-tag {
    padding: 0.15rem 0.5rem;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 4px;
    font-size: 0.7rem;
    color: #9ca3af;
}

.meta-tag.deal {
    background: rgba(235, 209, 161, 0.1);
    color: #ebd1a1;
}

/* Chat Panel */
.chat-panel {
    background: rgba(15, 22, 51, 0.4);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.chat-header-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-header-btn {
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.chat-header-btn:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-date-divider {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 1rem 0;
}

.system-message {
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
    padding: 0.75rem;
    background: rgba(96, 165, 250, 0.05);
    border-radius: 6px;
    margin: 0.5rem 0;
}

.message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.message.outgoing {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
}

.message.outgoing .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-bubble {
    padding: 0.75rem 1rem;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message.outgoing .message-bubble {
    background: rgba(59, 130, 246, 0.2);
}

.message-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-input-actions {
    display: flex;
    gap: 0.5rem;
}

.input-action-btn {
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-action-btn:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(15, 22, 51, 0.6);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 0.9rem;
    resize: none;
    max-height: 120px;
}

.send-btn {
    width: 40px;
    height: 40px;
    background: #60a5fa;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-btn:hover {
    background: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .messages-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .conversation-list {
        max-height: 400px;
    }

    .chat-panel {
        min-height: 500px;
    }

    .message-content {
        max-width: 85%;
    }
}
