/* CriadorApi.css - Estilos para busca de tecidos e sugestões */

/* Estilos CSS para as sugestões de busca de tecidos */
.sugestoes-container {
    position: absolute;
    width: 100%;
    max-height: 400px; /* Aumentado para acomodar mais resultados */
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 0 0 4px 4px;
}

.sugestao-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.sugestao-item:hover {
    background-color: #f8f9fa;
}

.sugestao-item:last-child {
    border-bottom: none;
}

.sugestao-codigo {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 2px;
}

.sugestao-detalhes {
    margin-top: 4px;
}

.sugestoes-cabecalho {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 1001;
}

.sugestoes-cabecalho .alert {
    margin-bottom: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.ver-mais-resultados {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    position: sticky;
    bottom: 0;
}

.ver-mais-resultados button {
    transition: all 0.2s ease;
}

.ver-mais-resultados button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sugestoes-rodape {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.carregando-resultados {
    padding: 16px;
    text-align: center;
    color: #6c757d;
}

.erro-busca {
    padding: 12px;
    text-align: center;
}

.sem-resultados {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* Melhorias para o campo de busca */
#tecido_busca {
    position: relative;
}

#tecido_busca:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .sugestoes-container {
        max-height: 300px;
    }
    
    .sugestao-item {
        padding: 10px;
    }
    
    .sugestao-detalhes {
        font-size: 0.8em;
    }
}

/* Animações suaves */
.sugestoes-container {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilo para o spinner de carregamento */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Melhorias para acessibilidade */
.sugestao-item:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    background-color: #e3f2fd;
}

/* Estilo para ícones (se estiver usando Font Awesome) */
.fas {
    font-size: 0.9em;
}

/* Estilos para sugestões rápidas */
#tecido_sugestoes_rapidas {
    margin-top: 0.5rem;
}

#tecido_sugestoes_rapidas .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

#tecido_sugestoes_rapidas .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Estilos para informações do tecido selecionado */
#tecido_selecionado_info .alert {
    border-left: 4px solid #17a2b8;
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

#tecido_selecionado_info .alert strong {
    color: #0c5460;
    font-weight: 600;
}

/* Estilos para posição do tecido */
#posicao_tecido_container .form-select {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#posicao_tecido_container .form-select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
} 