/* ============================================
   SEARCH.CSS - Search Bar & Results
   ============================================ */

.search-container {
    position: sticky;
    top: 92px; /* header height: 44px logo + 24px padding top + 24px padding bottom */
    z-index: calc(var(--z-sticky) - 1);
    margin: var(--space-lg) 0;
    background: var(--bg-primary);
    padding-bottom: var(--space-xs);
}

#searchInput {
    width: 100%;
    padding: var(--space-md) 40px var(--space-md) 48px;
    font-size: 16px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

#searchInput:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-search-wrap {
    position: relative;
    margin-bottom: var(--space-md);
}

.filter-search-wrap input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.filter-search-wrap input:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.filter-search-wrap .filter-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    line-height: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

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

.search-result-item {
    padding: var(--space-md);
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

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