/* 
 * BENJFORUM - MESSAGES LIST DARK MODE ULTIMATE FIX
 * This CSS overrides ALL other styles for conversation items
 */

/* === CONTAINER === */
html[data-theme="dark"] .messaging-container,
body[data-theme="dark"] .messaging-container {
    background-color: #0d1117 !important;
}

html[data-theme="dark"] .conversations-sidebar,
body[data-theme="dark"] .conversations-sidebar {
    background-color: #0d1117 !important;
}

/* === CONVERSATION ITEM - MAIN FIX === */
html[data-theme="dark"] .conversation-item,
body[data-theme="dark"] .conversation-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    gap: 12px !important;
    background-color: transparent !important;
    background: transparent !important;
    border-bottom: 1px solid #21262d !important;
    min-height: 70px !important;
    box-sizing: border-box !important;
}

html[data-theme="dark"] .conversation-item:hover,
body[data-theme="dark"] .conversation-item:hover {
    background-color: #161b22 !important;
}

/* === AVATAR === */
html[data-theme="dark"] .conversation-avatar,
body[data-theme="dark"] .conversation-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin: 0 !important;
    border: 2px solid #30363d !important;
    display: block !important;
}

html[data-theme="dark"] .conversation-avatar-placeholder,
body[data-theme="dark"] .conversation-avatar-placeholder {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #D4AF37, #b8962e) !important;
    color: #0d1117 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    margin: 0 !important;
}

/* === INFO BLOCK - CRITICAL === */
html[data-theme="dark"] .conversation-info,
body[data-theme="dark"] .conversation-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    flex: 1 !important;
    min-width: 0 !important;
    background-color: transparent !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 2px !important;
    overflow: hidden !important;
}

/* === NAME ROW === */
html[data-theme="dark"] .conversation-name,
body[data-theme="dark"] .conversation-name {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: transparent !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

html[data-theme="dark"] .conversation-name span:first-child,
body[data-theme="dark"] .conversation-name span:first-child {
    color: #e6edf3 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html[data-theme="dark"] .conversation-time,
body[data-theme="dark"] .conversation-time {
    color: #8b949e !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* === PREVIEW === */
html[data-theme="dark"] .conversation-preview,
body[data-theme="dark"] .conversation-preview {
    color: #8b949e !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
    background-color: transparent !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === SEARCH === */
html[data-theme="dark"] .conversations-search .form-control,
body[data-theme="dark"] .conversations-search .form-control {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #e6edf3 !important;
}

/* === HEADER === */
html[data-theme="dark"] .conversations-header,
body[data-theme="dark"] .conversations-header {
    background-color: #0d1117 !important;
    border-color: #21262d !important;
}

html[data-theme="dark"] .conversations-header h5,
body[data-theme="dark"] .conversations-header h5 {
    color: #e6edf3 !important;
}

/* === OVERRIDE INLINE STYLES === */
html[data-theme="dark"] .conversation-item[style*="background"],
html[data-theme="dark"] .conversation-info[style*="background"],
html[data-theme="dark"] .conversation-name[style*="background"],
html[data-theme="dark"] .conversation-preview[style*="background"] {
    background-color: transparent !important;
    background: transparent !important;
}
