/* Mentions CSS - User @-Markierungen Styling */

/* Mention Links */
.mention-link {
    color: var(--primary-color, #667eea);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.mention-link:hover {
    color: var(--primary-hover, #5568d3);
    background-color: rgba(102, 126, 234, 0.1);
    text-decoration: none;
}

.mention-link:visited {
    color: var(--primary-color, #667eea);
}

/* Highlighted Mentions (optional) */
.mention-link.mention-highlighted {
    background-color: rgba(102, 126, 234, 0.15);
    font-weight: 700;
}

/* Mention Autocomplete Dropdown */
.mention-autocomplete-dropdown {
    position: absolute;
    background: var(--background-primary, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
}

.mention-autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.mention-autocomplete-dropdown::-webkit-scrollbar-track {
    background: var(--background-secondary, #f5f5f5);
    border-radius: 4px;
}

.mention-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb, #ccc);
    border-radius: 4px;
}

.mention-autocomplete-dropdown:hover::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-hover, #aaa);
}

/* Mention Autocomplete Item */
.mention-autocomplete-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    gap: 10px;
}

.mention-autocomplete-item:hover,
.mention-autocomplete-item.selected {
    background-color: var(--hover-color, #f5f5f5);
}

.mention-autocomplete-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.mention-autocomplete-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Mention Avatar */
.mention-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mention-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color, #667eea);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* Mention User Info */
.mention-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.mention-display-name {
    font-weight: 600;
    color: var(--text-primary, #333);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-username {
    color: var(--text-secondary, #666);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mention-link {
        color: var(--primary-color-dark, #818cf8);
    }
    
    .mention-link:hover {
        color: var(--primary-hover-dark, #a5b4fc);
        background-color: rgba(129, 140, 248, 0.1);
    }
    
    .mention-autocomplete-dropdown {
        background: var(--background-primary-dark, #1f1f1f);
        border-color: var(--border-color-dark, #333);
    }
    
    .mention-autocomplete-item:hover,
    .mention-autocomplete-item.selected {
        background-color: var(--hover-color-dark, #2a2a2a);
    }
    
    .mention-display-name {
        color: var(--text-primary-dark, #e0e0e0);
    }
    
    .mention-username {
        color: var(--text-secondary-dark, #aaa);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mention-autocomplete-dropdown {
        max-height: 250px;
    }
    
    .mention-autocomplete-item {
        padding: 12px;
    }
    
    .mention-avatar,
    .mention-avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Animation für Dropdown */
@keyframes mention-dropdown-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mention-autocomplete-dropdown {
    animation: mention-dropdown-fadeIn 0.2s ease-out;
}

/* Anker-Container für absolute Positionierung des Mention-Dropdowns */
.create-post,
.comment-input-container {
    position: relative;
}

