/* 계산기 검색 스타일 */

/* 헤더 검색창 스타일 */
#headerCalculatorSearch {
    min-width: 250px;
}

/* 검색 결과 드롭다운 */
.position-relative {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.search-result-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    display: block;
}

.search-result-category {
    font-size: 0.85rem;
    color: #6c757d;
    display: block;
}

/* 모바일 대응 */
@media (max-width: 991.98px) {
    #headerCalculatorSearch {
        width: 100%;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .navbar-nav.me-auto {
        max-width: 100% !important;
    }
}

/* 계산기 카드 호버 효과 */
.calculator-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: #0d6efd;
}

/* 검색 페이지 스타일 */
.search-result-count {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 카테고리 배지 */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: #e7f3ff;
    color: #0d6efd;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 검색창 포커스 효과 */
#calculatorSearch:focus,
#headerCalculatorSearch:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 로딩 애니메이션 */
.search-loading {
    padding: 16px;
    text-align: center;
    color: #6c757d;
}

.search-loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

