/* Location Hierarchy Styles */

.location-search-wrapper {
    position: relative;
}

#location-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

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

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

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

.search-result-item i {
    color: #dc3545;
    width: 20px;
}

.search-result-item .result-name {
    font-weight: 500;
    color: #333;
}

.search-result-item .result-type {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Location dropdown styles */
.location-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.location-filter-row .form-select {
    flex: 1;
    min-width: 150px;
}

.location-filter-row .form-select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Location badge in property cards */
.property-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.875rem;
}

.property-location-badge i {
    color: #dc3545;
}

/* Loading spinner for dropdowns */
.select-loading {
    position: relative;
}

.select-loading::after {
    content: '';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .location-filter-row {
        flex-direction: column;
    }
    
    .location-filter-row .form-select {
        width: 100%;
    }
    
    #location-search-results {
        max-height: 300px;
    }
}

