.search-icon {
    cursor: pointer;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    text-decoration: none;
    padding-bottom: 4px;
}

.search-icon:hover {
    opacity: 0.7;
}

.search-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.search-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.search-popup.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
}

.search-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    height: auto;
    min-height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease;
}

.search-content.has-results {
    height: auto;
    max-height: 80vh;
}

.search-header {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 8px;
}

#search-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
}

#search-results {
    flex: 1;
    padding: 0;
    min-height: 0;
    display: none;
}

#search-results.has-results {
    display: block;
}

.search-section {
    overflow-y: auto;
    padding: 0;
}

.search-section-exact {
    max-height: 70%;
    border-bottom: 1px solid #e0e0e0;
}

.search-section-fuzzy {
    max-height: 30%;
}

.search-result {
    padding: 0px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    position: relative;
}

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

.search-result-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
}

.search-result-excerpt {
    color: #666;
    font-size: 12px;
    line-height: 1.2;
    text-align: left;
    margin: 0;
}

.search-result-count {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #f0f0f0;
    color: #333;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: normal;
    min-width: 16px;
    text-align: center;
}

.search-result-date {
    position: absolute;
    top: 4px;
    left: 40px;
    color: #666;
    font-size: 10px;
    font-weight: normal;
}

.search-result-index {
    position: absolute;
    top: 4px;
    left: 8px;
    color: #666;
    font-size: 10px;
    font-weight: normal;
}

/* 검색어 하이라이트 스타일 */
.search-result mark {
    background-color: #ffeb3b;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: bold;
}

/* Fuzzy 하이라이트 스타일 */
.search-result mark.fuzzy {
    background-color: #87ceeb;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: bold;
}

/* 섹션 구분 바 */
.search-section-divider {
    background-color: #f5f5f5;
    color: #333;
    font-size: 12px;
    font-weight: bold;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

/* 검색 결과 없음 메시지 */
#search-results>div {
    padding: 10px;
    text-align: center;
    color: #666;
}
