/* Global Search Styles */
.search-container {
    position: relative;
    min-width: 250px;
}

.search-input {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    background-color: rgba(255, 255, 255, 0.95);
    color: #212529;
}

.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.search-results-container.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    cursor: pointer;
}

.search-result-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-category {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.search-result-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.search-result-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
}

.search-result-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    color: #0d6efd;
    margin-right: 1rem;
}

.search-empty {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
}

.search-message {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #6c757d;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Dropdown section headers */
.search-section-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    background-color: #f8f9fa;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Keyboard navigation highlight */
.search-result-item.active {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Different colors for different entity types */
.search-result-icon.user {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.search-result-icon.building {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.search-result-icon.store {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.search-result-icon.user-tie {
    background-color: rgba(102, 16, 242, 0.1);
    color: #6610f2;
}

.search-result-icon.users {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-container {
        min-width: 200px;
    }
}