/* Inline Search Container */
.search-container {
    position: relative;
    margin-left: auto;
    margin-right: 20px;
    max-width: 300px;
    flex: 1;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.2s;
}

.search-box:focus-within {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-icon {
    color: #666;
    margin-right: 8px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    min-width: 150px;
}

.search-input::placeholder {
    color: #999;
}

.search-shortcut {
    font-size: 11px;
    color: #999;
    font-family: monospace;
    margin-left: 8px;
    padding: 2px 6px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.search-box:focus-within .search-shortcut {
    display: none;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    padding: 8px;
}

.search-result-item {
    display: block;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
    margin-bottom: 4px;
}

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

.search-result-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.search-result-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.search-result-date {
    white-space: nowrap;
}

.search-tag {
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.search-no-results {
    padding: 40px;
    text-align: center;
    color: #999;
}

/* Highlight matches */
mark {
    background-color: #fff3cd;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* Header adjustments for search */
header .wrapper {
    display: flex;
    align-items: center;
}

header nav {
    margin-right: 20px;
}

@media (max-width: 768px) {
    .search-container {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        max-width: none;
        margin: 0;
        z-index: 999;
    }

    .search-shortcut {
        display: none;
    }

    .search-results {
        max-height: 300px;
    }
}