/*
 * smart-box.css
 * Estilos para o componente SmartBox/SmartInput (Select com busca)
 */

/* Container do dropdown flutuante */
.smartbox {
    position: absolute;
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 9999; /* Sobrepor modais e navbar */
    max-height: 300px;
    overflow-y: auto;
    display: none;
    padding: 0.25rem 0;
    font-family: inherit;
}

/* Opções dentro do dropdown */
.smartbox-item {
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.1s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Efeito ao passar o mouse na opção */
.smartbox-item:hover {
    background-color: #f1f3f5;
    color: #0d6efd; /* Azul do Bootstrap */
}

/* Opção atualmente selecionada */
.smartbox-selected-item {
    background-color: #e9ecef;
    font-weight: 600;
    color: #052c65;
}

/* Destaque do texto pesquisado */
.smartbox-highlight {
    background-color: #fff3cd; /* Amarelo clarinho */
    font-weight: bold;
    color: #856404;
    border-radius: 2px;
    padding: 0 2px;
}

/* Spinner/Loading (caso aplicável) */
.smartbox-loading {
    display: none;
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.5rem;
    text-align: center;
}

/* Esconder o <select> original, mantendo apenas o <input> visível */
select.smartselect {
    display: none !important;
}

/* Pequeno ajuste no input simulado para ter o cursor (setinha) se o usuário desejar */
input.smartinput {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}
