/**
 * 멘션(@) 자동완성 스타일
 */

/* 멘션 제안 박스 */
.mention-suggestions {
    position: fixed !important;
    background: #1a1f2e !important;
    border: 1px solid #2c3e50 !important;
    border-radius: 8px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    z-index: 100000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    min-width: 250px !important;
    display: none;
}

/* 스크롤바 스타일 */
.mention-suggestions::-webkit-scrollbar {
    width: 6px;
}

.mention-suggestions::-webkit-scrollbar-track {
    background: #22313f;
}

.mention-suggestions::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.mention-suggestions::-webkit-scrollbar-thumb:hover {
    background: #4a5f7f;
}

/* 멘션 아이템 */
.mention-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(44, 62, 80, 0.3);
}

.mention-item:last-child {
    border-bottom: none;
}

.mention-item:hover,
.mention-item.selected {
    background-color: rgba(52, 73, 94, 0.5);
}

/* 멘션 아바타 */
.mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* 멘션 정보 */
.mention-info {
    flex: 1;
    min-width: 0;
}

.mention-nick {
    color: #ecf0f1;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-name {
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 텍스트 내 멘션 링크 스타일 */
.mention-link {
    color: #fefad4 !important;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.mention-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 해시태그 링크 스타일 */
.hashtag-link {
    color: #f64747 !important;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.hashtag-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .mention-suggestions {
        max-width: calc(100vw - 20px);
        left: 10px !important;
        right: 10px;
        width: auto !important;
    }
    
    .mention-item {
        padding: 12px;
    }
    
    .mention-avatar {
        width: 36px;
        height: 36px;
    }
    
    .mention-nick {
        font-size: 15px;
    }
    
    .mention-name {
        font-size: 13px;
    }
}

/* 다크모드 색상 조정 */
@media (prefers-color-scheme: dark) {
    .mention-suggestions {
        background: #0d1117;
        border-color: #30363d;
    }
    
    .mention-item:hover,
    .mention-item.selected {
        background-color: #161b22;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 로딩 상태 */
.mention-suggestions.loading {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mention-suggestions.loading::after {
    content: '검색 중...';
    color: #7f8c8d;
    font-size: 14px;
}

/* 결과 없음 */
.mention-no-results {
    padding: 15px;
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

/**
 * 해시태그(#) 자동완성 스타일
 */

/* 해시태그 제안 박스 */
.hashtag-suggestions {
    position: fixed !important;
    background: #1a1f2e !important;
    border: 1px solid #2c3e50 !important;
    border-radius: 8px !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    z-index: 100000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    min-width: 200px !important;
    display: none;
}

/* 해시태그 스크롤바 */
.hashtag-suggestions::-webkit-scrollbar {
    width: 6px;
}

.hashtag-suggestions::-webkit-scrollbar-track {
    background: #22313f;
}

.hashtag-suggestions::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.hashtag-suggestions::-webkit-scrollbar-thumb:hover {
    background: #4a5f7f;
}

/* 해시태그 아이템 */
.hashtag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(44, 62, 80, 0.3);
}

.hashtag-item:last-child {
    border-bottom: none;
}

.hashtag-item:hover,
.hashtag-item.selected {
    background-color: rgba(52, 73, 94, 0.5);
}

/* 해시태그 텍스트 */
.hashtag-text {
    color: #f64747;
    font-weight: 500;
    font-size: 14px;
}

/* 해시태그 카운트 */
.hashtag-count {
    color: #7f8c8d;
    font-size: 12px;
    margin-left: 10px;
}

/* 해시태그 로딩 */
.hashtag-suggestions.loading {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hashtag-suggestions.loading::after {
    content: '태그 검색 중...';
    color: #7f8c8d;
    font-size: 14px;
}

/* 해시태그 결과 없음 */
.hashtag-no-results {
    padding: 15px;
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

/* 해시태그 애니메이션 */
.hashtag-suggestions {
    animation: fadeIn 0.2s ease-out;
}

/* 모바일 해시태그 최적화 */
@media (max-width: 768px) {
    .hashtag-suggestions {
        max-width: calc(100vw - 20px);
        left: 10px !important;
        right: 10px;
        width: auto !important;
    }
    
    .hashtag-item {
        padding: 12px;
    }
    
    .hashtag-text {
        font-size: 15px;
    }
    
    .hashtag-count {
        font-size: 13px;
    }
}