/* ============================================
   Pro Number Autocomplete Component Styles
   ============================================
   Used by: Stimulus controller pro-number-autocomplete_controller.js
   Templates: 14+ templates across loads, accounting, mileage modules
   ============================================ */

/* Wrapper - provides positioning context for absolute dropdown */
.autocomplete-wrapper {
    position: relative;
}

/* Results dropdown */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 4px 4px;
}

/* Show class - added by Stimulus controller */
.autocomplete-results.show {
    display: block;
}

/* Individual autocomplete items */
.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: background-color 0.15s;
}

/* Hover and keyboard navigation highlight */
.autocomplete-item:hover,
.autocomplete-item.active {
    background: #f8f9fa;
}

/* Remove border from last item */
.autocomplete-item:last-child {
    border-bottom: none;
}

/* Pro Number text (highlighted) */
.autocomplete-item strong {
    color: #ff8800;
    font-weight: 600;
}

/* Muted text (descriptions, notes) */
.autocomplete-item .text-muted {
    color: #6c757d;
    font-size: 12px;
    margin-left: 8px;
}

/* Badge (for miles, status, etc.) */
.autocomplete-item .badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    background: #17a2b8;
    color: white;
    margin-left: 8px;
}

.autocomplete-item .badge.bg-info {
    background: #17a2b8;
}

.autocomplete-item .badge.bg-success {
    background: #28a745;
}

.autocomplete-item .badge.bg-warning {
    background: #ffc107;
    color: #333;
}
