/*
 * Giznova AI Explorer - Autocomplete / Typeahead Styles
 *
 * Matches the existing Giznova UI aesthetic:
 * - Clean, compact, subtle
 * - Keyboard accessible
 * - Mobile-friendly
 *
 * Do NOT introduce a new visual style.
 */

/* Dropdown container */
.giznova-autocomplete {
    position: relative;
    width: 100%;
}

.giznova-dropdown {
    position: absolute;
    z-index: 10000;
    width: 100%;
    max-width: 100%;
    max-height: 320px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    margin-top: 4px;
    font-family: Arial, sans-serif;
}

/* Individual suggestion item */
.giznova-suggestion {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    margin: 2px 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.giznova-suggestion:hover,
.giznova-suggestion.giznova-highlighted {
    background: #f0f4ff;
    color: #005fd1;
}

.giznova-suggestion:focus-within {
    background: #f0f4ff;
    outline: none;
}

.giznova-suggestion-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 2px;
}

.giznova-suggestion-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.giznova-suggestion-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 4px;
    padding: 2px 8px;
    flex-shrink: 0;
}

.giznova-suggestion.giznova-highlighted .giznova-suggestion-label {
    color: #005fd1;
}

.giznova-suggestion-meta {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.3;
}

.giznova-suggestion.giznova-highlighted .giznova-suggestion-meta {
    color: #4b5563;
}

/* Highlighted query term within suggestion labels */
.giznova-highlight {
    background: rgba(0, 95, 209, 0.15);
    color: #005fd1;
    font-weight: 700;
    padding: 0 2px;
    border-radius: 2px;
}

/* No results message */
.giznova-no-results {
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
    text-align: center;
    cursor: default;
}

/* Loading state */
.giznova-loading {
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .giznova-dropdown {
        border-radius: 10px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }

    .giznova-suggestion {
        padding: 12px 14px;
        margin: 2px 0;
        border-radius: 8px;
    }

    .giznova-suggestion-label {
        font-size: 1rem;
    }

    .giznova-suggestion-meta {
        font-size: 0.85rem;
    }
}
