/* DM Panel Styles */

.dm-panel-body {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dm-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* Inbox Sidebar */
.dm-inbox-sidebar {
    width: 300px;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
}

.dm-search-bar {
    padding: 15px;
    position: relative;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.dm-search-input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    color: rgba(212, 175, 55, 0.9);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.dm-search-input:focus {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(0, 0, 0, 0.4);
}

.dm-search-bar .search-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.5;
}

.dm-conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

/* Conversation Item */
.dm-conversation-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
    position: relative;
}

.dm-conversation-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.dm-conversation-item.active {
    background: rgba(212, 175, 55, 0.15);
    border-left: 3px solid rgba(212, 175, 55, 0.8);
}

.dm-conversation-item.unread {
    background: rgba(212, 175, 55, 0.05);
}

.dm-conversation-avatar {
    position: relative;
    margin-right: 12px;
}

.dm-conversation-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.dm-conversation-avatar .online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #4ade80;
    border: 2px solid #000;
    border-radius: 50%;
}

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

.dm-conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.dm-conversation-name {
    color: rgba(212, 175, 55, 1);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-conversation-time {
    color: rgba(186, 166, 116, 0.6);
    font-size: 12px;
    white-space: nowrap;
}

.dm-conversation-preview {
    color: rgba(186, 166, 116, 0.7);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-unread-badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(212, 175, 55, 0.9);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Conversation View */
.dm-conversation-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.1);
}

.dm-conversation-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

.dm-conversation-participant {
    display: flex;
    align-items: center;
}

.dm-participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.3);
    margin-right: 12px;
}

.dm-participant-info {
    flex: 1;
}

.dm-participant-name {
    color: rgba(212, 175, 55, 1);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.dm-participant-status {
    color: rgba(186, 166, 116, 0.7);
    font-size: 13px;
}

/* Messages Container */
.dm-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.dm-message {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-end;
}

.dm-message.own {
    flex-direction: row-reverse;
}

.dm-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.2);
    margin: 0 8px;
    flex-shrink: 0;
}

.dm-message-avatar-spacer {
    width: 48px;
    flex-shrink: 0;
}

.dm-message-bubble {
    max-width: 60%;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.dm-message.own .dm-message-bubble {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.3);
}

.dm-message-content {
    color: rgba(212, 175, 55, 0.95);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.dm-message-time {
    color: rgba(186, 166, 116, 0.5);
    font-size: 11px;
    margin-top: 4px;
}

/* Input Container */
.dm-input-container {
    padding: 15px 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.dm-message-input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    color: rgba(212, 175, 55, 0.9);
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 150px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.dm-message-input:focus {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(0, 0, 0, 0.4);
}

.dm-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.8), rgba(186, 166, 116, 0.8));
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dm-send-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 1), rgba(186, 166, 116, 1));
    transform: scale(1.05);
}

.dm-send-btn:active {
    transform: scale(0.95);
}

/* Empty State */
.dm-messages-container .empty-state,
.dm-conversations-list .empty-state,
.dm-conversation-view .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(186, 166, 116, 0.6);
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(212, 175, 55, 0.7);
}

.empty-state-subtext {
    font-size: 14px;
    color: rgba(186, 166, 116, 0.5);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(212, 175, 55, 0.7);
}

/* Header */
.dm-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unread-badge {
    background: rgba(212, 175, 55, 0.9);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.dm-header-controls {
    display: flex;
    gap: 8px;
}

/* Scrollbar Styling */
.dm-conversations-list::-webkit-scrollbar,
.dm-messages-container::-webkit-scrollbar {
    width: 6px;
}

.dm-conversations-list::-webkit-scrollbar-track,
.dm-messages-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.dm-conversations-list::-webkit-scrollbar-thumb,
.dm-messages-container::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.dm-conversations-list::-webkit-scrollbar-thumb:hover,
.dm-messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .dm-inbox-sidebar {
        width: 100%;
        border-right: none;
    }

    .dm-conversation-view {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
        display: none;
    }

    .dm-conversation-view.active {
        display: flex;
    }

    .dm-message-bubble {
        max-width: 80%;
    }
}
