/* Search Container Styles - Only for search functionality, not styling */
.nav-search {
    position: relative;
}

/* Remove any conflicting input styles - let nav.css handle the input appearance */

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

.search-results:empty {
    display: none;
}

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

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

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

.search-result-item.selected {
    background-color: #e3f2fd;
}

.search-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.search-result-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin: 0;
}

.search-result-category {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.search-result-details {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

.search-result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-action-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
}

.search-action-btn i {
    font-size: 11px;
}

/* Navigation specific styles */
.search-result-item[data-type="navigation"] .search-result-category {
    background: #6f42c1;
}

/* Property specific styles */
.search-result-item[data-type="property"] .search-result-category {
    background: #28a745;
}

/* Tenancy specific styles */
.search-result-item[data-type="tenancy"] .search-result-category {
    background: #ffc107;
    color: #212529;
}

/* Resident specific styles */
.search-result-item[data-type="resident"] .search-result-category {
    background: #17a2b8;
}

/* Loading state */
.search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-loading .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* No results state */
.search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-search {
        max-width: 100%;
        margin: 10px 0;
    }
    
    .search-results {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        max-height: 70vh;
    }
    
    .search-result-actions {
        flex-direction: column;
    }
    
    .search-action-btn {
        justify-content: center;
        padding: 6px 12px;
    }
}

/* Search input focus states - minimal styling to avoid conflicts */
.nav-search.focused {
    /* Only add focus class for JavaScript functionality */
}

/* Keyboard navigation styles */
.search-result-item.keyboard-selected {
    background-color: #e3f2fd;
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* Animation for dropdown */
.search-results {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling for search results */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
