/* AJAX Search Suggestions Styles */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: -1px;
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-logo {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

.suggestion-logo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.suggestion-company {
    color: #007bff;
    font-weight: 500;
}

.suggestion-location {
    color: #666;
}

.suggestion-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.suggestion-salary {
    color: #28a745;
    font-weight: 600;
}

.suggestion-time {
    color: #999;
    font-size: 12px;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #999;
}

.search-no-results i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Make search input position relative for absolute positioning of suggestions */
.job-search-wrap {
    position: relative;
}

.job-search-form {
    position: relative;
}

/* Highlight matched text in suggestions */
.highlight {
    background-color: #fff3cd;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-suggestions {
        max-height: 300px;
    }
    
    .search-suggestion-item {
        padding: 10px 12px;
    }
    
    .suggestion-logo,
    .suggestion-logo-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .suggestion-title {
        font-size: 14px;
    }
    
    .suggestion-meta {
        font-size: 12px;
    }
}

/* Scrollbar styling for suggestions list */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #999;
}
