/* 검색 결과 드롭다운 스타일 */

/* 검색 아이콘 버튼 */
.__search-icon-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s ease;
    z-index: 10;
}

.__search-icon-btn:hover {
    color: #000;
}

.__search-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* 검색 결과 드롭다운 */
.__search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.__search-results-dropdown.__active {
    max-height: 500px;
    opacity: 1;
}

/* 드롭다운 헤더 */
.__dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 12px 12px 0 0;
}

.__result-count {
    font-size: 14px;
    color: #666;
}

.__result-count strong {
    color: #2563eb;
    font-weight: 600;
}

/* 드롭다운 리스트 */
.__dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.__dropdown-item {
    border-bottom: 1px solid #f0f0f0;
}

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

.__dropdown-item a {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.__dropdown-item a:hover {
    background: #f8f9fa;
}

/* 아이템 콘텐츠 */
.__item-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.__item-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
}

.__item-title mark {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 4px;
    border-radius: 3px;
}

.__item-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.__item-category {
    display: inline-block;
    padding: 4px 12px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    border-radius: 12px;
    font-weight: 500;
    margin-top: 4px;
}

/* 빈 결과 */
.__dropdown-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.__dropdown-empty svg {
    margin: 0 auto 16px;
    color: #ccc;
}

.__dropdown-empty p {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin: 0 0 8px;
}

.__dropdown-empty small {
    font-size: 14px;
    color: #999;
}

/* 에러 메시지 */
.__dropdown-error {
    padding: 24px 20px;
    text-align: center;
}

.__dropdown-error p {
    font-size: 16px;
    font-weight: 600;
    color: #dc2626;
    margin: 0 0 8px;
}

.__dropdown-error small {
    font-size: 14px;
    color: #991b1b;
}

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

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* 스크롤바 스타일링 */
.__dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.__dropdown-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.__dropdown-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.__dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .__search-results-dropdown {
        max-height: 0;
    }
    
    .__search-results-dropdown.__active {
        max-height: 400px;
    }
    
    .__dropdown-list {
        max-height: 300px;
    }
    
    .__item-title {
        font-size: 15px;
    }
    
    .__item-description {
        font-size: 13px;
    }
}
