/**
 * MIM Portal - Autocomplete Dropdown Styles
 * Include this CSS for pages using MimAutocomplete component
 */

/* Search container wrapper */
.search-container {
    position: relative;
}

.search-container .form-control {
    padding-left: 2.5rem;
    font-size: 1.1rem;
    height: 50px;
    border-radius: 25px;
}

.search-container .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.2rem;
    z-index: 10;
}

.search-container .htmx-indicator {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.htmx-request .htmx-indicator {
    display: inline-block !important;
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.autocomplete-dropdown:empty {
    display: none;
}

.autocomplete-dropdown .dropdown-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.autocomplete-dropdown .dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 15px 15px;
}

.autocomplete-dropdown .dropdown-item:hover,
.autocomplete-dropdown .dropdown-item:focus {
    background-color: #e7f1ff;
    outline: none;
}

.autocomplete-dropdown .dropdown-item.active {
    background-color: #0d6efd;
    color: white;
}

.autocomplete-dropdown .dropdown-item.active .badge {
    background-color: white !important;
    color: #0d6efd;
}

.autocomplete-dropdown .dropdown-item.active small {
    color: rgba(255,255,255,0.8);
}

/* Suggestion item layout */
.suggestion-item small {
    display: block;
    margin-top: 4px;
}

/* No results message */
.autocomplete-dropdown .no-results {
    padding: 15px 20px;
    text-align: center;
    color: #6c757d;
}

/* Loading indicator in dropdown */
.autocomplete-dropdown .loading {
    padding: 15px 20px;
    text-align: center;
}

/* Card styles for results grid */
.entity-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #dee2e6;
}

.entity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #0d6efd;
}
