/* Smart Search Component Styles */
.smart-search-container {
    position: relative;
}

.smart-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.smart-search-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.smart-search-item:hover,
.smart-search-item.selected {
    background-color: #f8f9fa;
}

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

.smart-search-item-content {
    display: flex;
    flex-direction: column;
}

.smart-search-item-main {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.smart-search-item-text {
    font-weight: 500;
    color: #212529;
}

.smart-search-item-text strong {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.1em 0.2em;
    border-radius: 0.2em;
}

.smart-search-item-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    margin-left: 1.5rem;
}

.smart-search-loading {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    z-index: 1000;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.smart-search-error {
    padding: 0.75rem 1rem;
    color: #dc3545;
    font-size: 0.875rem;
    text-align: center;
}

/* Focus and interaction states */
.smart-search:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.smart-search-open .smart-search {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .smart-search-suggestions {
        left: 0;
        right: 0;
        max-height: 300px;
    }
    
    .smart-search-item {
        padding: 0.5rem 0.75rem;
    }
    
    .smart-search-item-subtitle {
        font-size: 0.8125rem;
        margin-left: 1.25rem;
    }
}

/* Type-specific icons and colors */
.smart-search-item .fa-building {
    color: #0d6efd;
}

.smart-search-item .fa-map-marker-alt {
    color: #dc3545;
}

.smart-search-item .fa-tags {
    color: #198754;
}

.smart-search-item .fa-lightbulb {
    color: #ffc107;
}

/* Accessibility improvements */
.smart-search-item[aria-selected="true"] {
    background-color: #e7f1ff;
    border-color: #86b7fe;
}

/* Loading animation */
.smart-search-loading .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .smart-search-suggestions {
        border-width: 2px;
    }
    
    .smart-search-item:hover,
    .smart-search-item.selected {
        background-color: #e9ecef;
        border: 1px solid #495057;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .smart-search-item {
        transition: none;
    }
    
    .smart-search-loading .fa-spinner {
        animation: none;
    }
}