/* Custom Autocomplete Styling */

/* Basic suggestion styling */
.suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover,
.suggestion-item.is-active {
    background-color: #f8f9fa;
}

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

/* Participant suggestion styling */
.participante-suggestion {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
}

.participante-suggestion .name {
    font-weight: bold;
    color: #333;
}

.participante-suggestion .email {
    color: #666;
    font-size: 0.9em;
}

.participante-suggestion .institution {
    color: #888;
    font-size: 0.85em;
    font-style: italic;
}

/* Event suggestion styling */
.event-suggestion {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
}

.event-suggestion .event-name {
    font-weight: bold;
    color: #333;
}

.event-suggestion .event-date {
    color: #666;
    font-size: 0.9em;
}

.event-suggestion .registration-status {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
}

.event-suggestion .registration-status.true {
    background-color: #d4edda;
    color: #155724;
}

.event-suggestion .registration-status.false {
    background-color: #f8d7da;
    color: #721c24;
}

/* Institution suggestion styling */
.institution-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}

.institution-suggestion .institution-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.institution-suggestion .institution-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.institution-suggestion .institution-name {
    font-weight: bold;
    color: #333;
}

.institution-suggestion .institution-location {
    color: #666;
    font-size: 0.9em;
}

/* Status indicators */
.suggestion-item.active {
    background-color: #e8f5e8;
    border-left: 3px solid #28a745;
}

.suggestion-item.inactive {
    background-color: #f5e5e5;
    border-left: 3px solid #dc3545;
}

/* Loading state */
.autocomplete-wrapper .loading-icon {
    position: absolute;
    right: 10px;
    top: 70%;
    transform: translateY(-50%);
    color: #666;
}

/* Mode icon */
.autocomplete-wrapper .mode-icon {
    position: absolute;
    right: 10px;
    top: 70%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

/* Suggestions list */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0;
}

.suggestions-list li {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestions-list li:hover {
    background-color: #f8f9fa;
}

.suggestions-list li.is-active {
    background-color: #e3f2fd;
}

/* Input wrapper */
.autocomplete-wrapper .input-wrapper {
    position: relative;
}

.autocomplete-wrapper input {
    padding-right: 30px;
}

/* Responsive design */
@media (max-width: 768px) {
    .suggestion-item {
        padding: 12px;
    }

    .participante-suggestion,
    .event-suggestion,
    .institution-suggestion {
        padding: 12px;
    }

    .institution-suggestion .institution-logo {
        width: 24px;
        height: 24px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .suggestions-list {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .suggestion-item:hover,
    .suggestion-item.is-active {
        background-color: #4a5568;
    }

    .participante-suggestion .name,
    .event-suggestion .event-name,
    .institution-suggestion .institution-name {
        color: #e2e8f0;
    }

    .participante-suggestion .email,
    .event-suggestion .event-date,
    .institution-suggestion .institution-location {
        color: #a0aec0;
    }

    .suggestion-item.active {
        background-color: #2f855a;
        border-left-color: #48bb78;
    }

    .suggestion-item.inactive {
        background-color: #742a2a;
        border-left-color: #f56565;
    }
}
