/* Quick Casting Wizard — Typeahead component CSS (S5 16-Mai-2026)
 * Estilos isolados que dependem de variaveis CSS definidas em wizard.css
 * (--aqua, --aqua-dark, --border, --brand-cream-light, --radius-sm,
 * --shadow, --text-dark, --text-mute, --space-2).
 */

.qc-typeahead {
    position: relative;
}

/* ─── Pills (multi mode) ─── */

.qc-typeahead__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.qc-typeahead__pills:empty {
    display: none;
}

.qc-typeahead__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--aqua);
    color: #FFFFFF;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 500;
}

.qc-typeahead__pill-remove {
    background: none;
    border: 0;
    color: #FFFFFF;
    cursor: pointer;
    padding: 0 2px;
    font-size: 16px;
    line-height: 1;
    border-radius: 50%;
    min-width: 18px;
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.qc-typeahead__pill-remove:hover,
.qc-typeahead__pill-remove:focus {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}

/* ─── Input (herda do wizard) ─── */

.qc-typeahead__input {
    /* Estilos vem do wizard.field input. Aqui so reforcamos width. */
    width: 100%;
}

/* ─── Dropdown ─── */

.qc-typeahead__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow);
}
.qc-typeahead__dropdown[hidden] {
    display: none !important;
}

.qc-typeahead__option {
    padding: 10px 14px;
    cursor: pointer;
    color: var(--text-dark);
    /* iOS Safari: garantir touch target >= 44px (WCAG 2.5.5).
       padding 10+10 + line-height ~20 = ~40, somar font-size 14 = 44. */
    line-height: 1.4;
    min-height: 44px;
    display: flex;
    align-items: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.qc-typeahead__option:hover,
.qc-typeahead__option.is-focus {
    background: var(--brand-cream-light);
}

.qc-typeahead__empty {
    padding: 10px 14px;
    color: var(--text-mute);
    font-style: italic;
    font-size: 14px;
}
